[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    i18n / I18N_NOOP
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-02-28 20:29:50
[Download RAW message or body]

I'm looking for a way to make KWord style names translatable.
They are currently read from the templates, where their name is obviously
in English.

My idea is to translate them after reading them from the template,
using the I18N_NOOP solution - since the list of internal style names
is well-defined. Styles added by the user will be saved under a name
that the user chooses, so no problem there.

The two issues are:
* I need to have I18N_NOOP("Head 1") somewhere in KWord's code,
but I actually never need to execute that code at any point.
i18n( styleName ) is all that KWord needs to do.
Is there a cleaner solution than this one ?
#if 0
 I18N_NOOP("Head 1")
 ...
#endif

* I'd prefer to add a context string, because "Standard" could be used
somewhere else, etc. But although i18n( context, string ) exists,
I18N_NOOP( context, string) doesn't. How does i18n(a,b) work ?
xgettext automatically concats if it sees two arguments ?
So would it work to define I18N_NOOP_CONTEXT (or something shorter!)
like
#define I18N_NOOP_CONTEXT(x,y) (y)
and let xgettext pick it up as it does for i18n ?
(IIRC it's not possible to have I18N_NOOP(x) and I18N_NOOP(x,y))

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic