Skip to content

feat(mobile): use Weblate for i18n (1) #17609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ jobs:
working-directory: ./mobile
run: flutter pub get

- name: Generate translation file
run: make translation
working-directory: ./mobile

- name: Build Android App Bundle
working-directory: ./mobile
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
run: dart pub get
working-directory: ./mobile

- name: Generate translation file
run: make translation; dart format lib/generated/codegen_loader.g.dart
working-directory: ./mobile

- name: Run Build Runner
run: make build
working-directory: ./mobile
Expand Down
5 changes: 4 additions & 1 deletion mobile/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ default.isar.lock
libisar.so

# FVM Version
.fvm/
.fvm/

# Translation file
lib/generated/codegen_loader.g.dart
3 changes: 3 additions & 0 deletions mobile/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ import 'package:immich_mobile/utils/migration.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:logging/logging.dart';
import 'package:timezone/data/latest.dart';
import 'package:immich_mobile/generated/codegen_loader.g.dart';

void main() async {
EasyLocalization.logger.enableBuildModes = [];
ImmichWidgetsBinding();
final db = await Bootstrap.initIsar();
await Bootstrap.initDomain(db);
Expand Down Expand Up @@ -234,6 +236,7 @@ class MainWidget extends StatelessWidget {
path: translationsPath,
useFallbackTranslations: true,
fallbackLocale: locales.values.first,
assetLoader: const CodegenLoader(),
child: const ImmichApp(),
);
}
Expand Down
3 changes: 3 additions & 0 deletions mobile/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ build_release_android:

migrations:
dart run drift_dev make-migrations

translation:
dart run easy_localization:generate -S ../i18n