HalosGhost / pbpst

A command-line libcurl C client for pb deployments
GNU General Public License v2.0
44 stars 9 forks source link

i18n #72

Closed HalosGhost closed 7 years ago

HalosGhost commented 7 years ago

pbpst has come a long way and, in my opinion, is pretty well feature-complete (though others may very well convince me otherwise).

However, we still hard-code English and offer no utility for internationalization. In pacman's tradition (as we tend to try to follow), I would like to offer, at least, the opportunity for i18n through gettext.

This is not a small undertaking, and I would not be able to offer the translations themselves, but we could at least offer the possibility.

tmplt commented 7 years ago

I'm able to offer translations to Swedish.

HalosGhost commented 7 years ago

Wonderful! I have just gotten my first test with gettext functional, so I will begin the process of converting the whole program over to gettext Soon™.

HalosGhost commented 7 years ago

Okay, most of the light lifting is done now. Unsurprisingly, some of strings we use for printing (both diagnostics and errors) are more complicated, so they cannot be so easily converted to gettext() calls. I will need to figure out a way to simplpify these to a format that is more conducive to translation.

And, finally, the usage output will need to be translateable as well. I have a plan for them too, but they will take a bit of time for this refactor.

HalosGhost commented 7 years ago

All right; the help output should be fully functional at this point, so there are only two tasks left for this to be finished:

HalosGhost commented 7 years ago

All right, this is preliminarily complete. Now I just need to add the necessary pieces to the build, install and uninstall steps so that contributed translations are built and installed properly.

HalosGhost commented 7 years ago

via https://github.com/HalosGhost/pbpst/commit/92e9e917d6d24735687bbda5aa7a60e1082dd73f, I cam considering this issue complete.

To contribute, see the wiki page.