Hi, I'm Stephen, a Djangonaut contributing to Django core. This was my second ticket, and it looked tiny: a one-line capitalization bug in makemessages . It turned into a lesson in code review, minimal diffs, and a lot of git π.
Here is the story.
The bug: a helpful message that gives wrong advice
Django's makemessages command extracts translatable strings into .po files, one folder per locale. If you pass a locale that doesn't exist, it tries to help by suggesting a valid one.
Here is what happened when you typed a script-based locale like Simplified Chinese:
$ python manage.py makemessages --locale zh-hans invalid locale zh-hans, did you mean zh_HAns?
Enter fullscreen mode
Exit fullscreen mode
zh-hans is invalid because Django expects an underscore. But the suggestion, zh_HAns , is also invalid.β¦