Author: mtredinnick
Date: 2006-07-13 21:57:10 -0500 (Thu, 13 Jul 2006)
New Revision: 3345
Modified:
django/trunk/docs/i18n.txt
Log:
Fixed #2347 -- documented the use of "and" in the blocktrans template tag.
Modified: django/trunk/docs/i18n.txt
===================================================================
--- django/trunk/docs/i18n.txt 2006-07-14 02:55:42 UTC (rev 3344)
+++ django/trunk/docs/i18n.txt 2006-07-14 02:57:10 UTC (rev 3345)
@@ -224,6 +224,13 @@
This will have {{ myvar }} inside.
{% endblocktrans %}
+If you need to bind more than one expression inside a ``blocktrans`` tag,
+separate the pieces with ``and``::
+
+ {% blocktrans with book|title as book_t and author|title as author_t %}
+ This is {{ book_t }} by {{ author_t }}
+ {% endblocktrans %}
+
To pluralize, specify both the singular and plural forms with the
``{% plural %}`` tag, which appears within ``{% blocktrans %}`` and
``{% endblocktrans %}``. Example::
@@ -306,7 +313,7 @@
``conf/locale``. In the ``de`` example, the file will be
``conf/locale/de/LC_MESSAGES/django.po``.
-If run over your project source tree or your appliation source tree, it will
+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).
@@ -349,7 +356,7 @@
Long messages are a special case. There, the first string directly after the
``msgstr`` (or ``msgid``) is an empty string. Then the content itself will be
written over the next few lines as one string per line. Those strings are
-directlyconcatenated. Don't forget trailing spaces within the strings;
+directly concatenated. Don't forget trailing spaces within the strings;
otherwise, they'll be tacked together without whitespace!
.. admonition:: Mind your charset
@@ -647,7 +654,7 @@
-------------------------------
The main solution to these problems is the ``javascript_catalog`` view, which
-sends out a JavaScript code library with functions that mimick the ``gettext``
+sends out a JavaScript code library with functions that mimic the ``gettext``
interface, plus an array of translation strings. Those translation strings are
taken from the application, project or Django core, according to what you
specify in either the {{{info_dict}}} or the URL.
@@ -665,7 +672,7 @@
Each string in ``packages`` should be in Python dotted-package syntax (the
same format as the strings in ``INSTALLED_APPS``) and should refer to a package
that contains a ``locale`` directory. If you specify multiple packages, all
-those catalogs aremerged into one catalog. This is useful if you have
+those catalogs are merged into one catalog. This is useful if you have
JavaScript that uses strings from different applications.
You can make the view dynamic by putting the packages into the URL pattern::
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---