Massimo Maiurana wrote:
> hannes.janet...@gmail.com, il 18/04/2010 13:13, scrisse:
>
>   
>> EVRY_PLUGIN_NEW and EVRY_ACTION_NEW macros were intended to use the
>> string one time as plugin id and one time as label. does this not
>> work?
>>
>> #define EVRY_ACTION_NEW(_name, _in1, _in2, _icon, _action, _check)           
>> \
>>   evry_action_new(_name, _(_name), _in1, _in2, _icon, _action, _check)
>>     
>
> uhm, didn't knew it was this way, and that explains why a few strings were
> actually translated, like "Launch"... that was because "Launch" is already
> used elsewhere in e17 and thus is already present in enlightenment.pot.
>
> anyway, this way does not work... it looks like strings needs to be passed to
> gettext individually, not in an indirect way, because gettext doesn't know
> that _(_name) refers to other strings here and there in the code, and so it
> does not include them in enlightenment.pot.
>   

In a normal gettext setup you have a macro called N_(). This does not 
translate the string literal, but marks it for the gettext parser so it 
is in the translatable string list (e.g. enlightenment.pot). This is 
useful if you have for example an array of translatable strings:

const char *array[] = { N_("blah"), N_("foo")};
...
set_label(o, gettext(array[0]));

Or in this cases you can call the macro like this:
EVRY_ACTION_NEW(N_("the name"), ...);

Regards Peter


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to