-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Fix incorrectly named zh-hans and zh-hant locale path #4103
Conversation
Current coverage is 91.39%@@ master #4103 diff @@
==========================================
Files 51 51
Lines 5473 5473
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 5002 5002
Misses 471 471
Partials 0 0
|
This will be canceled by the next transfex update. |
@xordoquy do you expect the next transfex update to fix zh-hans and zh-hant locale path? The current locale directories are definitely incorrect (see the linked Django documentation in the PR description) - Django unable to locale the django.mo binaries. This fix seems to work perfectly for us so far (we forked DRF 3.3.3). Would you be more specific about what failed when a PR was merged to address it? |
To be honest, I have no idea how translation work. The PR was supposed to fix the translation path for zh-hans / zh-hant but I have no idea why this didn't work. |
PR is #3739 |
I'm not familiar with how DRF work with transifex - it's hard to dig around without transifex account credentials. But after spending sometime reading transifex documentation and this change from #3739, it seems like the when you run In other words, I'm guessing that when you pull updated translations from transifex, it actually won't counterfeit the changes in this PR. |
Never mind, just realized that I could run With |
Alright, I now have an idea why #3739 didn't work. Thanks for taking the time to investigate ! |
You're welcome! Glad I could help :) |
Seems we did the same tests in parallel :) |
Django discovers translations for simplified Chinese (zh-hans) and traditional Chinese (zh-hant) by looking up the locale name in
rest_framework/locale/
directory, meaning it's looking forrest_framework/locale/zh_Hans/
andrest_framework/locale/zh_Hant/
.