jenkins-bot has submitted this change and it was merged.

Change subject: Update jquery.i18n to b9906c0
......................................................................


Update jquery.i18n to b9906c0

Changes:
* Add ability to rely on default configuration when loading messages.

Change-Id: Ic2c00526c0d5b1a60cac81925e2bc24228d8767c
---
M lib/jquery.i18n/jquery.i18n.js
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/jquery.i18n/jquery.i18n.js b/lib/jquery.i18n/jquery.i18n.js
index 461ec94..ccd36b4 100644
--- a/lib/jquery.i18n/jquery.i18n.js
+++ b/lib/jquery.i18n/jquery.i18n.js
@@ -138,10 +138,15 @@
                 */
                load: function ( source, locale ) {
                        var fallbackLocales, locIndex, fallbackLocale, 
sourceMap = {};
-
+                       if (!source && !locale) {
+                               source = 'i18n/' + $.i18n().locale + '.json';
+                               locale = $.i18n().locale;
+                       }
                        if ( typeof source === 'string' &&
                                source.split('.').pop() !== 'json'
                        ) {
+                               // Load specified locale then check for 
fallbacks when directory is specified in load()
+                               sourceMap[locale] = source + '/' + locale + 
'.json';
                                fallbackLocales = ( $.i18n.fallbacks[locale] || 
[] )
                                        .concat( this.options.fallbackLocale );
                                for ( locIndex in fallbackLocales ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/182063
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2c00526c0d5b1a60cac81925e2bc24228d8767c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: KartikMistry <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to