[Django] #24247: makemessages command should use case insensitivity when checking for paths in LOCALE_PATHS

19 views
Skip to first unread message

Django

unread,
Jan 29, 2015, 3:13:12 PM1/29/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
--------------------------------------+----------------------
Reporter: thyleung | Owner: thyleung
Type: Bug | Status: new
Component: Internationalization | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+----------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24247>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 29, 2015, 3:13:39 PM1/29/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------
Reporter: thyleung | Owner: thyleung
Type: Bug | Status: assigned
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by thyleung):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:1>

Django

unread,
Jan 29, 2015, 3:50:28 PM1/29/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------
Reporter: thyleung | Owner: thyleung

Type: Bug | Status: assigned
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:2>

Django

unread,
Jan 29, 2015, 4:27:39 PM1/29/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------
Reporter: thyleung | Owner: thyleung
Type: Bug | Status: closed
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* status: assigned => closed
* resolution: => wontfix


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:3>

Django

unread,
Feb 1, 2015, 2:46:32 PM2/1/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------

Reporter: thyleung | Owner: thyleung
Type: Bug | Status: new
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by thyleung):

* status: closed => new
* resolution: wontfix =>


Old description:

> 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.

New description:

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.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:4>

Django

unread,
Feb 1, 2015, 2:47:23 PM2/1/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------

Reporter: thyleung | Owner: thyleung
Type: Bug | Status: new
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by thyleung):

Provided rationale in ticket description.

--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:5>

Django

unread,
Feb 2, 2015, 3:00:44 AM2/2/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------
Reporter: thyleung | Owner: thyleung
Type: Bug | Status: closed
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* status: new => closed
* resolution: => wontfix


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:6>

Django

unread,
Feb 2, 2015, 3:59:30 AM2/2/15
to django-...@googlegroups.com
#24247: makemessages command should use case insensitivity when checking for paths
in LOCALE_PATHS
-------------------------------------+-------------------------------------
Reporter: thyleung | Owner: thyleung

Type: Bug | Status: closed
Component: | Version: 1.6
Internationalization |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24247#comment:7>

Reply all
Reply to author
Forward
0 new messages