summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2013-01-25 13:58:37 -0300
committerRamiro Morales <cramm0@gmail.com>2013-01-25 13:58:37 -0300
commitce27fb198dcce5dad47de83fc81119d3bb6567ce (patch)
tree793d3b421f75b33cee487bdfd2778a1e8b25bb16 /docs/topics
parent5b99d5a330fc412ce56b9e5f9cf0b971654da90c (diff)
Revert "Patch by Claude for #16084."
This reverts commit 2babab0bb351ff7a13fd23795f5e926a9bf95d22.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/i18n/translation.txt17
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 8ef51e4052..01f168bc10 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1543,9 +1543,24 @@ All message file repositories are structured the same way. They are:
* ``$PYTHONPATH/django/conf/locale/<language>/LC_MESSAGES/django.(po|mo)``
To create message files, you use the :djadmin:`django-admin.py makemessages <makemessages>`
-tool. And you use :djadmin:`django-admin.py compilemessages <compilemessages>`
+tool. You only need to be in the same directory where the ``locale/`` directory
+is located. And you use :djadmin:`django-admin.py compilemessages <compilemessages>`
to produce the binary ``.mo`` files that are used by ``gettext``.
You can also run :djadmin:`django-admin.py compilemessages
--settings=path.to.settings <compilemessages>` to make the compiler process all
the directories in your :setting:`LOCALE_PATHS` setting.
+
+Finally, you should give some thought to the structure of your translation
+files. If your applications need to be delivered to other users and will be used
+in other projects, you might want to use app-specific translations. But using
+app-specific translations and project-specific translations could produce weird
+problems with :djadmin:`makemessages`: it will traverse all directories below
+the current path and so might put message IDs into a unified, common message
+file for the current project that are already in application message files.
+
+The easiest way out is to store applications that are not part of the project
+(and so carry their own translations) outside the project tree. That way,
+:djadmin:`django-admin.py makemessages <makemessages>`, when ran on a project
+level will only extract strings that are connected to your explicit project and
+not strings that are distributed independently.