diff --git a/arb_reformatter.py b/arb_reformatter.py index ee318438..303ce9c6 100755 --- a/arb_reformatter.py +++ b/arb_reformatter.py @@ -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}')