Skip to content

Instantly share code, notes, and snippets.

@rocboronat
Created December 11, 2020 09:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocboronat/9811c1cd9baaba8bf4faf79231365b14 to your computer and use it in GitHub Desktop.
Save rocboronat/9811c1cd9baaba8bf4faf79231365b14 to your computer and use it in GitHub Desktop.
PhraseApp configuration to download translation files on both Flutter ARB and Android XML at the same time
phrase:
access_token: <your access token here>
project_id: <your project ID here>
push:
sources:
- file: ./lib/l10n/intl_<locale_name>.arb
params:
file_format: arb
pull:
targets:
- file: ./lib/l10n/intl_<locale_name>.arb
params:
file_format: arb
- file: ./android/app/src/main/res/values/strings.xml
params:
file_format: xml
locale_id: cdf28aefdfa351eb3d9d1f7899f82fe8 # English locale id
- file: ./android/app/src/main/res/values-es/strings.xml
params:
file_format: xml
locale_id: 459e58aca33c806d1b0ae94fc8306bb2 # Spanish locale id
- file: ./android/app/src/main/res/values-pt/strings.xml
params:
file_format: xml
locale_id: df0833295148dd289e37f29ed6fc43c3 # Portuguese locale id
@rocboronat
Copy link
Author

Maybe the locale IDs are different in your project. I only used it once, so I don't know if them change from project to project. So, if you want to list you project locale ids, run phrase locales list --access_token your_access_token --project_id your_project_id. And share the result here if you can! 🙆‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment