I have a Perl module that handles localization tasks using the GNU gettext utilities xgettext
, msgfmt
, msginit
, and msgmerge
. I got some test failures from a SunOS system which, when I looked into it, seemed to be ancient. For now I am skipping tests when msgfmt
and xgettext
choke on a simple --version
option. But I think it would be better to refuse to install unless a relatively modern version of the GNU Gettext utilities are installed.
So, what's the best way to do that? I'd like to just figure out what's installed and if it supports the options I need, and refuse to install the module if those dependencies are not met. Should I just run gettext --version
and refuse to install if it exits with a non-0 value? Or might there be a more canonical solution?
Check gettext Version Windows To check which version of gettext is installed, use pip show gettext or pip3 show gettext in your Windows CMD, command line, or PowerShell.
This package offers to programmers, translators, and even users, a well integrated set of tools and documentation. Specifically, the GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages.
Since "gettext --version" should always return a value on any "contemporary" version (for example, I just tried it on a circa 1997 Redhat ... and it worked!), that should be sufficient.
IMHO...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With