Author: russellm
Date: 2010-05-08 23:25:34 -0500 (Sat, 08 May 2010)
New Revision: 13147

Modified:
   django/trunk/docs/topics/i18n/internationalization.txt
Log:
Fixed #13417 -- Clarified the use of the djangojs domain for translation. 
Thanks to stephaner for the report and initial patch, and Ramiro Morales for 
his additional markup.

Modified: django/trunk/docs/topics/i18n/internationalization.txt
===================================================================
--- django/trunk/docs/topics/i18n/internationalization.txt      2010-05-09 
04:24:58 UTC (rev 13146)
+++ django/trunk/docs/topics/i18n/internationalization.txt      2010-05-09 
04:25:34 UTC (rev 13147)
@@ -449,12 +449,16 @@
 The ``javascript_catalog`` view
 -------------------------------
 
-The main solution to these problems is the ``javascript_catalog`` view, which
-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.
+.. module:: django.views.i18n
 
+.. function:: javascript_catalog(request, domain='djangojs', packages=None)
+
+The main solution to these problems is the 
:meth:`django.views.i18n.javascript_catalog`
+view, which 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.
+
 You hook it up like this::
 
     js_info_dict = {
@@ -471,6 +475,9 @@
 those catalogs are merged into one catalog. This is useful if you have
 JavaScript that uses strings from different applications.
 
+By default, the view uses the ``djangojs`` gettext domain. This can be
+changed by altering the ``domain`` argument.
+
 You can make the view dynamic by putting the packages into the URL pattern::
 
     urlpatterns = patterns('',
@@ -541,7 +548,9 @@
 The ``set_language`` redirect view
 ==================================
 
-As a convenience, Django comes with a view, ``django.views.i18n.set_language``,
+.. function:: set_language(request)
+
+As a convenience, Django comes with a view, 
:meth:`django.views.i18n.set_language`,
 that sets a user's language preference and redirects back to the previous page.
 
 Activate this view by adding the following line to your URLconf::

-- 
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?hl=en.

Reply via email to