Better match for lang code filter

This commit is contained in:
Miguel Jacq 2018-01-16 16:45:54 +11:00
parent c3bf8f0739
commit 83e0d9f4de
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -78,7 +78,7 @@ def main():
if lang_code == 'all':
locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json')]
else:
locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json') and lang_code in f]
locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('%s.json' % lang_code)]
for locale_file in locale_files:
with codecs.open(locale_file, 'r', encoding='utf-8') as f:
trans = json.load(f)