Fixed #5522 -- Moved make-messages, compile-messages and daily-cleanup into django-admin.py.

They are now called  "makemessages", "compilemessages" and "cleanup". This is
backwards incompatible for make-messages.py and compile-messages.py, although
the old executables still exist for now and print an error pointing the caller
to the right command to call.

This reduces the number of binaries and man pages Django needs to install.

Patch from Janis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-07-06 06:39:44 +00:00
parent bff075973a
commit 3cfa3cbd07
16 changed files with 418 additions and 381 deletions

View file

@ -85,6 +85,32 @@ your admin's index page. See `Tutorial 2`_ for more information.
.. _Tutorial 2: ../tutorial02/
cleanup
-------
**New in Django development version**
Can be run as a cronjob or directly to clean out old data from the database
(only expired sessions at the moment).
compilemessages
---------------
**New in Django development version**
Compiles .po files created with ``makemessages`` to .mo files for use with
the builtin gettext support. See the `i18n documentation`_ for details.
--locale
~~~~~~~~
Use the ``--locale`` or ``-l`` option to specify the locale to process.
If not provided all locales are processed.
Example usage::
django-admin.py compilemessages --locale=br_PT
createcachetable <tablename>
----------------------------
@ -362,6 +388,62 @@ Example usage::
django-admin.py loaddata --verbosity=2
makemessages
------------
**New in Django development version**
Runs over the entire source tree of the current directory and pulls out all
strings marked for translation. It creates (or updates) a message file in the
conf/locale (in the django tree) or locale (for project and application)
directory. After making changes to the messages files you need to compile them
with ``compilemessages`` for use with the builtin gettext support. See the
`i18n documentation`_ for details.
.. _i18n documentation: ../i18n/#how-to-create-language-files
--all
~~~~~
Use the ``--all`` or ``-a`` option to update the message files for all
available languages.
Example usage::
django-admin.py makemessages --all
--locale
~~~~~~~~
Use the ``--locale`` or ``-l`` option to specify the locale to process.
Example usage::
django-admin.py makemessages --locale=br_PT
--domain
~~~~~~~~
Use the ``--domain`` or ``-d`` option to change the domain of the messages files.
Currently supported:
* ``django`` for all ``*.py`` and ``*.html`` files (default)
* ``djangojs`` for ``*.js`` files
--verbosity
~~~~~~~~~~~
Use ``--verbosity`` or ``-v`` to specify the amount of notification and debug
information that ``django-admin.py`` should print to the console.
* ``0`` means no output.
* ``1`` means normal output (default).
* ``2`` means verbose output.
Example usage::
django-admin.py makemessages --verbosity=2
reset <appname appname ...>
---------------------------