-
Notifications
You must be signed in to change notification settings - Fork 5
Localization
Harsimran Singh Maan edited this page Dec 13, 2020
·
2 revisions
All text should be localized. A developer must add new text values to the shipanther_localization.dart
file.
Extract the values that need to be translated
make extract-arb
Check if there are new keys to be translated
diff i18n/intl_messages.arb i18n/intl_messages_en.arb
If there are keys that start with @
, it means that these keys need to be translated.
Move intl_messages.arb to the english locale and a `"@@locale": "en", at line #2
cat i18n/intl_messages.arb| awk 'NR==1{print; print " \"@@locale\": \"en\","} NR!=1' > i18n/intl_messages_en.arb
Use git status
to see updated keys. Copy the new keys to all other locale files and translate them.
Once the translations are finished, generate the files that flutter needs.
make generate-from-arb
Commit the newly translated file and create a pull request. The CI checks if all keys have been translated. The checks would be refined as new locales are added.