From 2fa3da361028123a10e708ada867f159802c15bf Mon Sep 17 00:00:00 2001 From: Winston Sung Date: Fri, 1 Dec 2023 15:59:34 +0000 Subject: [PATCH] ULS: Fix JavaScript language fallback mapping being overridden Follow-up of commit 728421587938a768de9259e68e498c53ff13d2b9 (Change-Id I9f68e0744bf0c730aa3a410901a9b536af7623fc) Bug: T348376 Change-Id: Ic4331f635da2ee3de1211448838bc8cf145a808e --- resources/js/ext.uls.i18n.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/js/ext.uls.i18n.js b/resources/js/ext.uls.i18n.js index 4123fd64..ae7a7a7a 100644 --- a/resources/js/ext.uls.i18n.js +++ b/resources/js/ext.uls.i18n.js @@ -27,8 +27,16 @@ locale: mw.config.get( 'wgUserLanguage' ) } ); - // ApiULSLocalization handles fallback in ULS - $.i18n.fallbacks = {}; + /** + * T53923: Fix JavaScript error with language fallbacks. + * ULS use ApiULSLocalization to handle language fallbacks. + * + * T348376: Fix JavaScript language fallback mapping being + * overridden. + * This should not override the original mapping, as it's not + * only used by ULS. + */ + $.i18n.fallbacks = $.i18n.fallbacks || {}; /** * Load localization messages for a locale to the jquery.i18n