Changes between Initial Version and Version 4 of Ticket #29712


Ignore:
Timestamp:
Aug 27, 2018, 7:01:59 PM (6 years ago)
Author:
Sanyam Khurana
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29712

    • Property Owner changed from nobody to David
    • Property Status newassigned
    • Property Triage Stage UnreviewedAccepted
  • Ticket #29712 – Description

    initial v4  
    1 The translations only work when the locale involving  region code is generated as this:
     1Hey Calude,
    22
    3 `zh_CN` for Simplified Chinese
     3What about normalizing the directory name to something that would just work.
    44
    5 Notice here that the region code should be in capital letters for the `django.po` file in the directory to correctly work.
     5For example,
    66
    7 If we do `makemessages` as
     7No matter, if the developer is doing all these:
    88
    99`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`
    1213
    13 It wouldn't work and no error is produced even after running compilemessages, which can leave people baffled for a while.
     14etc.
    1415
    15 I would suggest adding a warning/error messages if the locale is used incorrectly. That would certainly be a great help.
     16we, just normalize the directory name to `zh_CN` and it would work.
    1617
    17 I can make a patch for this as well.
     18I'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.
Back to Top