Commit 970186cb authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't run pluralrule string through sprintf (bug #996987)



The pluralrule string is used to generate plural forms in javascript,
so % signs should not be replaced.  Using get_raw_string rather than
get_string reads the string as-is, without running it through sprintf.

Change-Id: I709b8ef623cdc4df24828866dc62dd229107ef60
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent d0204b9f
......@@ -330,7 +330,7 @@ EOF;
$stringjs = '<script type="text/javascript">';
$stringjs .= 'var strings = ' . json_encode($strings) . ';';
$stringjs .= "\nfunction plural(n) { return " . get_string('pluralrule', 'langconfig') . "; }\n";
$stringjs .= "\nfunction plural(n) { return " . get_raw_string('pluralrule', 'langconfig') . "; }\n";
$stringjs .= '</script>';
// stylesheet set up - if we're in a plugin also get its stylesheet
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment