From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Emacs i18n Date: Wed, 27 Mar 2019 01:16:38 +0200 Organization: LINKOV.NET Message-ID: <878sx1cjl5.fsf@mail.linkov.net> 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> <87h8cjspc0.fsf@mail.linkov.net> <29a53a39-fa50-1e94-9420-a3ea1250aa44@gmail.com> <87r2azq478.fsf@mail.linkov.net> <83o963s4gx.fsf@gnu.org> <87va09ckym.fsf@mail.linkov.net> <83sgvdndt0.fsf@gnu.org> <8736ncgcnm.fsf@mail.linkov.net> <5F95E50C-2A55-4ED2-A82B-86FAAFC526ED@gmail.com> <87ef6uod20.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="138854"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Jean-Christophe Helary , Emacs developers To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 27 00:21:08 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 1h8vNT-000ZzE-9I for ged-emacs-devel@m.gmane.org; Wed, 27 Mar 2019 00:21:07 +0100 Original-Received: from localhost ([127.0.0.1]:39291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8vNS-0005u1-6z for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2019 19:21:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8vNJ-0005tk-4B for emacs-devel@gnu.org; Tue, 26 Mar 2019 19:20:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8vNH-0004TF-VZ for emacs-devel@gnu.org; Tue, 26 Mar 2019 19:20:57 -0400 Original-Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:57374) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8vNH-0004S1-FF for emacs-devel@gnu.org; Tue, 26 Mar 2019 19:20:55 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 80E4212495A; Tue, 26 Mar 2019 23:20:52 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a23.g.dreamhost.com (unknown [100.96.20.50]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 097E5124978; Tue, 26 Mar 2019 23:20:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a23.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Tue, 26 Mar 2019 23:20:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Spot-Macabre: 77d04b037ddc1d5e_1553642452342_206435446 X-MC-Loop-Signature: 1553642452341:335948645 X-MC-Ingress-Time: 1553642452341 Original-Received: from pdx1-sub0-mail-a23.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a23.g.dreamhost.com (Postfix) with ESMTP id 835DD80669; Tue, 26 Mar 2019 16:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=2o+rOv 3eUK7RG6P1YkQIg8eeUeo=; b=nRkX3mEBnPPGyezfO1x+23DhhlDfS2NzJUtJ9x a/nlfkshurDr2Oyi43bD7OZJVdNP/RRKwtIS+XpBnNqiYJ1l8XaeY+0qIbFevktA BIp1Ge5oiXHp16jeu7DvYg0qcqc0FoiJ6JKysxAi/PY3O6p5Yuh57Rz9wXQPs7WL U7Bak= Original-Received: from mail.jurta.org (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 4DDD680672; Tue, 26 Mar 2019 16:20:48 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a23 In-Reply-To: (Paul Eggert's message of "Mon, 25 Mar 2019 15:31:14 -0700") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrkedugddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdekrddvhedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtkedrvdehtddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegvghhgvghrthestghsrdhutghlrgdrvgguuhenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.214.38 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:234755 Archived-At: >> I don't know where to put i18n related code, so since ngettext should >> have C calls anyway, I moved it to editfns.c near the function =E2=80=98= message=E2=80=99 >> where it still just returns the correct plurals without doing any tran= slation. > > That stub had some problems: > > 1. It lacked documentation in the Elisp manual. Important changes like > this should be documented -- to some extent the documentation is even > more important than the code. Can you write something? I'll start writing documentation. Is it allowed to make references from the Elisp manual to the Gettext Info manual? I see in (info "(gettext) elisp-format") a reference back to the Elisp manual is a web link, not an Info reference. > 2. While you're thinking about (1) here are some other questions. How > will ngettext determine the message catalog? Is the catalog visible to > users as a global variable, or as a hidden part of the global state, or > is it something explicit? How will catalogs from multiple packages be > used? How would a multi-lingual application work in Emacs if the messag= e > catalog is part of global state? This seems to be a crucial issue, I'd > say. For example, should Emacs export dcngettext to Lisp code, instead > of just plain ngettext? (Emacs could then define ngettext in terms of > dcngettext.) It seems most of these needs could be covered by adding two optional arguments DOMAIN and CATEGORY to ngettext (where the default domain "emacs" will be hard-coded). As a convenience not to require a package to add its domain to every ngettext call, maybe when something like 'defdomain' is declared at the beginning of the package, its value should affect the domain within the package scope.