dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16b7551
)
Fix for CLDR plural rule parser for old browsers without String.trim
author
Brion Vibber
<brion@pobox.com>
Fri, 28 Feb 2014 21:13:02 +0000
(13:13 -0800)
committer
Brion Vibber
<brion@pobox.com>
Fri, 28 Feb 2014 21:16:42 +0000
(13:16 -0800)
This fixes MobileFrontend's "last modified" message on Kindle 3.4
Submitted upstream as https://github.com/santhoshtr/CLDRPluralRuleParser/pull/10
Bug: 62072
Change-Id: I350264847417f521c111e3cb81da46805608425a
resources/mediawiki.libs/CLDRPluralRuleParser.js
patch
|
blob
|
history
diff --git
a/resources/mediawiki.libs/CLDRPluralRuleParser.js
b/resources/mediawiki.libs/CLDRPluralRuleParser.js
index
3def37c
..
83c2524
100644
(file)
--- a/
resources/mediawiki.libs/CLDRPluralRuleParser.js
+++ b/
resources/mediawiki.libs/CLDRPluralRuleParser.js
@@
-45,7
+45,7
@@
function pluralRuleParser(rule, number) {
*/
// we don't evaluate the samples section of the rule. Ignore it.
- rule = rule.split('@')[0].
trim(
);
+ rule = rule.split('@')[0].
replace(/^\s*/, '').replace(/\s*$/, ''
);
if (!rule.length) {
// empty rule or 'other' rule.