Updates to syncing behavior
By Edouard on April 18, 2014
We pushed an update to the way synching works via the API today. The gist is that it is no longer possible to push all your master and target files at the same time by running the wti push --all
command for instance.
The wti push --all
command is unreliable and can cause problems synching your files. Let’s consider the following project, whose source language is English and which is translated into 3 languages. It contains these files:
» en.yml (master)
»» de.yml
»» fr.yml
»» ru.yml
If the user runs wti push --all
it will push all these files to WebTranslateIt at the same time.
On WebTranslateIt’s side files are imported by background workers and we run many background works at the same time, so WebTranslateIt will import these files at the same time depending on the server load. So en.yml
, de.yml
, fr.yml
and ru.yml
could be imported at the same time.
Importing the master file en.yml
re-generates all its target files in order to add or remove segments that were added or removed in the master file. Since the target files could be importing at the exact same time this command effectively imports a file that is being updated at the same time. This causes issues such as target files not being properly imported.
That’s why we now force users to push master files and target files separately to prevent any importing issues.
WebTranslateIt client updated to 2.3.0
In order to reflect this change we also released an update to the web_translate_it client which deprecates the wti push --all
command. We added a new command to replace it: wti push --target
which will push all target files only.
To install web_translate_it
, please refer to the gem documentation.
To upgrade web_translate_it
to its latest version, type in a terminal: gem install web_translate_it
.
If you were using the command wti push --all
extensively on your project this command will no longer work. We broke it down into 2 commands:
wti push
to push your master files,wti push --target
to push eventual changes of your target files.
My thanks to the awesome folks at LinguaLeo for reporting this issue