Changes between Initial Version and Version 4 of Ticket #29712
- Timestamp:
- Aug 27, 2018, 7:01:59 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29712
- Property Owner changed from to
- Property Status new → assigned
- Property Triage Stage Unreviewed → Accepted
-
Ticket #29712 – Description
initial v4 1 The translations only work when the locale involving region code is generated as this: 1 Hey Calude, 2 2 3 `zh_CN` for Simplified Chinese 3 What about normalizing the directory name to something that would just work. 4 4 5 Notice here that the region code should be in capital letters for the `django.po` file in the directory to correctly work. 5 For example, 6 6 7 If we do `makemessages` as 7 No matter, if the developer is doing all these: 8 8 9 9 `python manage.py makemessages -l zh_cn` 10 OR 11 `python manage.py makemessages -l zh-cn` 10 `python manage.py makemessages -l zh_CN` 11 `python manage.py makemessages -l ZH_CN` 12 `python manage.py makemessages -l ZH-CN` 12 13 13 It wouldn't work and no error is produced even after running compilemessages, which can leave people baffled for a while.14 etc. 14 15 15 I would suggest adding a warning/error messages if the locale is used incorrectly. That would certainly be a great help.16 we, just normalize the directory name to `zh_CN` and it would work. 16 17 17 I can make a patch for this as well.18 I'm still about to read the code of `makemessages` command and probably if there are any more checks than just this, then we'll have to figure out another way all together.