From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Emacs i18n Date: Sat, 09 Mar 2019 22:05:34 -0500 Message-ID: References: <87o97aq6gz.fsf@jidanni.org> <87tvgoud56.fsf@mail.linkov.net> <83o96wk2mi.fsf@gnu.org> <87k1hjfvjd.fsf@mail.linkov.net> <871s3p0zdz.fsf@mail.linkov.net> <83h8ckezyt.fsf@gnu.org> <83o96qegv1.fsf@gnu.org> <32b1ab1b-bef4-629a-8830-b1dcc6915087@cs.ucla.edu> <83a7iae9va.fsf@gnu.org> <05ed2dec-2a84-f7dc-1af5-c9d923992785@cs.ucla.edu> <87bm2p56gu.fsf@mail.linkov.net> <837edbdg33.fsf@gnu.org> <65e3fe78-3264-12ff-1edf-a05bfd86a9a9@cs.ucla.edu> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="107971"; mail-complaints-to="usenet@blaine.gmane.org" Cc: eliz@gnu.org, juri@linkov.net, lokedhs@gmail.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 10 04:05:52 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2ome-000Rwy-Ag for ged-emacs-devel@m.gmane.org; Sun, 10 Mar 2019 04:05:52 +0100 Original-Received: from localhost ([127.0.0.1]:39237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2omd-00057K-A4 for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2019 22:05:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2omO-00055z-13 for emacs-devel@gnu.org; Sat, 09 Mar 2019 22:05:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2omN-0001kh-SL; Sat, 09 Mar 2019 22:05:35 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1h2omM-0005Ui-OK; Sat, 09 Mar 2019 22:05:34 -0500 In-Reply-To: (message from Paul Eggert on Fri, 8 Mar 2019 23:54:28 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234001 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Russian has three plural forms useful for translating a string that formats an > integer N. One form is for when (N%10 == 1 && N%100/10 != 1), one is for when (2 > <= N%10 && N%10 <= 4 && N%100/10 == 1), and one is for everything else. So the > form depends on N, not on whether the translation of the word "items" is > masculine or feminine or whatever. I know that. That is the problem I addressed. Each clause inside numeric-select tests for and handles certain numbers. The first thing in the clause is a condition that tests the number. If the condition is a number, it matches only that number. 'russian-masc' tests for numbers that require a masculine noun ending; you use it with a string that contains the masculine ending. 'russian-fem' tests for numbers that require a feminine noun ending. you use it with a string that contains the feminine ending. 'russian-neut' tests for numbers that require a neuter noun ending. you use it with a string that contains the neuter ending. Since I do not speak Russian, I wrote dummies for those endings: -m, -f and -n. Thus, (numeric-case NUMBER (russian-masc "%d-m frobs") (russian-fem "%d-f frobs") (russian-neut "%d-n frobs")) Do you follow, now? > "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 > && (n%100<10 || n%100>=20) ? 1 : 2);\n" > ... > #: src/dd.c:822 > #, c-format > msgid "% byte copied, %s, %s" > msgid_plural "% bytes copied, %s, %s" It would be better if we can define these criteria just once, rather than restate them in many places. My idea is to incorporate it into the definition of the conditionals, russian-masc etc. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)