insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.3k stars 311 forks source link

Translations for gcalcli? 🌐 #765

Open dbarnett opened 1 week ago

dbarnett commented 1 week ago

Any interest in setting up translations support for gcalcli so it would be possible for users to submit translations to show some of the strings in the app translated into their favorite languages?

For example, I might prefer to see everything in Spanish, something like:

$ LANG=es_MX.utf8 gcalcli --help
Modo de empleo: gcalcli [-h] [--version] [--client-id ID_CLIENTE]
               ...

Interfaz de línea de comandos para Google Calendar

configuración:
  gcalcli supports a few other configuration mechanisms in addition to
  the command-line arguments listed below.

  …

opciones:
  -h, --help            muestra este texto de ayuda y finaliza la aplicación
  …
dbarnett commented 1 week ago

Seems like gettext is the right tool for the job here. I haven't used it before in python, but I did find a guide on basic usage at https://lokalise.com/blog/beginners-guide-to-python-i18n/.