Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#24247 closed Bug (wontfix)

makemessages command should use case insensitivity when checking for paths in LOCALE_PATHS

Reported by: Teri Owned by: Teri
Component: Internationalization Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Teri)

The makemessages command should use case insensitivity when checking for paths in LOCALE_PATHS

For example, I set LOCALE_PATHS to the path ‘locale’

The .po files will only be generated if the locale folder is named with the same lowercase spelling of ‘locale’.

If the locale folder has the name “LOCALE”, Django will not find the folder ‘locale’, and makemessages will throw out this command error:

Error: This script should be run from the Django SVN tree or your project or app tree. If you did indeed run it from the SVN checkout or your project or application, maybe you are just missing the conf/locale (in the django tree) or locale (for project and application) directory? It is not created automatically, you have to create it by hand if you want to enable i18n for your project or application.

Rationale: The problem I came across was that certain translations were not showing in Rosetta on the beta server (web server), but were showing on the development server (Mac OS System). After much investigation, it was because the web server was case sensitive, thus Rosetta was not able to recognize the LOCALE_PATH and bring in the proper translations.

Change History (7)

comment:1 by Teri, 9 years ago

Status: newassigned

comment:2 by Tim Graham, 9 years ago

What is the use case for using uppercase in the name?

comment:3 by Claude Paroz, 9 years ago

Resolution: wontfix
Status: assignedclosed

Unless you provide us with more convincing arguments, I don't see any reason to ignore case.

comment:4 by Teri, 9 years ago

Description: modified (diff)
Resolution: wontfix
Status: closednew

comment:5 by Teri, 9 years ago

Provided rationale in ticket description.

comment:6 by Claude Paroz, 9 years ago

Resolution: wontfix
Status: newclosed

Thanks for complementing the ticket. However, I'm not more convinced as before. You can always try to raise this issue on the django-developers mailing list, but as for me, you should respect case. I don't remember about other parts of Django code handling paths case insensitively, but I may be wrong.

comment:7 by Aymeric Augustin, 9 years ago

Yes, Django follows the "Linux" convention of requiring correct case. It doesn't make sense to have a special case just here.

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