fixed a small bug in the positional interpol sample in i18n.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9cdcef97e1
commit
e19edfbea0
|
@ -619,7 +619,7 @@ There even is a ``ngettext`` interface and a string interpolation function::
|
||||||
The ``interpolate`` function both supports positional interpolation and named interpolation.
|
The ``interpolate`` function both supports positional interpolation and named interpolation.
|
||||||
So the above could have been written as::
|
So the above could have been written as::
|
||||||
|
|
||||||
s = interpolate(ngettext('this is %s object', 'this are %s objects', 11), 11);
|
s = interpolate(ngettext('this is %s object', 'this are %s objects', 11), [11]);
|
||||||
|
|
||||||
The interpolation syntax is borrowed from Python. You shouldn't go over the top with
|
The interpolation syntax is borrowed from Python. You shouldn't go over the top with
|
||||||
string interpolation, though: this is still JavaScript, so the code will have to do
|
string interpolation, though: this is still JavaScript, so the code will have to do
|
||||||
|
|
Loading…
Reference in New Issue