Whenever there are some updated strings on Transifex and you want to incorporate those changes back into your WordPress project, you can simply run
tx pull. If you also want to pull new language files, you can add the -a|–all flag to the pull command. You should keep in mind, however, that if you have not setup your project by using a file expression, you need to move and track the new translation files manually after downloading them.
$ tx pull -a
If you are interested in only a subset of the available resources of your project, you can use the -r/–resource option to push/pull files only for the specific (comma-separated) resources. You can also use Unix shell-style wildcards to easily select multiple resources.
# identify a resource using project_slug.resource_slug $ tx pull -r transifex.core $ tx pull -r 'transifex.co*'
Additionally, there is an option to work only on specific (comma-separated) languages, the -l/–language option.
$ tx pull -r transifex.core -l fr_FR
Depending on the size of the files and the number of languages, this process can take up to several minutes, as it requires uploading all files, parsing them, extracting the available strings and storing them into the database. To avoid misuse of the API, we have some throttling mechanisms in play. These should not interfere with your work. However, just to be safe, whenever pushing or pulling to/from the Transifex server, if you want a specific resource or language use the -r/–resource and -l/–language options of the push/pull commands to avoid pushing/pulling all of the tracked files.
Additional options for the
tx pull command are:
- -l Specify which translations you want to pull (defaults to all).
- -r Specify the resource for which you want to pull the translations (defaults to all).
- -a Fetch all translation files from server (even new ones).
- -s Force the fetching of the source file (default: False).
- -f Force download of translations files.
- –skip Don’t stop on errors. Useful when pushing many files concurrently.
- –disable-overwrite By default Transifex will fetch new translations files and replace existing ones. Use this flag if you want to disable this feature.
- -h Shows the help screen for the command.
- –mode Specify the mode of the translation that is needed. See Defining the mode of the translated file for details.