Skip to content

Commit 36a86da

Browse files
committed
Added locales_dir to config file
1 parent f709d49 commit 36a86da

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"include_langs": "",
33
"exclude_langs": "",
4-
"ignore_keys": ""
4+
"ignore_keys": "",
5+
"locales_dir": ""
56
}

translate-messages/translate-en-messages.py

Lines changed: 2 additions & 2 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.19
3+
Version: 2026.2.10.20
44
Author: Adam Lui
55
Description: Translate en/messages.json to other locales
66
Homepage: https://github.com/adamlui/python-utils
@@ -47,7 +47,7 @@
4747
parser.add_argument('--locales-dir', type=str, help='Name of folder containing locales')
4848
parser.add_argument('--init', action='store_true', help='Create .config.json file to store defaults')
4949
args = parser.parse_args()
50-
locales_dir = args.locales_dir or '_locales'
50+
locales_dir = args.locales_dir or config_data.get('include_langs', '') or '_locales'
5151

5252
if args.init: # create config file
5353
if os.path.exists(config_path):

0 commit comments

Comments
 (0)