mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #4414 -- Fixed Javascript message translation to also work when there is more than one format marker in a string. Thanks, tobias@neuyork.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9d7dc0c4bf
commit
537b16ca97
1
AUTHORS
1
AUTHORS
@ -257,6 +257,7 @@ answer newbie questions, and generally made Django that much better:
|
|||||||
thebjorn <bp@datakortet.no>
|
thebjorn <bp@datakortet.no>
|
||||||
Zach Thompson <zthompson47@gmail.com>
|
Zach Thompson <zthompson47@gmail.com>
|
||||||
tibimicu@gmax.net
|
tibimicu@gmax.net
|
||||||
|
tobias@neuyork.de
|
||||||
Tom Tobin
|
Tom Tobin
|
||||||
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
||||||
torne-django@wolfpuppy.org.uk
|
torne-django@wolfpuppy.org.uk
|
||||||
|
@ -69,9 +69,9 @@ function pluralidx(count) { return (count == 1) ? 0 : 1; }
|
|||||||
InterPolate = r"""
|
InterPolate = r"""
|
||||||
function interpolate(fmt, obj, named) {
|
function interpolate(fmt, obj, named) {
|
||||||
if (named) {
|
if (named) {
|
||||||
return fmt.replace(/%\(\w+\)s/, function(match){return String(obj[match.slice(2,-2)])});
|
return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
|
||||||
} else {
|
} else {
|
||||||
return fmt.replace(/%s/, function(match){return String(obj.shift())});
|
return fmt.replace(/%s/g, function(match){return String(obj.shift())});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user