yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #39205
[Bug 1495815] Re: Hard to translate "Displaying %s of %s items" (cannot control the order of substitutions)
** Changed in: horizon
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1495815
Title:
Hard to translate "Displaying %s of %s items" (cannot control the
order of substitutions)
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
horizon/locale/djangojs.pot has the following string.
#: static/framework/util/filters/filters.js:177
#, python-format
msgid "Displaying %s of %s items"
msgstr ""
In some languages, there is a need to swap the order of the two %s.
%s should be replaced by %(keyword)s (keyword substitution).
The current horizon/static/framework/util/filters/filters.js is as
follows:
176 var total = ensureNonNegative(totalInput);
177 var format = gettext('Displaying %s of %s items');
178 return interpolate(format, [count, total]);
L.177 should be:
var format = gettext('Displaying %(count)s of %(total)s items');
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1495815/+subscriptions
References