From 63f9b6712909970693a9e509d13218856306bbd6 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 19 Jun 2011 11:24:25 +0000 Subject: [PATCH] Added '.txt' to list of file extensions that the makemessages management command automatically scans. Refs #12202. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16437 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management/commands/makemessages.py | 2 +- docs/ref/django-admin.txt | 4 ++-- docs/topics/i18n/localization.txt | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index 899775d020..0bc0e36679 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -356,7 +356,7 @@ class Command(NoArgsCommand): if domain == 'djangojs': extensions = handle_extensions(extensions or ['js']) else: - extensions = handle_extensions(extensions or ['html']) + extensions = handle_extensions(extensions or ['html', 'txt']) if verbosity > 1: sys.stdout.write('examining files with the extensions: %s\n' diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 0b116f8c23..36b7bcda7c 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -417,7 +417,7 @@ Example usage:: .. django-admin-option:: --extension Use the ``--extension`` or ``-e`` option to specify a list of file extensions -to examine (default: ".html"). +to examine (default: ".html", ".txt"). Example usage:: @@ -438,7 +438,7 @@ 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) + * ``django`` for all ``*.py``, ``*.html`` and ``*.txt`` files (default) * ``djangojs`` for ``*.js`` files .. django-admin-option:: --symlinks diff --git a/docs/topics/i18n/localization.txt b/docs/topics/i18n/localization.txt index 4215201f35..a24db8d463 100644 --- a/docs/topics/i18n/localization.txt +++ b/docs/topics/i18n/localization.txt @@ -84,8 +84,9 @@ 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 -``--extension`` or ``-e`` option to specify the file extensions to examine:: +``.html`` or ``.txt`` 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