SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
352 stars 95 forks source link

Internationalization - support for headings/titles/labels translation #48

Closed JakubRakus closed 3 years ago

JakubRakus commented 5 years ago

I just need to change some headings and column titles to my native language but ended up with modifications in the whole script to support headings/titles/labels internationalization. Translations are stored as YAML files in 'languages' folder. You can choose language with -l or --language CLI option or language option in ini file. Currently there are only two files: en.yaml for original English messages and pl.yaml for my native Polish language. Implementing internationalization causes some other minor changes because of encoding/decoding Python mangling. I've also modified original messages a little bit to unify them in every output file type.

SchrodingersGat commented 4 years ago

Hey @JakubRakus sorry that it has taken so long to look at this. If you are still keen to contribute these translations, can you please fix the conflicts listed above, and I'll take a look :)

JakubRakus commented 4 years ago

Ok, I will fix the conflicts over the next few days.

set-soft commented 3 years ago

There are standard mechanisms in POSIX systems to achieve this. The gettext mechanism is widely used. Python supports it: https://docs.python.org/3.8/library/gettext.html

SchrodingersGat commented 3 years ago

@JakubRakus I'm going to close this due to inactivity, no pressure, if you feel like you still want to implement this please re-open