Replies: 1 comment
-
There is no need to add translations existing in the repository, Weblate parses them from it. |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hello,
we are using our script which calls weblate API via HTTP requests. It basically create components with necessary parameters (slug, file mask, repository etc.) and it also creates translation in accordance defined array. There is also check before creation of given component or translation if it does not exist yet.
I moved existing localization files (including all translation files ending with suffix _{lang} e.g. _cs, _de) to different repository. So I wanted to create new components with different name in same project. When component is created by script and translation are created afterwards we always get error
panic: postRequest: components/sx/firmware-constants-properties/translations/, error code: 400, response: ["Translation file already exists!\nThe given language already exists."], request: {"language_code":"de","filename":"","is_source":false,"project":{"allow_translation_propagation":"","branch":"","check_flags":"","edit_template":false,"enable_suggestions":"","file_format":"","filemask":"","id":0,"language_regex":"","license_url":"","license":"","name":"","new_base":"","push":"","push_branch":"","repo":"","restricted":false,"source_language":{"code":""},"slug":"","template":"","vcs":""}}
So it seems weblate are scanning added components according to file mask in repositories and it automatically adds translations to new component. We most likely try to create translation at same time when weblate is creating it - so this is issue root cause what I suppose.
My questions are:
Beta Was this translation helpful? Give feedback.
All reactions