[Kalzium] KDE/kdeedu/kalzium/src
Eloy Cuadra
ecuadra at eloihr.net
Thu Jul 21 19:28:28 CEST 2005
On Thursday 21 July 2005 19:01, Carsten Niehaus wrote:
> On Thursday, 21. July 2005 06:48 pm, Eloy Cuadra wrote:
> > Yes, it works. But, is it safe? Is it possible to put a variable as the
> > first argument in a i18n() function?
>
> Hehe, I know what you mean. But yes, that is the way to do it. The problem
> is that we are loading from xml. The xml-code is parsed with a "nice"
> sed-script (see Makefile.am) to a temporary .cpp-file. This is parsed with
> xgettext so that the stuff is found in the .pot und .po-files.
> Now, on runtime, the i18n() compares the content of the variable with the
> internal strings (those available for translation). Only if a match is
> found it will substitute with the translated string even though there is no
> fix string (only the variable).
> Strange but works :) KDE's blackmagic.
Yes, I know that. In fact, my patch was only a trick to avoid an i18n() call,
and it was based on i18n() internal code, just thinking on avoid problems
when running xgettext. But if it's safe to do that, I see no problem :)
--
Eloy Cuadra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kalzium/attachments/20050721/574a4675/attachment.pgp
More information about the Kalzium
mailing list