Re: Proposal for declinations in gettext



Hello,
On Fri, Jun 13, 2003 at 10:14:25PM +0200, Danilo Segan wrote:
> msgid "king"
> msgstr<0> "kralj"
> msgstr<3> "kralja"
> msgstr<5> "kraljem"
> 
> msgid "move %s"
> msgstr "premesti %<3>s"
> 
> <i>, where i=0 .. (PO-Number-of-noun-forms)-1, is the index of the form 
> required, and it depends on the sentence construction. It is determined 
> by the verb, or perhaps words like "with", "whom", ... Some of 
> msgstr<i>'s can be omitted if it's known not to be used in composition 
> (most are highly unlikely to be ever used in translations, like the 
> "vocative" form of "hey %s").
I suppose the obvious question is: "How do I know which declinations
a word is used in?" (0, 3, 5 in the example above). In order to solve
this, you'd have to somehow mark "move %{move_card}s" and "{move_card}king"
so that they could be matched, msg$SOMETHING would then check for
missing/unneeded declinations. I don't think this is much easier
than using similar tags to explicitly mark contexts words are used in
(see below).
 
> The good side of this approach (the syntactic elements are arbitrary, 
> don't comment on those) is that programs that use gettext for l10n would 
> need no change:
Wrong. A typical gettext usage of the above is in principle something like
	printf (gettext ("move %s"), gettext ("king"));
that is, there is currently no way to correlate the "move %s" with
the "king".

> Before diving into gettext code, it'd be nice to hear if this kind of 
> approach would work for any language other than Serbian (I repeat, I 
> find it likely to work for Slavic languages, and German, those being the 
> languages I'm at least a bit familiar with).
It looks general enough to work for any language (if you define enough
declinations), but I'm not sure this is the way to solve this.
Doing the declination in my head is just too much work :-)

The approach seems to easily lend itself to creating a single
word-form database; then you'd want a database of which declinations
are used in which verb forms, and in a few months gettext might be
trying to do universal machine translation. But then again,
maybe gettext maintainers want it to do that.

What I'd like to see and waht I think would go some way towards
helping these problems is integrated support for context markers.
E.g. in nautilus, we have strings like
	"[files that are] named [README]"
which is much better than just "named". Currently, every program
does this differently (nautilus, KDE, gnucash at least).
	Mirek



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