summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki.language/mediawiki.language.numbers.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/src/mediawiki.language/mediawiki.language.numbers.js')
-rw-r--r--resources/src/mediawiki.language/mediawiki.language.numbers.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/resources/src/mediawiki.language/mediawiki.language.numbers.js b/resources/src/mediawiki.language/mediawiki.language.numbers.js
index a0b81410..3c13055b 100644
--- a/resources/src/mediawiki.language/mediawiki.language.numbers.js
+++ b/resources/src/mediawiki.language/mediawiki.language.numbers.js
@@ -187,8 +187,12 @@
tmp[ transformTable[ i ] ] = i;
}
transformTable = tmp;
- numberString = num + '';
+ numberString = String( num );
} else {
+ // Ignore transform table if wgTranslateNumerals is false
+ if ( !mw.config.get( 'wgTranslateNumerals' ) ) {
+ transformTable = [];
+ }
numberString = mw.language.commafy( num, pattern );
}