From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: Emacs i18n Date: Wed, 24 Apr 2019 15:39:16 +0900 Message-ID: <7E9097B4-C3F4-46AF-BA2A-2E886AB3C6AD@gmail.com> 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> <878sx1cjl5.fsf@mail.linkov.net> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_973E682E-8E3E-474E-8E57-29837F890159" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="91874"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Paul Eggert , Emacs developers To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 24 08:46:02 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 1hJBfL-000Nf7-2c for ged-emacs-devel@m.gmane.org; Wed, 24 Apr 2019 08:45:59 +0200 Original-Received: from localhost ([127.0.0.1]:36821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJBfK-00038a-24 for ged-emacs-devel@m.gmane.org; Wed, 24 Apr 2019 02:45:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJBf8-0002vl-2r for emacs-devel@gnu.org; Wed, 24 Apr 2019 02:45:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJBYx-0002Az-9U for emacs-devel@gnu.org; Wed, 24 Apr 2019 02:39:24 -0400 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:41305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJBYw-00028T-Ue for emacs-devel@gnu.org; Wed, 24 Apr 2019 02:39:23 -0400 Original-Received: by mail-pl1-x631.google.com with SMTP id d9so2840007pls.8 for ; Tue, 23 Apr 2019 23:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=1fH17+NfP8jUtdEDMWiSEW1qC/5VCHq/LykU+NGiViU=; b=Dl+FYtYJvSLExupRjkh52cMt/Z0hw/k88Dh/Ga/OnKPjK/WBsuZxO3s9ytC/XmqsPS NNiV8Lz8O22pKupP9rNRbpVwl80nRyjLamm9rw+xs0ssEZ8fUfZVcgWqWcEpguXqPdxK 5Eeb1wGaSPbUdOI/rmxon1mcb6Ujj+OTdXnPe7+/2mtvoCrR8aS3/sn6GT3QTPg6P6QQ zJhtmZsYBqFqG3iwJ3uIFoadJfSVlnltRpuvd9BPPce2ESKosc13HnNIuLDvV96byq9d 0y1t2N2LAs+d1vNoJEYWY7JlrC4lAQYymQo4SZZRHwwy6Q4d2DU0giRzU8h++B535THf tDDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=1fH17+NfP8jUtdEDMWiSEW1qC/5VCHq/LykU+NGiViU=; b=iZS7OSWoxmEwA6NjsZOFPTWGcgWVLtvxAQFYhddKb+DDE40/FpFBG67eiSDgluPdAE UR/2lXuXRFPt+mytjzWjnr9powkDirydpRwD41vKIXe9x0r4xZHcakyEEwVoLRlaJwWi 1AmSqNgtYleA11y9yTzOnMSlrKA72PUdSmEVMJ0VMfyMoY17ZD8gjZs+T6lFouHKBCrb 0GnFpxDgtxFEsaxtCfNaB38MwK8S8tvGzGIfd42tU2ZtE/bRolstHnxusZjNMwpfaE4i DQcxw3tjLDB0vmrs5KRMTZDpn0fQAqs3apXIwN92rhu2TwkUzV6aMFxaXMK5raKjq+UE 60mQ== X-Gm-Message-State: APjAAAVDq0B5xNXdG3Zsgwr9RbQTPGZLwzUO6/gD2Y6MZMkmF80wu1J/ QXpHJ4FmTyQ+qcLuFzr34nfClGr3 X-Google-Smtp-Source: APXvYqyAUaDBhvDa4RJ/b9Drt0sqWFYw89M3eMbuUM4ddbIDo9+AVmlGFGIzYz19aBTIWwwbD/7cHg== X-Received: by 2002:a17:902:2d04:: with SMTP id o4mr31125751plb.88.1556087961385; Tue, 23 Apr 2019 23:39:21 -0700 (PDT) Original-Received: from [10.254.2.141] ([210.160.37.44]) by smtp.gmail.com with ESMTPSA id a3sm26606610pfn.182.2019.04.23.23.39.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 23:39:19 -0700 (PDT) In-Reply-To: <878sx1cjl5.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3445.104.8) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::631 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:235844 Archived-At: --Apple-Mail=_973E682E-8E3E-474E-8E57-29837F890159 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 So, where do we go from here now ? Juri, have you written documentation ? Do you want help ? Jean-Christophe > On Mar 27, 2019, at 8:16, Juri Linkov > wrote: >=20 >>> 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=98message=E2=80=99 >>> where it still just returns the correct plurals without doing any = translation. >>=20 >> That stub had some problems: >>=20 >> 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? >=20 > 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. >=20 >> 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 = message >> 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.) >=20 > 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). >=20 > 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. Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com = @brandelune --Apple-Mail=_973E682E-8E3E-474E-8E57-29837F890159 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
So, where do we go = from here now ?

Juri, = have you written documentation ? Do you want help ?

Jean-Christophe

On Mar 27, 2019, at 8:16, Juri Linkov <juri@linkov.net> = wrote:

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=98message=E2=80=99
where = it still just returns the correct plurals without doing any = translation.

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 message
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.

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


= --Apple-Mail=_973E682E-8E3E-474E-8E57-29837F890159--