Index: safari/ext/common.js |
=================================================================== |
--- a/safari/ext/common.js |
+++ b/safari/ext/common.js |
@@ -104,8 +104,24 @@ |
return candidates; |
}; |
+ var initCatalog = function(ui_locale) |
+ { |
+ var bidi_dir = (ui_locale == "ar" || |
+ ui_locale == "fa" || |
+ ui_locale == "he" || |
+ ui_locale == "ug" || |
+ ui_locale == "ur") ? "rtl" : "ltr"; |
+ |
+ return { |
+ __proto__: null, |
+ |
+ "@@ui_locale": [ui_locale, []], |
+ "@@bidi_dir": [bidi_dir, []] |
+ }; |
Wladimir Palant
2014/12/09 18:59:09
Nit: Please consider using Object.create(null) ins
Sebastian Noack
2014/12/09 19:30:16
I haven't seen through your policy for unrelated c
Wladimir Palant
2014/12/09 19:55:37
The policy is very simple - fix the code when you
|
+ }; |
+ |
var locales = getLocaleCandidates(); |
- var catalog = {__proto__: null, "@@ui_locale": [locales[0], []]}; |
+ var catalog = initCatalog(locales[0]); |
var replacePlaceholder = function(text, placeholder, content) |
{ |