Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: messageResponder.js

Issue 6289768170127360: Issue 2067 - Unify logic retrieving the UI locale (Closed)
Patch Set: Fixed: There is no ext.i18n in the background page on Firefox Created March 2, 2015, 11:55 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « i18n.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -110,10 +110,13 @@
callback(Utils.getDocLink(message.link));
else if (message.what == "localeInfo")
{
- callback({
- locale: Utils.appLocale,
- isRTL: Utils.chromeRegistry.isLocaleRTL("adblockplus")
- });
+ var bidiDir;
+ if ("chromeRegistry" in Utils)
+ bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr";
+ else
+ bidiDir = ext.i18n.getMessage("@@bidi_dir");
+
+ callback({locale: Utils.appLocale, bidiDir: bidiDir});
}
else
callback(null);
« no previous file with comments | « i18n.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld