Alir3z4 / Alir3z4/html2text

i18n

Abierto
#15 6 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
2.2k
Forks
296
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.