Merge pull request #2607 from yurydelendik/mozL10n-ext-fix
Fixes dir attribute for the extension
This commit is contained in:
commit
f7a0d6ccc4
@ -94,21 +94,16 @@
|
|||||||
// get a localized string
|
// get a localized string
|
||||||
get: translateString,
|
get: translateString,
|
||||||
|
|
||||||
// get|set the document language and direction
|
// get the document language
|
||||||
get language() {
|
getLanguage: function() { return gLanguage; },
|
||||||
return {
|
|
||||||
// get|set the document language (ISO-639-1)
|
|
||||||
get code() { return gLanguage; },
|
|
||||||
|
|
||||||
// get the direction (ltr|rtl) of the current language
|
// get the direction (ltr|rtl) of the current language
|
||||||
get direction() {
|
getDirection: function() {
|
||||||
// http://www.w3.org/International/questions/qa-scripts
|
// http://www.w3.org/International/questions/qa-scripts
|
||||||
// Arabic, Hebrew, Farsi, Pashto, Urdu
|
// Arabic, Hebrew, Farsi, Pashto, Urdu
|
||||||
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
|
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
|
||||||
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr';
|
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
};
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user