i18n
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 296
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Since not all of the world is speaking English, having i18n (or as @svetlemodry said [internationalization](http://www.i18nguy.com/origini18n.html)) would be really good.
Right now, https://github.com/Alir3z4/html2text/blob/master/html2text/cli.py is the only place to start working on its translation.
Python itself is great with `gettext` and handling translations, the only thing that remains is how to run the app in the specific translation.
For example how to keep track of the selected translation would be keeping the configuration via:
1. `~/.config/html2text`
2. Pass to `ENV` var
3. Pass the translation on runtime to CLI
So let's talk about those options:
1. Having app conf under `~/.config/html2text` is something standard in GNU/Linux and *unix based machines. In future with regards of the progress of the CLI we can easily expand and use that configuration file. This option makes CLI slower on load time, since it should read a file from user conf dir.
2. `ENV` is a good place if we're not going to keep lots of conf file and an env var such as `HTML2TEXT_LANG=miow` can be enough and we're good to go. it can be easily picked up while running the program.
3. I'm not a fan on these, no never! Program should know the translation without explicitly declaring the language.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.