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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « i18n.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 legacySafariVersion: (info.platform == "safari" && ( 103 legacySafariVersion: (info.platform == "safari" && (
104 Services.vc.compare(info.platformVersion, "6.0") < 0 || // bef oreload breaks websites in Safari 5 104 Services.vc.compare(info.platformVersion, "6.0") < 0 || // bef oreload breaks websites in Safari 5
105 Services.vc.compare(info.platformVersion, "6.1") == 0 || // ext ensions are broken in 6.1 and 7.0 105 Services.vc.compare(info.platformVersion, "6.1") == 0 || // ext ensions are broken in 6.1 and 7.0
106 Services.vc.compare(info.platformVersion, "7.0") == 0)) 106 Services.vc.compare(info.platformVersion, "7.0") == 0))
107 }); 107 });
108 } 108 }
109 else if (message.what == "doclink") 109 else if (message.what == "doclink")
110 callback(Utils.getDocLink(message.link)); 110 callback(Utils.getDocLink(message.link));
111 else if (message.what == "localeInfo") 111 else if (message.what == "localeInfo")
112 { 112 {
113 callback({ 113 var bidiDir;
114 locale: Utils.appLocale, 114 if ("chromeRegistry" in Utils)
115 isRTL: Utils.chromeRegistry.isLocaleRTL("adblockplus") 115 bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr";
116 }); 116 else
117 bidiDir = ext.i18n.getMessage("@@bidi_dir");
118
119 callback({locale: Utils.appLocale, bidiDir: bidiDir});
117 } 120 }
118 else 121 else
119 callback(null); 122 callback(null);
120 break; 123 break;
121 case "app.open": 124 case "app.open":
122 if (message.what == "options") 125 if (message.what == "options")
123 ext.showOptions(); 126 ext.showOptions();
124 break; 127 break;
125 case "subscriptions.get": 128 case "subscriptions.get":
126 var subscriptions = FilterStorage.subscriptions.filter(function(s) 129 var subscriptions = FilterStorage.subscriptions.filter(function(s)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 171 }
169 172
170 if (message.filter) 173 if (message.filter)
171 filters.subscription = message.filter; 174 filters.subscription = message.filter;
172 else 175 else
173 delete filters.subscription; 176 delete filters.subscription;
174 break; 177 break;
175 } 178 }
176 }); 179 });
177 })(this); 180 })(this);
OLDNEW
« no previous file with comments | « i18n.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld