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

Delta Between Two Patch Sets: messageResponder.js

Issue 6289768170127360: Issue 2067 - Unify logic retrieving the UI locale (Closed)
Left Patch Set: Created March 1, 2015, 12:55 p.m.
Right 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « i18n.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 var bidiDir = ext.i18n.getMessage("@@bidi_dir"); 113 var bidiDir;
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 if (!bidiDir) 114 if ("chromeRegistry" in Utils)
115 bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr"; 115 bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr";
116 else
117 bidiDir = ext.i18n.getMessage("@@bidi_dir");
118
116 callback({locale: Utils.appLocale, bidiDir: bidiDir}); 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":
(...skipping 42 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);
LEFTRIGHT
« i18n.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld