33from types import SimpleNamespace as sns
44
55def cli (callerFile ):
6+
67 cli = sns (
78 name = 'translate-messages' ,
8- version = '2026.2.10.43 ' ,
9+ version = '2026.2.10.44 ' ,
910 author = sns (name = 'Adam Lui' , email = 'adam@kudoa.com' , url = 'https://github.com/adamlui' ),
1011 description = 'Translate en/messages.json to other locales' ,
1112 urls = sns (
@@ -25,7 +26,7 @@ def cli(callerFile):
2526 ]
2627 )
2728
28- # Init config file
29+ # Load from config file
2930 cli .config_filename = f'{ cli .name } .config.json'
3031 cli .config_path = os .path .join (os .path .dirname (callerFile ), cli .config_filename )
3132 cli .config_data = {}
@@ -40,7 +41,7 @@ def cli(callerFile):
4041 parser .add_argument ('--ignore-keys' , type = str , help = 'Keys to ignore (e.g. "appName,author")' )
4142 parser .add_argument ('--locales-dir' , type = str , help = 'Name of folder containing locales' )
4243 parser .add_argument ('--provider' , type = str , help = 'Name of provider to use for translation' )
43- parser .add_argument ('--init' , action = 'store_true' , help = 'Create .config.json file to store defaults' )
44+ parser .add_argument ('--init' , action = 'store_true' , help = f 'Create { cli . name } .config.json file to store defaults' )
4445 cli .args = parser .parse_args ()
4546 cli .locales_dir = cli .args .locales_dir or cli .config_data .get ('locales_dir' , '' ) or '_locales'
4647 cli .provider = cli .args .provider or cli .config_data .get ('provider' , '' )
0 commit comments