-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop automatically updating translations #88
Comments
Hmm, that sounds like a bug. Usually, json-autotranslate doesn't overwrite keys unless they have changed in the source files. Do you see a .json-autotranslate-cache dir being created after translating your source files? That folder contains the last version of all files so the script can compare differences. |
What happens when you set this parameter to a different folder, e.g. |
It recreates the default directoy and saves the files there |
i have a somewhat related question. Im looking to run translations thru a CI and wanted to use the cache dir to prevent making translations on keys which have already been translated but do not have access to past translations (only access to the cache files). This is my project setup Source directory - This holds all the source files in english
Locales directory - Use a script to auto generate this structure and provide the dir to json-autotranslate. This is the output where the
What I found is that your tool does a diff against the language source files (not the en base file) and the cache files and in my case it will see the language source files are all empty and will query the translation service even tho my actual source file (the en file) hasnt changed. Is there is a way to tell json-autocorrect to pull in the cache translations into the matching language if the lang source does not exist (i.e fr dir is empty, but fr cache has translations so pull those in). Basically trying to prevent source controlling both the full set of translations and the .cache files |
Unfortunately, there currently isn't a way to have json-autotranslate use cached translations if the translated files don't exist yet. As a workaroud, you could think of caching both the .json-autotranslate-cache and your output directory in your CI so you don't have to version-control any of the generated files yourself. |
I would like to know if there's a way to avoid translation updates as I am having the following issue. I have the texts back in a button which is translated by Google to dutch as rug, but I actually want terug. When I make the correction directly to the
nl.json
file and call json-autotranslate again I see rug is back.Note I haven't changed the original text, I have only changed the dutch translation.
The text was updated successfully, but these errors were encountered: