-
-
Notifications
You must be signed in to change notification settings - Fork 955
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
Component language gets deleted after upload new language source file #4861
Comments
Do you get any errors in Weblate logs? Are the files removed from the repository? Check content of DATA_DIR/vcs/mobile-project/android-app on your Weblate server. |
This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you! |
Hi, @nijel thanks for your quick response. Once the new strings.xml file is uploaded. The zn_CN.xml file still remains in the server local repo but Weblate can't retrieve it from the API neither the UI. Thanks in advance, |
Does it appear under different name? Or there are no translations shown by Weblate? Anyway the Weblate logs should indicate why it has been removed... |
I think it gets moved to zn_Hans which is an alias for zn_cn (lowercase) however the language disappearing (getting moved) is zn_CN (CN Uppercase). |
Can you take a look? And take a look at the actual files? Before c355570 (included in the 4.3.2 release) there could have been some inconsistencies how newly created files and existing files were parsed and this could lead to different naming of the translations in the UI. Still, the actual files should stay there and should not be removed... |
Hi Nijel, weblate/weblate/lang/models.py Line 170 in 8f6e12d
and weblate/weblate/lang/models.py Line 149 in 8f6e12d
the language code gets set as zh_Hans instead of zh_CN which was provided in the create request.
The issue can be reproduced by adding any chinese locale that has a traditional/simplified version. e.g. zh_HK, zh_CN, zh_SG. |
The |
The language provided to I hope this clarifies the issue that we are facing after using latest |
Thanks, now I can reproduce this. Anyway, what is wrong on using zh_Hans inside Weblate? |
We are migrating data from an existing platform and we need to use the old language codes for backward compatibility. |
Thank you for your report, the issue you have reported has just been fixed.
|
You can use anything in the file names, it will be just mapped for Weblate. It's better to stick with Weblate defined languages on Weblate side for correct behaviour of some features (for example machine translation using third-party services). |
Describe the bug
The custom language
zh_CN
disappears when uploading again the source file with a replacing mechanism.To Reproduce the bug
Steps to reproduce the behavior:
android-app
languageEnglish (en)
, file formatAndroid Resource
api/translations/mobile-project/android-app/zh_CN/
)api/translations/mobile-project/android-app/zh_CN/
) --> NOT FOUNDExpected behavior
When on point number 4 a new strings.xml get uploaded, only add the new strings to the different languages but not get rid of any of them.
Server configuration and status
Weblate installation: Hosted service
weblate list_versions
On Git checkout:
./manage.py list_versions
` * Weblate: 4.3
The text was updated successfully, but these errors were encountered: