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

Side by Side Diff: localeTools.py

Issue 6249914833043456: Issue 1731 - Fixed locale code for Gujarati (Closed)
Patch Set: Don't convert locale code for Firefox Created Dec. 28, 2014, 12:52 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 11 matching lines...) Expand all
22 'rm': 'rm-CH', 22 'rm': 'rm-CH',
23 'ta-LK': 'ta', 23 'ta-LK': 'ta',
24 'wo-SN': 'wo', 24 'wo-SN': 'wo',
25 } 25 }
26 26
27 langMappingChrome = { 27 langMappingChrome = {
28 'es-419': 'es-MX', 28 'es-419': 'es-MX',
29 'es': 'es-ES', 29 'es': 'es-ES',
30 'sv': 'sv-SE', 30 'sv': 'sv-SE',
31 'ml': 'ml-IN', 31 'ml': 'ml-IN',
32 'gu': 'gu-IN',
32 } 33 }
33 34
34 chromeLocales = [ 35 chromeLocales = [
35 "am", 36 "am",
36 "ar", 37 "ar",
37 "bg", 38 "bg",
38 "bn", 39 "bn",
39 "ca", 40 "ca",
40 "cs", 41 "cs",
41 "da", 42 "da",
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 440
440 # Remove any extra files 441 # Remove any extra files
441 for dir, files in dirs.iteritems(): 442 for dir, files in dirs.iteritems():
442 baseDir = os.path.join(localesDir, dir) 443 baseDir = os.path.join(localesDir, dir)
443 if not os.path.exists(baseDir): 444 if not os.path.exists(baseDir):
444 continue 445 continue
445 for file in os.listdir(baseDir): 446 for file in os.listdir(baseDir):
446 path = os.path.join(baseDir, file) 447 path = os.path.join(baseDir, file)
447 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:
448 os.remove(path) 449 os.remove(path)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld