[Top][All Lists]

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

Re: Emacs i18n

From: Paul Eggert
Subject: Re: Emacs i18n
Date: Sat, 9 Mar 2019 22:07:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

Richard Stallman wrote:

If this does not work, why not?

Thanks for explaining the -masc, -fem, -neut part. I'm afraid, though, that I still don't fully understand the proposal. It sounds like it is a redesign of what GNU gettext does, but I don't see any advantage over GNU gettext.

In the example that was sent, I see code that tests for certain kinds
of numbers.  But since I don't know the language that that is written
in, the mathematical conditions are the only part I understand.  I
don't see what it will _do_ in each of those conditions.  I presume it
selects the appropriate suffix for the number, but I don't follow how
it does so.

The GNU gettext translation code doesn't know anything about suffixes. All it knows is that if n%10==1 && n%100!=11 then it should use msgstr[0], else if n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) then it should use msgstr[1], else it should use msgstr[2]. The translations themselves are string formats that already have the proper suffixes, and GNU gettext simply copies those suffixes.

This is a simple scheme that does not attempt to solve the problem of generating idiomatic phrases for numbers (e.g., "twenty-four bytes" in English, "двадцать четыре байта" in Russian). All it solves is the problem of generating phrases containing numerals (e.g., "24 bytes" in English, "23 байта" in Russian), as these are the sorts of phrases that printf formats can generate. In practice, this is good enough.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]