[Nagiosplug-devel] Re: Nagios plugin translation next part ;-)

Ton Voon tonvoon at mac.com
Mon Nov 29 14:55:03 CET 2004


On 26 Nov 2004, at 09:38, Benoit Mortier wrote:

> Le vendredi 26 Novembre 2004 09:38, Yves Mettier a écrit :
>>> From: Benoit Mortier <benoit.mortier at opensides.be>
>>> Organization: OpenSides
>>> To: Ton Voon <tonvoon at mac.com>
>>> Date: Wed, 24 Nov 2004 22:52:20 +0100
>>> Cc: nagiosplug-devel at lists.sourceforge.net
>>> Subject: [Nagiosplug-devel] Re: Nagios plugin translation next part  
>>> ;-)
>>>
>>>>
>>>> We were going to try and standardize output messages to:
>>>>
>>>>   METRIC=A0STATUS:=A0Information=A0text
>>>
>>> that's good ..
>>>
>>>> In which case, I thought we should translate "METRIC", "STATUS", and
>>>> "Information text" separately (especially as the information text  
>>>> may
>>>> be generated - eg check_disk outputs different filesystem stats).
>>>
>>> i think that "METRIC STATUS:" should stay on one block and
>>> "information=20 text" should be the other block, with the think
>>> arranged like that it=20 should be easy to translate.
>>>
>>>> Are you saying that it is best to leave it as "METRIC STATUS:
>>>> Information text" because some languages would translate into  
>>>> "STATUS
>>>> METRIC: Information text"?
>>>
>>> Yes some language like french will write the text in the other way  
>>> like
>>> i=20 said ;-)
>>>
>>> SSH ERROR in english and ERREUR SSH in french
>>>
>>> so if we would translate the two block it will be SSH ERREUR that  
>>> could
>>> be = a=20
>>> good compromise ;-)
>>
>> I missed the beginning... I should have tried to help before.
>> Well, are you in need of
>> http://www.gnu.org/software/gettext/manual/html_chapter/ 
>> gettext_3.html#SE
>> C18 ?
>>
>>
>> printf(_("%s %s\n"), _("SSH"), _("ERROR"));
>>
>> fr.po :
>> msgid = "%s %s\n"
>> msgstr = "%2$s %1$s\n"
>
> Wery good ;-) i didn't know that, i will read the gettext manual more
> depply.
>
> Have a nice day

I think the long term view should be to have separate "METRIC" "LEVEL"  
"Msg", and then these can be translated separately.

However, I think we probably need a function in utils.c like:

print_status (metric, LEVEL, msg);

where print_status prints "%s %s %s", so then you can have msgstr =  
"%2$s %1$s %s" in the translation (maybe perfdata as an optional  
parameter).

But I am a bit loathed to try and put this into the 1.4 release because  
I can see this would change a bit too many lines of code. Opinions?

Ton




More information about the Devel mailing list