From 19e5a6f68fd3593a7d74642c44458aaf925d3335 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Apr 2025 14:31:13 -0500 Subject: [PATCH] chore(doc): translation instruction for mobile app (#17629) --- docs/docs/developer/setup.md | 15 +++++++++++++-- mobile/README.md | 14 +++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/docs/developer/setup.md b/docs/docs/developer/setup.md index 1d08453790..76106803e8 100644 --- a/docs/docs/developer/setup.md +++ b/docs/docs/developer/setup.md @@ -83,9 +83,20 @@ To see local changes to `@immich/ui` in Immich, do the following: ### Mobile app -The mobile app `(/mobile)` will required Flutter toolchain 3.13.x and FVM to be installed on your system. +#### Setup -Please refer to the [Flutter's official documentation](https://flutter.dev/docs/get-started/install) for more information on setting up the toolchain on your machine. +1. Setup Flutter toolchain using FVM. +2. Run `flutter pub get` to install the dependencies. +3. Run `make translation` to generate the translation file. +4. Run `fvm flutter run` to start the app. + +#### Translation + +To add a new translation text, enter the key-value pair in the `i18n/en.json` in the root of the immich project. Then, from the `mobile/` directory, run + +```bash +make translation +``` The mobile app asks you what backend to connect to. You can utilize the demo backend (https://demo.immich.app/) if you don't need to change server code or upload photos. Alternatively, you can run the server yourself per the instructions above. diff --git a/mobile/README.md b/mobile/README.md index 6e8fadd5d1..fb82b4de0c 100644 --- a/mobile/README.md +++ b/mobile/README.md @@ -4,7 +4,18 @@ The Immich mobile app is a Flutter-based solution leveraging the Isar Database f ## Setup -You must set up Flutter toolchain in your machine before you can perform any of the development. +1. Setup Flutter toolchain using FVM. +2. Run `flutter pub get` to install the dependencies. +3. Run `make translation` to generate the translation file. +4. Run `fvm flutter run` to start the app. + +## Translation + +To add a new translation text, enter the key-value pair in the `i18n/en.json` in the root of the immich project. Then, from the `mobile/` directory, run + +```bash +make translation +``` ## Immich-Flutter Directory Structure @@ -15,6 +26,7 @@ Below are the directory inside the `lib` directory: - `extensions`: Extensions enhancing various existing functionalities within the app, such as asset_extensions.dart, string_extensions.dart, and more. - `module_template`: Provides a template structure for different modules within the app, including subdivisions like models, providers, services, UI, and views. + - `models`: Placeholder for storing module-specific models. - `providers`: Section to define module-specific Riverpod providers. - `services`: Houses services tailored to the module's functionality.