| Index: safari/ext/common.js |
| =================================================================== |
| --- a/safari/ext/common.js |
| +++ b/safari/ext/common.js |
| @@ -104,8 +104,19 @@ |
| return candidates; |
| }; |
| + var initCatalog = function(uiLocale) |
| + { |
| + var bidiDir = /^(ar|fa|he|ug|ur)(_|$)/.test(uiLocale) ? "rtl" : "ltr"; |
|
Wladimir Palant
2014/12/11 16:52:15
I only realized now that we are looking at UI loca
Sebastian Noack
2014/12/11 17:03:05
To be honest I didn't consider that case and agree
|
| + var catalog = Object.create(null); |
| + |
| + catalog["@@ui_locale"] = [uiLocale, []]; |
| + catalog["@@bidi_dir" ] = [bidiDir, []]; |
| + |
| + return catalog; |
| + }; |
| + |
| var locales = getLocaleCandidates(); |
| - var catalog = {__proto__: null, "@@ui_locale": [locales[0], []]}; |
| + var catalog = initCatalog(locales[0]); |
| var replacePlaceholder = function(text, placeholder, content) |
| { |