Skip to content

Commit fe58fce

Browse files
committed
Extracted cli.msgs.err_PARSE_FAILED
1 parent 1cb1a70 commit fe58fce

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

translate-messages/src/translate_messages/assets/data/messages.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"tip_IT_HAS_VALID_JSON": { "message": "it contains valid JSON" },
2121
"warn_CONFIG_EXISTS_AT": { "message": "Config already exists at" },
2222
"warn_DIR_NOT_FOUND": { "message": "Unable to locate directory" },
23+
"err_PARSE_FAILED": { "message": "Failed to parse" },
2324
"err_TRANSLATE_FAILED_FOR_KEY": { "message": "Translation failed for key" },
2425
"err_EN_LOC_NOT_FOUND_AT": { "message": "English locale not found at" }
2526
}

translate-messages/src/translate_messages/lib/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def src_msgs(cli):
4343
try:
4444
cli.en_msgs = data.json.read(cli.en_path)
4545
except Exception as err:
46-
log.error(f'Failed to parse {cli.en_path}: {err}')
46+
log.error(f'{cli.msgs.err_PARSE_FAILED} {cli.en_path}: {err}')
4747
log.tip(f'{cli.msgs.tip_MAKE_SURE} {cli.msgs.tip_IT_HAS_VALID_JSON}')
4848
sys.exit(1)
4949

0 commit comments

Comments
 (0)