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

Delta Between Two Patch Sets: build.py

Issue 29561557: Issue 5763 - Target languages supported by Firefox (Closed)
Left Patch Set: Removed unused target_platforms key Created Oct. 4, 2017, 1:37 a.m.
Right Patch Set: Fixed undefined variable, put URLS in globals, removed redundand flake8 ignores Created Oct. 5, 2017, 8:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | localeTools.py » ('j') | packagerChrome.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import shutil 9 import shutil
10 import buildtools 10 import buildtools
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 key = args[0] 333 key = args[0]
334 334
335 from buildtools.packager import readMetadata 335 from buildtools.packager import readMetadata
336 metadata = readMetadata(baseDir, type) 336 metadata = readMetadata(baseDir, type)
337 337
338 basename = metadata.get('general', 'basename') 338 basename = metadata.get('general', 'basename')
339 localeConfig = readLocaleConfig(baseDir, type, metadata) 339 localeConfig = readLocaleConfig(baseDir, type, metadata)
340 340
341 import buildtools.localeTools as localeTools 341 import buildtools.localeTools as localeTools
342 for locale, localeDir in localeConfig['locales'].iteritems(): 342 for locale, localeDir in localeConfig['locales'].iteritems():
343 if locale != localeConfig['default_locale']: 343 if locale != localeConfig['default_locale'].replace('_', '-'):
344 localeTools.uploadTranslations(localeConfig, metadata, localeDir, lo cale, 344 localeTools.uploadTranslations(localeConfig, metadata, localeDir, lo cale,
345 basename, key) 345 basename, key)
346 346
347 347
348 def getTranslations(baseDir, scriptName, opts, args, type): 348 def getTranslations(baseDir, scriptName, opts, args, type):
349 if len(args) < 1: 349 if len(args) < 1:
350 print 'Project key is required to update translation master files.' 350 print 'Project key is required to update translation master files.'
351 usage(scriptName, type, 'translate') 351 usage(scriptName, type, 'translate')
352 return 352 return
353 353
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 if option in ('-h', '--help'): 600 if option in ('-h', '--help'):
601 usage(scriptName, type, command) 601 usage(scriptName, type, command)
602 sys.exit() 602 sys.exit()
603 commands[command](baseDir, scriptName, opts, args, type) 603 commands[command](baseDir, scriptName, opts, args, type)
604 else: 604 else:
605 print 'Command %s is not supported for this application type' % comm and 605 print 'Command %s is not supported for this application type' % comm and
606 usage(scriptName, type) 606 usage(scriptName, type)
607 else: 607 else:
608 print 'Command %s is unrecognized' % command 608 print 'Command %s is unrecognized' % command
609 usage(scriptName, type) 609 usage(scriptName, type)
LEFTRIGHT
« no previous file | localeTools.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld