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

Side by Side Diff: cms/bin/translate.py

Issue 29569602: Noissue - Replace flake8-putty with flake8-per-file-ignores, update to flake8 3 (cms) (Closed)
Patch Set: Created Oct. 8, 2017, 6:09 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 | « cms/bin/test_server.py ('k') | cms/converters.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 update_existing_files(crowdin_api, existing_files, page_strings) 318 update_existing_files(crowdin_api, existing_files, page_strings)
319 319
320 old_files = remote_files - local_files 320 old_files = remote_files - local_files
321 old_directories = remote_directories - local_directories 321 old_directories = remote_directories - local_directories
322 remove_old_files(crowdin_api, old_files) 322 remove_old_files(crowdin_api, old_files)
323 remove_old_directories(crowdin_api, old_directories) 323 remove_old_directories(crowdin_api, old_directories)
324 324
325 download_translations(crowdin_api, source_dir, required_locales) 325 download_translations(crowdin_api, source_dir, required_locales)
326 logger.info('Crowdin sync completed.') 326 logger.info('Crowdin sync completed.')
327 327
328
328 if __name__ == '__main__': 329 if __name__ == '__main__':
329 if len(sys.argv) < 3: 330 if len(sys.argv) < 3:
330 print >>sys.stderr, 'Usage: python -m cms.bin.translate www_directory cr owdin_project_api_key [logging_level]' 331 print >>sys.stderr, 'Usage: python -m cms.bin.translate www_directory cr owdin_project_api_key [logging_level]'
331 sys.exit(1) 332 sys.exit(1)
332 333
333 logging.basicConfig() 334 logging.basicConfig()
334 logger.setLevel(sys.argv[3] if len(sys.argv) > 3 else logging.INFO) 335 logger.setLevel(sys.argv[3] if len(sys.argv) > 3 else logging.INFO)
335 336
336 source_dir, crowdin_api_key = sys.argv[1:3] 337 source_dir, crowdin_api_key = sys.argv[1:3]
337 crowdin_sync(source_dir, crowdin_api_key) 338 crowdin_sync(source_dir, crowdin_api_key)
OLDNEW
« no previous file with comments | « cms/bin/test_server.py ('k') | cms/converters.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld