Skip to content

Commit df58109

Browse files
committed
1 parent ca36183 commit df58109

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

translate-messages/__main__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import os, json
1+
import json, os, sys
22
from lib import data, init, log
3-
from sys import stdout
43
from translate import Translator
54

65
cli = init.cli(__file__)
76

8-
if cli.args.init : init.config_file(cli)
7+
if cli.args.init : init.config_file(cli) ; sys.exit(0)
98

109
cli.ignore_keys = data.csv.parse_val(cli.args.ignore_keys or cli.config_data.get('ignore_keys', ''))
1110
print('')
@@ -62,7 +61,7 @@
6261

6362
# Attempt translations
6463
log.trunc(f"{ 'Adding' if not messages else 'Updating' } { folder }/messages.json...", end='')
65-
stdout.flush()
64+
sys.stdout.flush()
6665
en_keys = list(en_messages.keys())
6766
fail_flags = ['INVALID TARGET LANGUAGE', 'TOO MANY REQUESTS', 'MYMEMORY']
6867
for key in en_keys:

translate-messages/lib/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def cli(caller_file):
66

77
cli = sns(
88
name='translate-messages',
9-
version='2026.2.10.57',
9+
version='2026.2.10.59',
1010
author=sns(name='Adam Lui', email='adam@kudoa.com', url='https://github.com/adamlui'),
1111
description='Translate en/messages.json to other locales',
1212
urls=sns(

0 commit comments

Comments
 (0)