l10n updates
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
c3e3c4f91e
commit
5681a43d69
25
README.md
25
README.md
|
@ -32,14 +32,24 @@ After adding a new key and providing/obtaining translations for it, follow the n
|
||||||
|
|
||||||
### Updating translations
|
### Updating translations
|
||||||
|
|
||||||
Only Open Privacy staff members can update translations automatically:
|
Only Open Privacy staff members can update translations.
|
||||||
|
|
||||||
```
|
In Lokalise, hit Download and make sure:
|
||||||
flutter pub run flutter_lokalise download -v --api-token "<X>" --project-id "<Y>"
|
|
||||||
```
|
|
||||||
|
|
||||||
This will download a bundle of translations from Lokalise and convert it to resource files in `lib/l10n/intl_*.arb`.
|
* Format is set to "Flutter (.arb)
|
||||||
The next time Flwtch is built, Flutter will notice the changes and update `app_localizations.dart` accordingly (thanks to `generate:true` in `pubspec.yaml`).
|
* Output filename is set to `l10n/intl_%LANG_ISO%.%FORMAT%`
|
||||||
|
* Empty translations is set to "Replace with base language"
|
||||||
|
|
||||||
|
Build, download and unzip the output, overwriting `lib/l10n`. The next time Flwtch is built, Flutter will notice the changes and update `app_localizations.dart` accordingly (thanks to `generate:true` in `pubspec.yaml`).
|
||||||
|
|
||||||
|
### Adding a language
|
||||||
|
|
||||||
|
If a new language has been added to the Lokalise project, two additional manual steps need to be done:
|
||||||
|
|
||||||
|
* Create a new key called `localeXX` for the name of the language
|
||||||
|
* Add it to the settings pane by updating `getLanguageFull()` in `lib/views/globalsettingsview.dart`
|
||||||
|
|
||||||
|
Then rebuild as normal.
|
||||||
|
|
||||||
### Using a string
|
### Using a string
|
||||||
|
|
||||||
|
@ -57,6 +67,5 @@ Text(AppLocalizations.of(context)!.stringIdentifer),
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
API tokens are only available to Open Privacy staff at this time, who will perform the translation updates for you as part of merging your PRs.
|
|
||||||
|
|
||||||
With `generate: true` in `pubspec.yaml`, the Flutter build process checks `l10n.yaml` for input/output filenames.
|
With `generate: true` in `pubspec.yaml`, the Flutter build process checks `l10n.yaml` for input/output filenames.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue