Index: ext/common.js |
diff --git a/ext/common.js b/ext/common.js |
index 630e1cabbbd7e304b71dd912981f4a448b726b2a..57641a5e2dd748f4c671443d4579032a1c7128a4 100644 |
--- a/ext/common.js |
+++ b/ext/common.js |
@@ -98,24 +98,13 @@ |
return candidates; |
}; |
- var initCatalog = function(uiLocale) |
- { |
- var bidiDir = /^(ar|fa|he|ug|ur)(-|$)/.test(uiLocale) ? "rtl" : "ltr"; |
- var catalog = Object.create(null); |
- |
- catalog["@@ui_locale"] = [uiLocale.replace(/-/g, "_"), []]; |
- catalog["@@bidi_dir" ] = [bidiDir, []]; |
- |
- return catalog; |
- }; |
- |
var selectedLocale = window.navigator.language; |
var match = /[?&]locale=([\w\-]+)/.exec(window.location.search); |
if (match) |
selectedLocale = match[1]; |
var locales = getLocaleCandidates(selectedLocale); |
- var catalog = initCatalog(locales[0]); |
+ var catalog = Object.create(null); |
var catalogFile = window.location.pathname.replace(/.*\//, "").replace(/\..*/, "") + ".json"; |
var replacePlaceholder = function(text, placeholder, content) |
@@ -168,6 +157,7 @@ |
}; |
global.ext.i18n = { |
+ locale: locales[0], |
getMessage: function(msgId, substitutions) |
{ |
while (true) |