From: Alex P. <ale...@ci...> - 2005-02-16 15:53:41
|
Yves, I will do it like in this example. If I use the next methode: #ifdef USE_SOURCE_NAGIOS #define KEYWORD N_("Host") #elseif USE_SOURCE_ASNMTAP #define KEYWORD N_("Plugin") #endif /* ... */ printf("%s\n", _(KEYWORD)); it is almost the same then the work I already did do. But when you prefere: #ifdef USE_SOURCE_NAGIOS printf("%s\n", _("Host")); #elseif USE_SOURCE_ASNMTAP printf("%s\n", _("Plugin")); #endif Let me now. Tommorow and the following days, I have time to do it. -- Alex -----Original Message----- From: Yves [mailto:yme...@pe...]=20 Sent: woensdag 16 februari 2005 10:46 To: Ben Clewett Cc: ale...@ci...; per...@li... Subject: Re: [Perfparse-devel-int] Re: [Perfparse-users] RE: Perfparse = error for version 0.105.5 > --with-data-source=3Dnagios|asnmtap Data Source (default=3Dnagios) > > This allow you to use this code: > > #ifdef USE_SOURCE_NAGIOS > _("Host") > #elseif USE_SOURCE_ASNMTAP > _("Plugin") > #endif Again, in the #ifdef, use keywords, not translations. #ifdef USE_SOURCE_NAGIOS #define KEYWORD N_("Host") #elseif USE_SOURCE_ASNMTAP #define KEYWORD N_("Plugin") #endif /* ... */ printf("%s\n", _(KEYWORD)); Or : #ifdef USE_SOURCE_NAGIOS printf("%s\n", _("Host")); #elseif USE_SOURCE_ASNMTAP printf("%s\n", _("Plugin")); #endif If there is a translation file specific to asnmtap, there is a problem. I just wanted to make things clear. Sorry if this is redundant :) Yves --=20 - 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://www.perfparse.org/ - --=20 No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 =20 --=20 No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 =20 |