Skip to content

Commit c1d5fb6

Browse files
committed
Condensed open config file ↞ [auto-sync from https://github.com/adamlui/python-utils/tree/main/translate-messages]
1 parent 445bf16 commit c1d5fb6

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

chromium/utils/translate-en-messages.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Name: translate-en-messages.py
3-
Version: 2026.2.10.12
3+
Version: 2026.2.10.13
44
Author: Adam Lui
55
Description: Translate en/messages.json to other locales
66
Homepage: https://github.com/adamlui/python-utils
@@ -33,9 +33,8 @@
3333
config_path = os.path.join(os.path.dirname(__file__), config_filename)
3434
config_data = DEFAULT_CONFIG.copy()
3535
if os.path.exists(config_path):
36-
with open(config_path, 'r', encoding='utf-8') as f:
37-
file_config = json.load(f)
38-
config_data.update(file_config)
36+
with open(config_path, 'r', encoding='utf-8') as file_config:
37+
config_data.update(json.load(file_config))
3938

4039
# Parse CLI args
4140
parser = argparse.ArgumentParser(description='Translate en/messages.json to other locales')

firefox/utils/translate-en-messages.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Name: translate-en-messages.py
3-
Version: 2026.2.10.12
3+
Version: 2026.2.10.13
44
Author: Adam Lui
55
Description: Translate en/messages.json to other locales
66
Homepage: https://github.com/adamlui/python-utils
@@ -33,9 +33,8 @@
3333
config_path = os.path.join(os.path.dirname(__file__), config_filename)
3434
config_data = DEFAULT_CONFIG.copy()
3535
if os.path.exists(config_path):
36-
with open(config_path, 'r', encoding='utf-8') as f:
37-
file_config = json.load(f)
38-
config_data.update(file_config)
36+
with open(config_path, 'r', encoding='utf-8') as file_config:
37+
config_data.update(json.load(file_config))
3938

4039
# Parse CLI args
4140
parser = argparse.ArgumentParser(description='Translate en/messages.json to other locales')

0 commit comments

Comments
 (0)