[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: dynamic string translation
From: Dirk Stoecker <kde () dstoecker ! de>
Date: 2006-09-25 7:08:21
Message-ID: Pine.LNX.4.64.0609250903180.795 () daneel ! site
[Download RAW message or body]
On Sun, 24 Sep 2006, Krzysztof Lichota wrote:
> Thiago Macieira napisa?(a):
> > Thomas Weber wrote:
> >> The contents to be translated are the keys of a QHash<QString,
> >> QList<UNITDESC>* >
> >>
> >> e.g.: categories["Length"] = &LengthUnits;
> >
> > make that:
> > categories[I18N_NOOP("Length")]
> >
> > in your other call:
> > table_widget->addTab(table, categories.keys().at(index) );
> >
> > make that:
> > table_widget->addTab(table, i18n(categories.keys().at(index) ) );
>
> Wouldn't it cause "double translation" of string?
That's why I18N_NOOP. It only marks the strings as translatable, so that
whatever is used for building the translation files knows the strings, but
does not actually do anything. The i18n call does the translation, but as
it does not contains a string directly it is not entered in the
translation file.
It's only necessary to remember, that the keys are untranslated, so they
need to be translated everytime, they are showed to the user. They must
not be translated in any other case, as this usually leads to bugs (e.g.
imagine a language, where 2 of your keys are translated as one string).
Ciao
--
http://www.dstoecker.de/ (PGP key available)
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic