Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 # This file is part of Adblock Plus | 1 # This file is part of Adblock Plus |
2 # Copyright (C) 2006-2015 Eyeo GmbH | 2 # Copyright (C) 2006-2015 Eyeo GmbH |
3 # | 3 # |
4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
7 # | 7 # |
8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 if not _SEARCH_PROPS_RE.match(line.strip()): | 132 if not _SEARCH_PROPS_RE.match(line.strip()): |
133 props.append(line) | 133 props.append(line) |
134 | 134 |
135 # Append default search engine name | 135 # Append default search engine name |
136 props.append("browser.search.defaultenginename=%s" % engine_order[0]) | 136 props.append("browser.search.defaultenginename=%s" % engine_order[0]) |
137 | 137 |
138 # Append search engine order | 138 # Append search engine order |
139 for i in range(0, min(5, len(engine_order))): | 139 for i in range(0, min(5, len(engine_order))): |
140 props.append("browser.search.order.%d=%s" % (i + 1, engine_order[i])) | 140 props.append("browser.search.order.%d=%s" % (i + 1, engine_order[i])) |
141 | 141 |
142 # We're skipping this step, though I want to have that line included here, | |
Felix Dahlke
2015/10/12 11:20:18
Why keep the line? We can retrieve it from hg log
René Jeschke
2015/10/12 12:59:59
Done.
| |
143 # so I only commented out writing back of list.txt. | |
144 # See https://issues.adblockplus.org/ticket/3128 | |
145 # Write back list.txt | |
146 # _write_lines(list_file_path, engine_ids) | |
147 | |
148 # Write back region.properties | 142 # Write back region.properties |
149 _write_lines(region_file_path, props) | 143 _write_lines(region_file_path, props) |
150 | 144 |
151 | 145 |
152 class MinimalLogger: | 146 class MinimalLogger: |
153 def info(self, s): | 147 def info(self, s): |
154 print "INFO: %s" % s | 148 print "INFO: %s" % s |
155 | 149 |
156 def error(self, s): | 150 def error(self, s): |
157 print "ERROR: %s" % s | 151 print "ERROR: %s" % s |
(...skipping 16 matching lines...) Expand all Loading... | |
174 | 168 |
175 logger.info("Found %d locales" % len(locales)) | 169 logger.info("Found %d locales" % len(locales)) |
176 | 170 |
177 for locale in locales: | 171 for locale in locales: |
178 locale_path = os.path.join(chrome_path, locale, "locale", locale) | 172 locale_path = os.path.join(chrome_path, locale, "locale", locale) |
179 if os.path.exists(locale_path): | 173 if os.path.exists(locale_path): |
180 _transform_locale(locale, locale_path, logger) | 174 _transform_locale(locale, locale_path, logger) |
181 else: | 175 else: |
182 logger.error("Missing 'locale' folder for '%s'" % locale) | 176 logger.error("Missing 'locale' folder for '%s'" % locale) |
183 | 177 |
LEFT | RIGHT |