[Django] #24159: compilemessages does not behave the same as makemessages

20 views
Skip to first unread message

Django

unread,
Jan 16, 2015, 10:47:12 AM1/16/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+--------------------
Reporter: dracos | Owner: nobody
Type: Uncategorized | Status: new
Component: Internationalization | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
makemessages was upgraded in Django 1.7 so that it would automatically put
app strings in app specific locale files and other strings in the first
LOCALE_PATHS entry, as explained in the "Changed in Django 1.7" part of
https://docs.djangoproject.com/en/1.7/topics/i18n/translation/#message-
files. This was ticket #16084.

Ticket #20451 was marked as a duplicate of this ticket, but ticket #16084
only improved makemessages, it didn't change compilemessages at all.
compilemessages, when run from the same directory as manage.py, will only
compile 'conf/locale', 'locale' and the LOCALE_PATHS .po files, it will
not compile any app specific locale files that were created by a call to
makemessages.

The documentation on compilemessages does not appear to tell you this,
https://docs.djangoproject.com/en/1.7/topics/i18n/translation/#compiling-
message-files says "This tool runs over all available .po files and
creates .mo files". It then says you should run it "In the same directory
from which you ran django-admin.py makemessages" which I think is
referring to the pre-1.7 behaviour of having to run it in more than one
place.

I'm not sure whether it would be better for compilemessages to have the
same behaviour as makemessages or for the documentation to update to point
out you still need to run it in each app if they have separate locale
entries.

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

Django

unread,
Jan 16, 2015, 12:19:53 PM1/16/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_docs: => 0
* needs_better_patch: => 0
* type: Uncategorized => New feature
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Good point. Unless you see major drawbacks, I think `compilemessages`
should mirror `makemessages` behavior with regard to affected files.

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

Django

unread,
Apr 16, 2015, 3:34:54 AM4/16/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by claudep):

#24647 was closed as a duplicate

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

Django

unread,
Apr 16, 2015, 8:02:12 AM4/16/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by dracos):

I have made a pull request for this at
https://github.com/django/django/pull/4521
It uses the same algorithm makemessages is doing, walking down the tree
and looking for directories named 'locale'.

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

Django

unread,
Apr 20, 2015, 8:12:36 PM4/20/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


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

Django

unread,
May 26, 2015, 2:12:03 PM5/26/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: nobody
Type: New feature | Status: new
Component: Internationalization | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

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

* needs_docs: 0 => 1
* version: 1.7 => master


Comment:

Code looks okay to me, but needs documentation as noted on the pull
request.

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

Django

unread,
May 31, 2015, 11:56:24 AM5/31/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: dracos
Type: New feature | Status: assigned

Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

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

* owner: nobody => dracos
* status: new => assigned


Comment:

Will work on at DjangoCon EU sprint :)

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

Django

unread,
Jun 1, 2015, 10:10:03 AM6/1/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: dracos
Type: New feature | Status: assigned
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_docs: 1 => 0


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

Django

unread,
Jun 2, 2015, 12:17:19 PM6/2/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: dracos
Type: New feature | Status: assigned
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:8>

Django

unread,
Jun 4, 2015, 6:44:22 AM6/4/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
--------------------------------------+------------------------------------
Reporter: dracos | Owner: dracos
Type: New feature | Status: assigned
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:9>

Django

unread,
Jun 4, 2015, 8:59:47 AM6/4/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
-------------------------------------+-------------------------------------

Reporter: dracos | Owner: dracos
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

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

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

* stage: Accepted => Ready for checkin


Comment:

Claude, may I ask for your review?

--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:10>

Django

unread,
Jun 4, 2015, 10:24:11 AM6/4/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
-------------------------------------+-------------------------------------
Reporter: dracos | Owner: dracos
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by claudep):

Good to go!

--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:11>

Django

unread,
Jun 4, 2015, 9:02:20 PM6/4/15
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
-------------------------------------+-------------------------------------
Reporter: dracos | Owner: dracos
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"40f0a84cb151669313faadf857aaddd18d39aaeb" 40f0a84c]:
{{{
#!CommitTicketReference repository=""
revision="40f0a84cb151669313faadf857aaddd18d39aaeb"
Fixed #24159 -- Made compilemessages run across all apps.

Updated the command to match the documentation, which states it
runs over all .po files.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:12>

Django

unread,
Jun 20, 2018, 9:15:57 AM6/20/18
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
-------------------------------------+-------------------------------------
Reporter: Matthew Somerville | Owner: Matthew
| Somerville

Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by Marcin Nowak):

Hi.

I'm using buildout. Both commands, compilemessages (after #24159 patch)
and makemessages, introduced new issues. They scan all nested directories,
they're reading (makemessages) and creating (compilemessages) files in
external eggs and cloned repositories, even in django itself and unused
but stored on disk packages. There is no possibility to exclude or include
directories to search. And any broken locale file in any package can break
compilation process.

--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:13>

Django

unread,
Jun 20, 2018, 1:13:30 PM6/20/18
to django-...@googlegroups.com
#24159: compilemessages does not behave the same as makemessages
-------------------------------------+-------------------------------------
Reporter: Matthew Somerville | Owner: Matthew
| Somerville
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by Claude Paroz):

Please open appropriate tickets with your issues.

> And any broken locale file in any package can break compilation process.

This is fixed in master (through #24384).

--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:14>

Reply all
Reply to author
Forward
0 new messages