summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-08 16:41:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-08 16:41:55 +0000
commit3735f276603b0c040f3f8aaca64f151397d2cb9b (patch)
treef28acdd10698b1214bc349689bdbbbfe080bf191 /docs
parentafa98dba98e3ba7ccf77ec9ec41eb12b162ab76f (diff)
Fixed #5463 -- Allow alternate file extensions on files that are translated.
Patch from Jannis Leidel. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/django-admin.txt14
-rw-r--r--docs/i18n.txt15
-rw-r--r--docs/man/django-admin.16
3 files changed, 34 insertions, 1 deletions
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index 71c4cf545a..f827a7243b 100644
--- a/docs/django-admin.txt
+++ b/docs/django-admin.txt
@@ -412,6 +412,20 @@ Example usage::
django-admin.py makemessages --all
+--extension
+~~~~~~~~~~~
+
+Use the ``--extension`` or ``-e`` option to specify a list of file extensions
+to examine (default: ".html").
+
+Example usage::
+
+ django-admin.py makemessages --locale=de --extension xhtml
+
+Separate multiple extensions with commas or use -e or --extension multiple times::
+
+ django-admin.py makemessages --locale=de --extension=html,txt --extension xml
+
--locale
~~~~~~~~
diff --git a/docs/i18n.txt b/docs/i18n.txt
index 5269024e96..62d78fb224 100644
--- a/docs/i18n.txt
+++ b/docs/i18n.txt
@@ -426,6 +426,21 @@ If run over your project source tree or your application source tree, it will
do the same, but the location of the locale directory is ``locale/LANG/LC_MESSAGES``
(note the missing ``conf`` prefix).
+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
+``--extension`` or ``-e`` option to specify the file extensions to examine::
+
+ django-admin.py makemessages -l de -e txt
+
+Separate multiple extensions with commas and/or use ``-e`` or ``--extension`` multiple times::
+
+ django-admin.py makemessages -l=de -e=html,txt -e xml
+
+When `creating JavaScript translation catalogs`_ you need to use the special
+'djangojs' domain, **not** ``-e js``.
+
+.. _create a JavaScript translation catalog: #creating-javascript-translation-catalogs
+
.. admonition:: No gettext?
If you don't have the ``gettext`` utilities installed,
diff --git a/docs/man/django-admin.1 b/docs/man/django-admin.1
index c482a3fc6e..2f4b5a02d8 100644
--- a/docs/man/django-admin.1
+++ b/docs/man/django-admin.1
@@ -49,7 +49,7 @@ Executes
.B sqlall
for the given app(s) in the current database.
.TP
-.BI "makemessages [" "\-\-locale=LOCALE" "] [" "\-\-domain=DOMAIN" "] [" "\-\-all" "]"
+.BI "makemessages [" "\-\-locale=LOCALE" "] [" "\-\-domain=DOMAIN" "] [" "\-\-extension=EXTENSION" "] [" "\-\-all" "]"
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.
@@ -154,6 +154,10 @@ The locale to process when using makemessages or compilemessages.
.I \-d, \-\-domain=DOMAIN
The domain of the message files (default: "django") when using makemessages.
.TP
+.I \-e, \-\-extension=EXTENSION
+The file extension(s) to examine (default: ".html", separate multiple
+extensions with commas, or use -e multiple times).
+.TP
.I \-a, \-\-all
Process all available locales when using makemessages.
.SH "ENVIRONMENT"