Pushing & pulling strings
The Tolgee CLI is currently experimental and subject to bugs. Breaking changes may happen before stable release!
Help us reach stable version faster by reporting any bug you encounter on the issue tracker. Feedback is also greatly appreciated!
Pushing and pulling strings from Tolgee is the most basic way to interact with strings. Similarly as with a Git project, it allows you to download strings from Tolgee to your computer (pull), or to upload them after you changed them (push).
This is a useful command that exports strings from the platform, and saves them in a folder of your choice. You can use this to download string from Tolgee before bundling your app for production.
tolgee pull [options] [destination folder]
tolgee pull ./i18n
-f): Format of the exported files. Available formats:
json. Defaults to
-l): List of languages to pull. Leave unspecified to export them all
-s): List of states to include. Available states:
reviewed. Defaults to all except untranslated.
-d): Structure delimiter to use. By default, Tolgee treats
.as a nested structure delimiter, and formats its export accordingly. Set the option without a value to disable this behavior. Can be configured per-project.
-o): Whether contents of the destination folder should be overridden. This will erase ALL of the contents of the destination folder. Defaults to asking the user interactively (or failing if it is not possible).
Currently, CLI does not let you pull only specific namespaces and will download all strings. In the near future, you'll be able to configure this via a specific option.
See issue #17.
tolgee push [options] [translations folder]
tolgee push --force-mode override ./i18n
-f): Force mode. Available modes:
no(abort on conflicts). Defaults to asking the user interactively (or
noif it is not possible).
For complex conflicts, even if the import failed you can still manually resolve the conflicts on the Tolgee webapp.
Currently, CLI does not let you delete keys that are not part of your local copy of the strings. In the near future, you'll be able to set a flag to tell the CLI you want to delete strings on the platform that aren't in your local copy.
See issue #18.