Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This Source Code Form is subject to the terms of the Mozilla Public | 3 # This Source Code Form is subject to the terms of the Mozilla Public |
4 # License, v. 2.0. If a copy of the MPL was not distributed with this | 4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
6 | 6 |
7 import re, os, sys, codecs, json, urllib, urllib2 | 7 import re, os, sys, codecs, json, urllib, urllib2 |
8 from StringIO import StringIO | 8 from StringIO import StringIO |
9 from ConfigParser import SafeConfigParser | 9 from ConfigParser import SafeConfigParser |
10 from zipfile import ZipFile | 10 from zipfile import ZipFile |
11 from xml.parsers.expat import ParserCreate, XML_PARAM_ENTITY_PARSING_ALWAYS | 11 from xml.parsers.expat import ParserCreate, XML_PARAM_ENTITY_PARSING_ALWAYS |
12 | 12 |
13 langMappingGecko = { | 13 langMappingGecko = { |
14 'bn-BD': 'bn', | 14 'bn-BD': 'bn', |
15 'br': 'br-FR', | 15 'br': 'br-FR', |
16 'dsb': 'dsb-DE', | 16 'dsb': 'dsb-DE', |
17 'fj-FJ': 'fj', | 17 'fj-FJ': 'fj', |
18 'hsb': 'hsb-DE', | 18 'hsb': 'hsb-DE', |
19 'hi-IN': 'hi', | 19 'hi-IN': 'hi', |
20 'ml': 'ml-IN', | 20 'ml': 'ml-IN', |
21 'gu': 'gu-IN', | |
Wladimir Palant
2014/12/28 11:26:28
This is wrong. I checked https://addons.mozilla.or
Sebastian Noack
2014/12/28 12:53:15
Done.
| |
22 'nb-NO': 'nb', | 21 'nb-NO': 'nb', |
23 'rm': 'rm-CH', | 22 'rm': 'rm-CH', |
24 'ta-LK': 'ta', | 23 'ta-LK': 'ta', |
25 'wo-SN': 'wo', | 24 'wo-SN': 'wo', |
26 } | 25 } |
27 | 26 |
28 langMappingChrome = { | 27 langMappingChrome = { |
29 'es-419': 'es-MX', | 28 'es-419': 'es-MX', |
30 'es': 'es-ES', | 29 'es': 'es-ES', |
31 'sv': 'sv-SE', | 30 'sv': 'sv-SE', |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 | 440 |
442 # Remove any extra files | 441 # Remove any extra files |
443 for dir, files in dirs.iteritems(): | 442 for dir, files in dirs.iteritems(): |
444 baseDir = os.path.join(localesDir, dir) | 443 baseDir = os.path.join(localesDir, dir) |
445 if not os.path.exists(baseDir): | 444 if not os.path.exists(baseDir): |
446 continue | 445 continue |
447 for file in os.listdir(baseDir): | 446 for file in os.listdir(baseDir): |
448 path = os.path.join(baseDir, file) | 447 path = os.path.join(baseDir, file) |
449 if os.path.isfile(path) and (file.endswith('.json') or file.endswith('.pro perties') or file.endswith('.dtd')) and not file in files: | 448 if os.path.isfile(path) and (file.endswith('.json') or file.endswith('.pro perties') or file.endswith('.dtd')) and not file in files: |
450 os.remove(path) | 449 os.remove(path) |
LEFT | RIGHT |