Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine the installed version of gettext?

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?

like image 896
theory Avatar asked Dec 02 '12 22:12

theory


People also ask

How do I find my gettext version?

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.

What is gettext package?

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.


1 Answers

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...

like image 176
paulsm4 Avatar answered Oct 12 '22 07:10

paulsm4