Removing %n in plural i18n calls

Chusslove Illich caslav.ilic at gmx.net
Mon Feb 12 16:08:02 GMT 2007


> [: Krzysztof Lichota :]
> The strings would be extracted as singular form, the translator could
> transform them to plural.
> [...]
> Programmer would specify only plural form ("%1 files copied"). Providing
> "%1 file copied" would be up to translation team.

Well, that way is certainly technically possible, but I consider the 
possible organizational problems too great:

- there'd have to be an en_US translation, which although would be nice for 
us translators, would pretty much piss up anybody who does not care about 
translations -- eg. the exclusive users of en_US who'd be called upon to 
maintain such a "translation" :)

- it wouldn't as such stop programmers from "hardcoding" plurals, which 
would additionally introduce confusion ("who's responsible for the bloody 
plural?") 

- translators would have to be beaten into recognizing possibility of 
plural, and even then would occasionaly forget to use it -- no syntax to 
enforce its usage, no deterministic way to check if it is missing

- if still keeping in with Gettext, it would mean return to ugly in-message 
delimiters for rather frequently needed feature; PO editors would have to 
be hardcoded for KDE PO "dialect", as only KBabel was so far

The heart of the problem is the fact that Gettext is a decade old design, 
well proved and widely used in the field, where messages are considered 
"dead". Whereas we now have these "live" messages, where translators can 
schedule messages based on particular runtime state, and to make the most 
logical and streamlined use of it, a conceptualy new localization 
system--down to translation file format--would be needed. Perhaps if our 
tweaks turn usefull during KDE4 lifetime, we may have something for wider 
offer by KDE5 :)

Having said that, this doesn't mean that we couldn't affix just about 
whatever we want embedded in the messages, now and during KDE4's lifetime 
without breaking BC. I've started thinking about possible needs which 
could be solved in this way, with a layer in between "dead" messages and 
full-blown scripting. Feel free to make suggestions :) (Including a 
translator-initiated plural, which could be used as an emergency tool when 
change in the source code is hard, eg. during string freeze.)

-- 
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/20070212/84e59464/attachment.sig>


More information about the kde-core-devel mailing list