On Fri, 4 Jan 2013 08:51:53 +0900
Carsten Haitzler (The Rasterman) <ras...@rasterman.com> wrote:

> On Thu, 3 Jan 2013 19:37:50 +0400 Igor Murzov
> <intergalactic.anonym...@gmail.com> said:
> 
> > On Thu, 3 Jan 2013 17:52:36 +0900
> > Carsten Haitzler (The Rasterman) <ras...@rasterman.com> wrote:
> > 
> > > On Thu, 22 Nov 2012 01:26:48 +0400 Igor Murzov <e-m...@date.by> 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 
> > 
> > Too late. Patches are already commited. I have a plan to mark the message
> > explicitly with N_() instead of listing defines in po/Makevars, I'll do this
> > later.
> 
> i dont like the po/makevars changes as it means people read the code and go
> "ooh untranslated!" and fix it...

All extra keywords are now gone :)

> > >- 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. 
> > > :)
> > 
> > You can't just wrap every string with _(), sometimes strings have to be 
> > stored
> > untraslated as they are used as identifiers or something similar, and you
> > can't rely on translations internally. 
> 
> i know. :)
> 
> > > 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.
> > 
> > Those messages are already translated and everything was fine here.
> > So I reverted your commit :P
> 
> ummm - they were not marked for translation - they do get stored, but then
> stored with the translation...

Fixed in r82291 and r82292 :)


-- Igor

------------------------------------------------------------------------------
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. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to