| OLD | NEW | 
|---|
| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 129     with open(region_file_path, "r") as fd: | 129     with open(region_file_path, "r") as fd: | 
| 130         for line in fd: | 130         for line in fd: | 
| 131             line = line.rstrip("\r\n") | 131             line = line.rstrip("\r\n") | 
| 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(3, 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     # Write back list.txt | 142     # Write back list.txt | 
| 143     _write_lines(list_file_path, engine_ids) | 143     _write_lines(list_file_path, engine_ids) | 
| 144 | 144 | 
| 145     # Write back region.properties | 145     # Write back region.properties | 
| 146     _write_lines(region_file_path, props) | 146     _write_lines(region_file_path, props) | 
| 147 | 147 | 
| 148 | 148 | 
| 149 class MinimalLogger: | 149 class MinimalLogger: | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 171 | 171 | 
| 172     logger.info("Found %d locales" % len(locales)) | 172     logger.info("Found %d locales" % len(locales)) | 
| 173 | 173 | 
| 174     for locale in locales: | 174     for locale in locales: | 
| 175         locale_path = os.path.join(chrome_path, locale, "locale", locale) | 175         locale_path = os.path.join(chrome_path, locale, "locale", locale) | 
| 176         if os.path.exists(locale_path): | 176         if os.path.exists(locale_path): | 
| 177             _transform_locale(locale, locale_path, logger) | 177             _transform_locale(locale, locale_path, logger) | 
| 178         else: | 178         else: | 
| 179             logger.error("Missing 'locale' folder for '%s'" % locale) | 179             logger.error("Missing 'locale' folder for '%s'" % locale) | 
| 180 | 180 | 
| OLD | NEW | 
|---|