Commit 40f0a84c authored by Matthew Somerville's avatar Matthew Somerville Committed by Tim Graham
Browse files

Fixed #24159 -- Made compilemessages run across all apps.

Updated the command to match the documentation, which states it
runs over all .po files.
parent 7bda2d8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ answer newbie questions, and generally made Django that much better:
    Matt Deacalion Stevens <matt@dirtymonkey.co.uk>
    Matt Dennenbaum
    Matthew Flanagan <http://wadofstuff.blogspot.com>
    Matthew Somerville <matthew-github@dracos.co.uk>
    Matthew Somerville <matthew-django@dracos.co.uk>
    Matthew Tretter <m@tthewwithanm.com>
    Matthias Kestenholz <mk@406.ch>
    Matthias Pronk <django@masida.nl>
+6 −0
Original line number Diff line number Diff line
@@ -61,6 +61,12 @@ class Command(BaseCommand):
            from django.conf import settings
            basedirs.extend(upath(path) for path in settings.LOCALE_PATHS)

        # Walk entire tree, looking for locale directories
        for dirpath, dirnames, filenames in os.walk('.', topdown=True):
            for dirname in dirnames:
                if dirname == 'locale':
                    basedirs.append(os.path.join(dirpath, dirname))

        # Gather existing directories.
        basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))

+5 −0
Original line number Diff line number Diff line
@@ -161,6 +161,11 @@ are excluded.
You can pass ``--use-fuzzy`` option (or ``-f``) to include fuzzy translations
into compiled files.

.. versionchanged:: 1.9

    ``compilemessages`` now matches the operation of :djadmin:`makemessages`,
    scanning the project tree for ``.po`` files to compile.

.. versionchanged:: 1.8

    Added ``--exclude`` and ``--use-fuzzy`` options.
+4 −0
Original line number Diff line number Diff line
@@ -193,6 +193,10 @@ Internationalization
  :ttag:`get_language_info` template tag. Also added a corresponding template
  filter: :tfilter:`language_name_translated`.

* You can now run :djadmin:`compilemessages` from the root directory of your
  project and it will find all the app message files that were created by
  :djadmin:`makemessages`.

Management Commands
^^^^^^^^^^^^^^^^^^^

+5 −0
Original line number Diff line number Diff line
@@ -1583,6 +1583,11 @@ which you ran :djadmin:`django-admin makemessages <makemessages>`, run

That's it. Your translations are ready for use.

.. versionchanged:: 1.9

    ``compilemessages`` now matches the operation of :djadmin:`makemessages`,
    scanning the project tree for ``.po`` files to compile.

.. admonition:: Working on Windows?

   If you're using Windows and need to install the GNU gettext utilities so
Loading