π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix incorrect build instructions
Prateek Sunal6e02a09ee8a7
diff --git a/mobile/apps/photos/README.md b/mobile/apps/photos/README.mdindex e29b1ff0e1..399b0c9260 100644--- a/mobile/apps/photos/README.md+++ b/mobile/apps/photos/README.md@@ -54,9 +54,7 @@ You can alternatively install the build from PlayStore or F-Droid.4. Enable repo git hooks `git config core.hooksPath hooks`-5. If using Visual Studio Code, add the [Flutter- Intl](https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl)- extension+5. Run `flutter pub get` to install dependencies and generate localization files6. On Android:@@ -73,6 +71,17 @@ Some common issues and troubleshooting tips are in [docs/dev](docs/dev.md).VSCode users might find it useful to copy [docs/vscode](docs/vscode) into a toplevel `.vscode`.+## π Localization++This project uses Flutter's built-in localization system configured via `l10n.yaml`.++- Localization files are auto-generated when you run `flutter pub get`+- The base localization file is `lib/l10n/intl_en.arb`+- Generated code appears in `lib/generated/intl/`+- To manually regenerate: `flutter gen-l10n`++See [docs/translations.md](docs/translations.md) for contributing translations.+## ποΈ AttributionsCity coordinates from [Simple Maps](https://simplemaps.com/data/world-cities)diff --git a/mobile/apps/photos/docs/translations.md b/mobile/apps/photos/docs/translations.mdindex dbcb07d86c..b3c8bcdc06 100644--- a/mobile/apps/photos/docs/translations.md+++ b/mobile/apps/photos/docs/translations.md@@ -28,50 +28,42 @@ from Crowdin, but these two should be no-ops.## Adding a new string-While it is technically possible to perform the following actions using command lines, it is recommended to use Visual Studio Code with the [Flutter](https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl) extension, for ease of use.+1. Add the key-value pair to `lib/l10n/intl_en.arb`-1. Open Visual Studio Code, with the Flutter Intl extension installed, in-the `mobile` directory-1. Select the string you want to extract, including the quotation marks-1. Press '`Ctrl + .`' (or '`command + .`' on Mac) to open quick actions, and press "Extract to ARB" (if it is-not showing, check that you have not opened the full `ente` repository instead of the `mobile` folder).- <div align="center">+ Example:+ ```json+ {+ "existingKey": "Existing translation",+ "newStringKey": "Your new string text"+ }+ ```- +1. (optional) Add context or description to help translators:- </div>+ ```json+ {+ "newStringKey": "Your new string text",+ "@newStringKey": {+ "description": "Context about where/how this string is used"+ }+ }+ ```- That should replace the string..+1. Run `flutter gen-l10n` to regenerate the localization files (or run `flutter pub get` which triggers this automatically)- <div align="center">+1. Import the localization in your Dart file:- + ```dart+ import "package:photos/generated/l10n.dart";+ ```- </div>+1. Use the string in your code:- .. and generate/modify the arb files.+ ```dart+ AppLocalizations.of(context).newStringKey+ ```- <div align="center">-- -- </div>--1. (optional) You might want to add more context to the extracted string in the-source `intl_en.arb` file-- <div align="center">-- -- </div>--1. Make sure the file in which you have extracted the string has the following-import:-- `import "package:photos/generated/l10n.dart"`--1. Commit the changes and create a PR in which it is advised to tag at least one+1. Commit the changes and create a PR in which it is advised to tag at least oneof the developers (i.e. [laurenspriem](https://github.com/laurenspriem))1. During the next sync, the workflow will upload new source strings to Crowdin's