Opened 6 years ago

Last modified 4 years ago

#29712 closed Cleanup/optimization

Add warning in makemessages command if the localecode with `l` flag is not correct — at Initial Version

Reported by: Sanyam Khurana Owned by: nobody
Component: Internationalization Version: dev
Severity: Normal Keywords:
Cc: Herbert Fortes Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The translations only work when the locale involving region code is generated as this:

zh_CN for Simplified Chinese

Notice here that the region code should be in capital letters for the django.po file in the directory to correctly work.

If we do makemessages as

python manage.py makemessages -l zh_cn
OR
python manage.py makemessages -l zh-cn

It wouldn't work and no error is produced even after running compilemessages, which can leave people baffled for a while.

I would suggest adding a warning/error messages if the locale is used incorrectly. That would certainly be a great help.

I can make a patch for this as well.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top