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: Created March 1, 2015, 12:55 p.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 = ext.i18n.getMessage("@@bidi_dir");
Wladimir Palant 2015/03/02 11:40:51 ext.i18n is purely content side in Firefox, so thi
Sebastian Noack 2015/03/02 11:56:03 Oh, didn't know that.
114 locale: Utils.appLocale, 114 if (!bidiDir)
115 isRTL: Utils.chromeRegistry.isLocaleRTL("adblockplus") 115 bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr";
116 }); 116 callback({locale: Utils.appLocale, bidiDir: bidiDir});
117 } 117 }
118 else 118 else
119 callback(null); 119 callback(null);
120 break; 120 break;
121 case "app.open": 121 case "app.open":
122 if (message.what == "options") 122 if (message.what == "options")
123 ext.showOptions(); 123 ext.showOptions();
124 break; 124 break;
125 case "subscriptions.get": 125 case "subscriptions.get":
126 var subscriptions = FilterStorage.subscriptions.filter(function(s) 126 var subscriptions = FilterStorage.subscriptions.filter(function(s)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 if (message.filter) 170 if (message.filter)
171 filters.subscription = message.filter; 171 filters.subscription = message.filter;
172 else 172 else
173 delete filters.subscription; 173 delete filters.subscription;
174 break; 174 break;
175 } 175 }
176 }); 176 });
177 })(this); 177 })(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