Closed Gaorion closed 10 months ago
maybe i misunderstood but fchart3i18n.py will be fchart3 ( in github preferred not replace it ) Babel dont scan fchart3 because it dont have the extension .py
so 1 rename fchart3 in fchart3.py 2 scan with babel pybabel extract . -o locale/base.pot pybabel update -i locale/base.pot -d locale pybabel compile -d locale 3 remove the extension .py 4 install
This afternoon i finished to scan all the code for replacement of print() by print (( )) and i find this solution 4 the widget LABELi18N = { 'h': ('h'), 'm':('m'), 's':('s'), 'G':('Galaxy'), 'OCL':('Open cluster'), 'GCL':('Globular cluster'), 'AST':('Asterism'), 'PN':('Planetary nebula'), 'N': ('Diffuse nebula'), 'SNR':('Supernova remnant'), 'PG':('Part of galaxy') }
So I've renamed fchart3i18n.py to fchart3+fixed problems (missing brackets)
okay !
I finished the work but i use a environment variable to set the language it's more simple to pass var into modules a nother option could be .env (Python-dotenv) but you already have "Configuration system"
If I understand you correctly, there could be priority of sources from which the actual language ID is loaded. For example from lowest to highest:
Is there any problem to use i18n stuff in fchart3 bin, it seems that it will be hard to synchronize code in both files in the future.