"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "i18next.js" between
i18next-22.4.11.tar.gz and i18next-22.4.12.tar.gz

About: i18next is an internationalization framework for browser or any other javascript environment.

i18next.js  (i18next-22.4.11):i18next.js  (i18next-22.4.12)
skipping to change at line 1052 skipping to change at line 1052
if (found) return; if (found) return;
var cleanedLng = _this.formatLanguageCode(code); var cleanedLng = _this.formatLanguageCode(code);
if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng; if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;
}); });
if (!found && this.options.supportedLngs) { if (!found && this.options.supportedLngs) {
codes.forEach(function (code) { codes.forEach(function (code) {
if (found) return; if (found) return;
var lngOnly = _this.getLanguagePartFromCode(code); var lngOnly = _this.getLanguagePartFromCode(code);
if (_this.isSupportedCode(lngOnly)) return found = lngOnly; if (_this.isSupportedCode(lngOnly)) return found = lngOnly;
found = _this.options.supportedLngs.find(function (supportedLng) { found = _this.options.supportedLngs.find(function (supportedLng) {
if (supportedLng === lngOnly) return supportedLng;
if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) ret
urn;
if (supportedLng.indexOf(lngOnly) === 0) return supportedLng; if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
}); });
}); });
} }
if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0]; if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
return found; return found;
} }
}, { }, {
key: "getFallbackCodes", key: "getFallbackCodes",
value: function getFallbackCodes(fallbacks, code) { value: function getFallbackCodes(fallbacks, code) {
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)