Respect wgTranslateNumerals in Cite footnote markers

Some wikis prefer to use Western Arabic numerals rather than the
digit transformation table associated with the content language
script.  For these, we should respect the existing
$wgTranslateNumerals configuration settings.

Bug: T370585
Change-Id: I663ae28c5b5d4fdd66b8590eb0b453ec25c2db84
This commit is contained in:
Adam Wight 2024-07-23 15:07:35 +02:00 committed by WMDE-Fisch
parent d4573aab0d
commit f8c09895e5

View file

@ -98,7 +98,8 @@ ve.dm.MWDocumentReferences.prototype.updateGroup = function ( groupName ) {
*/
ve.dm.MWDocumentReferences.static.contentLangDigits = function ( num ) {
const contentLang = mw.config.get( 'wgContentLanguage' );
const digitLookup = mw.language.getData( contentLang, 'digitTransformTable' );
const digitLookup = mw.config.get( 'wgTranslateNumerals' ) &&
mw.language.getData( contentLang, 'digitTransformTable' );
const numString = String( num );
if ( !digitLookup ) {
return numString;