Status of i10n calls on KDE4

Chusslove Illich caslav.ilic at gmx.net
Fri Dec 29 16:08:39 GMT 2006


> [: Krzysztof Lichota :]
> BTW, how about detecting "properties" of i18n parameters (e.g. i18n("New
> %1").arg(female_form/male_form) )?
> Do you have some description of current design?

Detecting the property itself would have to go through dictionary lookup 
table. The table would contain the known set of possible arguments (eg. 
country names in KGeography), and for each the needed forms (like cases) 
and properties (like gender). Since this would be a frequently used 
feature, we'll come up with some way of making it as easy and fast as 
possible, by providing specialized extensions to whatever scripting 
language used.

As for how it would look like within the top-level scripted translation, 
that will probably be as we had discussed earlier (I mean back in 2005 :), 
using interpolated $[...] syntax independent of the scripting language. 
Eg:

msgid "New %1"
msgstr ""
"Novo %1"
"|/|"
"$[gender-select %1 Novi Nova Novo] %1"

(may need a few quotes extra, and probably # instead of % for placeholders 
in scripted part, to keep gettext-syntax checker happy)

-- 
Chusslove Illich (Часлав Илић)
-------------- 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/kde-core-devel/attachments/20061229/8a143bb8/attachment.sig>


More information about the kde-core-devel mailing list