Re: VDR-core's texts in plugin's .pot files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/24/07 15:35, Klaus Schmidinger wrote:
> On 08/19/07 14:58, Matthias Becker wrote:
>> ...
>> One way of doing this would be to introduce a new macro similar to
>> trNOOP( ). A plugin author would then tag the vdr-core texts with this
>> new macro and xgettext would ignore these texts.
>>
>> What do you think?
> 
> You're certainly right.
> 
> How about this:
> 
> --- i18n.h      2007/08/19 14:07:17     1.23
> +++ i18n.h      2007/08/24 13:33:50
> @@ -80,6 +80,7 @@
> 
>  #ifdef PLUGIN_NAME_I18N
>  #define tr(s)  I18nTranslate(s, "vdr-" PLUGIN_NAME_I18N)
> +#define trVDR(s) I18nTranslate(s)  // to use a text that's in the VDR core's translation file
>  #else
>  #define tr(s)  I18nTranslate(s)
>  #endif

One more thing: this also reduces I18nTranslate() to


const char *I18nTranslate(const char *s, const char *Plugin)
{
  if (s && CurrentLanguage) {
     const char *t = Plugin ? dgettext(Plugin, s) : gettext(s);
     if (t != s)
        return t;
     }
  return SkipContext(s);
}



Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux