summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--django/views/i18n.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 39ce6f8663..9f54475150 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -257,6 +257,7 @@ answer newbie questions, and generally made Django that much better:
thebjorn <bp@datakortet.no>
Zach Thompson <zthompson47@gmail.com>
tibimicu@gmax.net
+ tobias@neuyork.de
Tom Tobin
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
torne-django@wolfpuppy.org.uk
diff --git a/django/views/i18n.py b/django/views/i18n.py
index 0fec6b6c6f..320caf37d7 100644
--- a/django/views/i18n.py
+++ b/django/views/i18n.py
@@ -69,9 +69,9 @@ function pluralidx(count) { return (count == 1) ? 0 : 1; }
InterPolate = r"""
function interpolate(fmt, obj, 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 {
- return fmt.replace(/%s/, function(match){return String(obj.shift())});
+ return fmt.replace(/%s/g, function(match){return String(obj.shift())});
}
}
"""