[Nagiosplug-devel] Translations and gettext

Yves ymettier at perfparse.org
Fri Nov 19 14:21:03 CET 2004


Just finished to internationalize (and made bad translation into French) our project
Perfparse...
Below, some comments from my experience with i18n on other projects.

> Message: 2
> Cc: nagiosplug-devel at lists.sourceforge.net
> From: Ton Voon <tonvoon at mac.com>
> Subject: Re: [Nagiosplug-devel] Translations and gettext
> Date: Fri, 19 Nov 2004 13:16:25 +0000
> To: Andreas Ericsson <ae at op5.se>
>
>
> On 19 Nov 2004, at 10:18, Andreas Ericsson wrote:
>
>> 2. It's always a pain to keep such things up to date. Wouldn't it be
>> wiser to concentrate on code development instead?
>
> That's why I would like some volunteers to keep translations up to date
> - they can be given CVS access for the necessary files only. From my
> experience with gettext so far, it doesn't get too much in the way of
> development.

For the projects I internationalized, I always updated the code for i18n, provide some
bad translation to French (as an example for contributors) and then let people translate
what they want.
This takes a little time at the beginning for the programmer, but when the code is
internationalized, there is no more work for him.

With gettext and C programs, there are 3 lines to add in main(), and #include
<gettext.h> to write at the beginning of all the source files. That takes less than 5
minutes.
Then you have to change "string" with _("string") everywhere. Except in a particular
case (html output), it is very fast, and editors even provide macros for that.

>> 3. Scripts aren't translated, so the usefulness is somewhat crippled.
>
> True, but there was demand for translated output and I think that
> translational ability is overall A Good Thing.

A Good Thing : yes, definitely :)
Well, that's my opinion.

The demand exists because you sometimes install nagios and have alerts. You install
nagios, and others read alerts. The others are not always very good in English.

The demand may exist also because people love their mother's language. Well, that's
another point :)

>> 4. It adds a requirement for gettext if you want to help with
>> development. gettext may be installed by default on many platforms,
>> but it's not on HP-UX, AIX, Tru64 and many of the others, so it could
>> quite possibly have negative impact for contributors looking to fix
>> issues on some of the less common distributions.
>
> Only developers taking the CVS code out would be affected. The
> requirements for automake and autoconf are not necessary if you just
> take the distributions and change a single line in C or perl. I started
> making contributions to the project without any need for automake,
> autoconf, gettext or docbook-utils.

Are you sure with gettext ? Here, I agree with Andreas.
On one hand, when you run gettextize -intl, it installs some files that help if you
don't have libintl. But don't you need gettext on your system ?

On the other hand, when gettextize is not installed, you can disable i18n with some
--disable-nls or something like that. Then the compiler will not complain about missing
gettext. I have never tested it.


Yves


-- 
- Homepage    - http://ymettier.free.fr - http://www.logicacmg.com -
- GPG key     - http://ymettier.free.fr/gpg.txt                    -
- Maitretarot - http://www.nongnu.org/maitretarot/                 -
- Perfparse   - http://perfparse.sf.net/                           -





More information about the Devel mailing list