Fixed #6380 - Follow symlinks when examining source code and templates for translation strings.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2010-02-16 12:14:27 +00:00
parent 71da5f62da
commit fef575a7f9
6 changed files with 83 additions and 14 deletions

View file

@ -46,7 +46,7 @@ Executes
.B sqlall
for the given app(s) in the current database.
.TP
.BI "makemessages [" "\-\-locale=LOCALE" "] [" "\-\-domain=DOMAIN" "] [" "\-\-extension=EXTENSION" "] [" "\-\-all" "]"
.BI "makemessages [" "\-\-locale=LOCALE" "] [" "\-\-domain=DOMAIN" "] [" "\-\-extension=EXTENSION" "] [" "\-\-all" "] [" "\-\-symlinks" "]"
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.
@ -155,6 +155,10 @@ The domain of the message files (default: "django") when using makemessages.
The file extension(s) to examine (default: ".html", separate multiple
extensions with commas, or use -e multiple times).
.TP
.I \-e, \-\-symlinks
Follows symlinks to directories when examining source code and templates for
translation strings.
.TP
.I \-a, \-\-all
Process all available locales when using makemessages..SH "ENVIRONMENT"
.TP

View file

@ -471,8 +471,17 @@ Example usage::
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
* ``django`` for all ``*.py`` and ``*.html`` files (default)
* ``djangojs`` for ``*.js`` files
.. django-admin-option:: --symlinks
Use the ``--symlinks`` or ``-s`` option to follow symlinks to directories when
looking for new translation strings.
Example usage::
django-admin.py makemessages --locale=de --symlinks
reset <appname appname ...>
---------------------------

View file

@ -78,10 +78,10 @@ The script should be run from one of two places:
* The root directory of your Django project.
* The root directory of your Django app.
Th script runs over your project source tree or your application source tree and
pulls out all strings marked for translation. It creates (or updates) a message
file in the directory ``locale/LANG/LC_MESSAGES``. In the ``de`` example, the
file will be ``locale/de/LC_MESSAGES/django.po``.
The script runs over your project source tree or your application source tree
and pulls out all strings marked for translation. It creates (or updates) a
message file in the directory ``locale/LANG/LC_MESSAGES``. In the ``de``
example, the file will be ``locale/de/LC_MESSAGES/django.po``.
By default ``django-admin.py makemessages`` examines every file that has the
``.html`` file extension. In case you want to override that default, use the