Skip to content

Instantly share code, notes, and snippets.

@theodesp
Created April 11, 2019 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theodesp/708eac70d8e654de0c5963ffa2d3a52b to your computer and use it in GitHub Desktop.
Save theodesp/708eac70d8e654de0c5963ffa2d3a52b to your computer and use it in GitHub Desktop.
Enter the path to the language file you want to upload to PhraseApp.
For documentation, see https://help.phraseapp.com/phraseapp-for-developers/phraseapp-client/configuration#push
Source file path: [default ./locales/<locale_name>/translations.json] ./src/assets/locales/<locale_name>.translation.json
Enter the path to which to download language files from PhraseApp.
For documentation, see https://help.phraseapp.com/phraseapp-for-developers/phraseapp-client/configuration#pull
Target file path: [default ./locales/<locale_name>/translations.json] ./src/assets/locales/<locale_name>.translation.json
We created the following configuration file for you: .phraseapp.yml
phraseapp:
access_token: <TOKEN>
project_id: <PROJECT_ID>
push:
sources:
- file: ./src/assets/locales/<locale_name>.translation.json
params:
file_format: i18next
pull:
targets:
- file: ./src/assets/locales/<locale_name>.translation.json
params:
file_format: i18next
For advanced configuration options, take a look at the documentation: https://help.phraseapp.com/phraseapp-for-developers/phraseapp-client/configuration
You can now use the push & pull commands in your workflow:
$ phraseapp push
$ phraseapp pull
Do you want to upload your locales now for the first time? (y/n) [default y] y
Uploading src/assets/locales/el.translation.json... done!
Check upload ID: 79199169613ae8ab80ec886801309d52, filename: el.translation.json for information about processing results.
Uploading src/assets/locales/en.translation.json... done!
Check upload ID: afdc9f81683ed209538f5461180779ff, filename: en.translation.json for information about processing results.
Project initialization completed!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment