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.
* 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>
Comment (by claudep):
#24647 was closed as a duplicate
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:2>
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>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:4>
* 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>
* owner: nobody => dracos
* status: new => assigned
Comment:
Will work on at DjangoCon EU sprint :)
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:6>
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:7>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:8>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:9>
* stage: Accepted => Ready for checkin
Comment:
Claude, may I ask for your review?
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:10>
Comment (by claudep):
Good to go!
--
Ticket URL: <https://code.djangoproject.com/ticket/24159#comment:11>
* 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>
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>
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>