Skip to content

Commit

Permalink
use correct language code
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Nov 2, 2023
1 parent 80c510a commit 45c521e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arb_reformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ def update_arb_file(source_path, target_path, language_code):
if __name__ == "__main__":
source_file_path = 'lib/l10n/app_en.arb'
target_directory = 'lib/l10n'
language_code = os.path.basename(source_file_path).split('_')[1].split('.')[0]

for file_name in os.listdir(target_directory):
if file_name.startswith('app_') and file_name.endswith('.arb') and file_name != os.path.basename(source_file_path):
target_file_path = os.path.join(target_directory, file_name)
language_code = file_name.split('_')[1].split('.')[0]
update_arb_file(source_file_path, target_file_path, language_code)
print(f'File updated: {file_name}')

0 comments on commit 45c521e

Please sign in to comment.