| OLD | NEW |
| 1 # coding: utf-8 | 1 # coding: utf-8 |
| 2 | 2 |
| 3 # This file is part of the Adblock Plus build tools, | 3 # This Source Code Form is subject to the terms of the Mozilla Public |
| 4 # Copyright (C) 2006-2014 Eyeo GmbH | 4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
| 5 # | 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 6 # Adblock Plus is free software: you can redistribute it and/or modify | |
| 7 # it under the terms of the GNU General Public License version 3 as | |
| 8 # published by the Free Software Foundation. | |
| 9 # | |
| 10 # Adblock Plus is distributed in the hope that it will be useful, | |
| 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 # GNU General Public License for more details. | |
| 14 # | |
| 15 # You should have received a copy of the GNU General Public License | |
| 16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | |
| 17 | 6 |
| 18 import re, os, sys, codecs, json, urllib, urllib2 | 7 import re, os, sys, codecs, json, urllib, urllib2 |
| 19 from StringIO import StringIO | 8 from StringIO import StringIO |
| 20 from ConfigParser import SafeConfigParser | 9 from ConfigParser import SafeConfigParser |
| 21 from zipfile import ZipFile | 10 from zipfile import ZipFile |
| 22 from xml.parsers.expat import ParserCreate, XML_PARAM_ENTITY_PARSING_ALWAYS | 11 from xml.parsers.expat import ParserCreate, XML_PARAM_ENTITY_PARSING_ALWAYS |
| 23 | 12 |
| 24 langMappingGecko = { | 13 langMappingGecko = { |
| 25 'bn-BD': 'bn', | 14 'bn-BD': 'bn', |
| 26 'br': 'br-FR', | 15 'br': 'br-FR', |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 439 |
| 451 # Remove any extra files | 440 # Remove any extra files |
| 452 for dir, files in dirs.iteritems(): | 441 for dir, files in dirs.iteritems(): |
| 453 baseDir = os.path.join(localesDir, dir) | 442 baseDir = os.path.join(localesDir, dir) |
| 454 if not os.path.exists(baseDir): | 443 if not os.path.exists(baseDir): |
| 455 continue | 444 continue |
| 456 for file in os.listdir(baseDir): | 445 for file in os.listdir(baseDir): |
| 457 path = os.path.join(baseDir, file) | 446 path = os.path.join(baseDir, file) |
| 458 if os.path.isfile(path) and (file.endswith('.json') or file.endswith('.pro
perties') or file.endswith('.dtd')) and not file in files: | 447 if os.path.isfile(path) and (file.endswith('.json') or file.endswith('.pro
perties') or file.endswith('.dtd')) and not file in files: |
| 459 os.remove(path) | 448 os.remove(path) |
| OLD | NEW |