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

Unified Diff: packagerChrome.py

Issue 29588949: Issue 5877 - Account for random locale processing order (Closed)
Patch Set: Created Oct. 25, 2017, 2:16 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerChrome.py
diff --git a/packagerChrome.py b/packagerChrome.py
index f9776069e51b47fdbd4df0525eb92493c4449b50..fb5ed31f0c017844d2243fc76e32136307422fc2 100644
--- a/packagerChrome.py
+++ b/packagerChrome.py
@@ -209,9 +209,10 @@ def create_bundles(params, files):
def import_locales(params, files):
for item in params['metadata'].items('import_locales'):
- filename, keys = item
+ filename = item[0]
Sebastian Noack 2017/10/25 15:08:33 Nit: This temporary variable isnt necessary.
Wladimir Palant 2017/10/25 15:11:48 But helpful to make the code more readable. Otherw
for sourceFile in glob.glob(os.path.join(os.path.dirname(item.source),
*filename.split('/'))):
+ keys = item[1]
locale = sourceFile.split(os.path.sep)[-2]
targetFile = os.path.join('_locales', locale, 'messages.json')
data = json.loads(files.get(targetFile, '{}').decode('utf-8'))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld