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

Delta Between Two Patch Sets: ext/common.js

Issue 6432313504169984: Issue 1663 - Various Firefox-related changes of the first-run page (Closed)
Left Patch Set: Updated fake background page Created Jan. 6, 2015, 10:34 p.m.
Right Patch Set: Addressed comments Created Jan. 7, 2015, 4:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « background.js ('k') | firstRun.html » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 var getLocaleCandidates = function(selectedLocale) 79 var getLocaleCandidates = function(selectedLocale)
80 { 80 {
81 var candidates = []; 81 var candidates = [];
82 var defaultLocale = "en-US"; 82 var defaultLocale = "en-US";
83 83
84 // e.g. "ja-jp-mac" -> "ja-JP", note that the part after the second 84 // e.g. "ja-jp-mac" -> "ja-JP", note that the part after the second
85 // dash is dropped, since we only support language and region 85 // dash is dropped, since we only support language and region
86 var parts = selectedLocale.split("-"); 86 var parts = selectedLocale.split("-");
87 var language = parts[0]; 87 var language = parts[0];
88 var region = (parts[1] || "").toUpperCase(); 88 var region = (parts[1] || "").toUpperCase();
89 89
90 if (region) 90 if (region)
91 candidates.push(language + "-" + region); 91 candidates.push(language + "-" + region);
92 92
93 candidates.push(language); 93 candidates.push(language);
94 94
95 if (candidates.indexOf(defaultLocale) == -1) 95 if (candidates.indexOf(defaultLocale) == -1)
96 candidates.push(defaultLocale); 96 candidates.push(defaultLocale);
97 97
98 return candidates; 98 return candidates;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 if (locales.length == 0) 190 if (locales.length == 0)
191 return ""; 191 return "";
192 192
193 readCatalog(locales.shift()); 193 readCatalog(locales.shift());
194 } 194 }
195 } 195 }
196 }; 196 };
197 })(this); 197 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld