Re: [Translation-i18n] Proposal for declinations in gettext



Hello,
On Sat, Jun 14, 2003 at 01:29:28PM +0200, Danilo Segan wrote:
> The particular problem which made me think about this is the translation 
> of a card game in Gnome. Since there are fifty-something cards, and I 
> don't know how many different operations, this kind of "solution" would 
> require more than thousand of similar strings in original program, which 
> is unlikely that any programmer will do.
In fact, if *having* one thousand strings is acceptable, it is quite
easy. You can write a small script both to generate the original
strings and to generate the translations (for that, you would probably
use the different declination forms, but that is entirely upon you
as a translator).

This does not attempt to be any real language, but you get the point:

for suit in [ ('hearts', 'srdcov'), ('clubs', 'krizov'), .. .. ]; do
  for card in [ ('eight', 'ou osmicku') ... ('jack', 'eho spodka'), ... ]; do
    print 'msgid "move the %s of %s"', card.first, suit.first
    print 'msgstr "presunout %s%s"', suit.second, card.second

would generate all 52 messages (note how I have cheated regarding
declinations of the suit names). Then just msgcat this with the rest.

Yes, it requires more thinking than just translating the .pot file,
but it can't be that bad.
	Mirek



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]