On Thu, 22 Nov 2012 01:26:48 +0400 Igor Murzov <[email protected]> said:
> Here is a patch that makes Everything's plugin and action names
> translatable.
>
> I think i should explain why this patch actually works :)
> Some macros used this way:
>
> p = EVRY_PLUGIN_BASE("Settings", "configure", E_SETTINGS, _begin,
> _finish, _fetch);
>
> and the macro is defined like this:
>
> /* creates a Evry_Plugin to be registered with evry */
> #define EVRY_PLUGIN_BASE(_name, _icon, _item_type, _begin, _finish, _fetch)
> #\
> evry->plugin_new(EVRY_PLUGIN(E_NEW(Evry_Plugin, 1)), _name, _(_name),
> _icon, $ _begin, _finish, _fetch)
>
> so the _name argument (string "Settings" in this case) is used two times in
> evry->plugin_new() call and one of these times it is used inside _(), so
> the _name is actually translated by gettext.
>
> The same happens with EVRY_ACTION_NEW which is defined in the
> similar manner:
>
> #define EVRY_ACTION_NEW(_name, _in1, _in2, _icon, _action, _check) \
> evry->action_new(N_(_name), _(_name), _in1, _in2, _icon, _action, _check)
>
>
> But i'm not sure if this a best solution of the problem,
> so comments are welcome :)
>
> If the patch is ok, then similar changes should be made to
> E-MODULES-EXTRA/everything-* modules as well.
hmm nah - i dont like this way - i think the strings themselves should just we
wrapped as usual with _() to indicate that STRING specifically is translatable
instead of telling gettext that a new macro exists for this. :)
i've gone and found a whole bunch of these in everything and wrapped them with _
()'s now. :) yes - i know its after release, so i guess this will make it into
a future e release, but its now there.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [email protected]
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel