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: Mon, 25 Mar 2019 23:11:30 +0200 Organization: LINKOV.NET Message-ID: <87a7hir9xp.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> 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="194610"; 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: brandelune@gmail.com, Eli Zaretskii , cpitclaudel@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 25 22:37:04 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 1h8XHE-000oUG-Kx for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2019 22:37:04 +0100 Original-Received: from localhost ([127.0.0.1]:48911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8XHD-0002As-Kh for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2019 17:37:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8XDd-0008V4-7c for emacs-devel@gnu.org; Mon, 25 Mar 2019 17:33:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8XDc-0003WD-77 for emacs-devel@gnu.org; Mon, 25 Mar 2019 17:33:21 -0400 Original-Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:46499) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8XDa-0003PK-FO; Mon, 25 Mar 2019 17:33:18 -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 140606A126D; Mon, 25 Mar 2019 21:33:17 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a57.g.dreamhost.com (100-96-9-134.trex.outbound.svc.cluster.local [100.96.9.134]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 46B216A0B94; Mon, 25 Mar 2019 21:33:16 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a57.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Mon, 25 Mar 2019 21:33:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Sponge-Hook: 20dbf0ca5dccea4b_1553549596921_2103878637 X-MC-Loop-Signature: 1553549596921:3737539047 X-MC-Ingress-Time: 1553549596920 Original-Received: from pdx1-sub0-mail-a57.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a57.g.dreamhost.com (Postfix) with ESMTP id 31B5C8004D; Mon, 25 Mar 2019 14:33:15 -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=DnwsRr YAf/ZrJH8FJ9qk/aJVDm8=; b=N8wYC+VS0Oe0JSKDJ+pD7vFiiMYlU3GCBNCadq OpCpCsCy6sh3LOY6MZGa+UM2v3wDOED2ywjf9HeoMZyOwjL0vdo3pGS3hzlrFNRM C7piCDl97xEdV7FSieReLwQveBirIzaqqw5O1KJLWc6kqVOpFi7XOIpHNFtacFb+ q4svo= 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-a57.g.dreamhost.com (Postfix) with ESMTPSA id D491D7FFF0; Mon, 25 Mar 2019 14:33:11 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a57 In-Reply-To: ("Mattias \=\?iso-8859-1\?Q\?Engdeg\=E5rd\=22's\?\= message of "Mon, 25 Mar 2019 11:52:45 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrjeekgdduheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtkedrvdehtdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdekrddvhedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepmhgrthhtihgrshgvsegrtghmrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.209.151 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:234730 Archived-At: > + (cons (format (ngettext "finished with %d match found= \n" > + "finished with %d matches fou= nd\n" > + grep-num-matches-found) > + grep-num-matches-found) > > ("^Grep[/a-zA-Z]* started.*" > (0 '(face nil compilation-message nil help-echo nil mouse-face n= il) t)) > - ("^Grep[/a-zA-Z]* finished with \\(?:\\(\\(?:[0-9]+ \\)?matches=20 > found\\)\\|\\(no matches found\\)\\).*" > + ("^Grep[/a-zA-Z]* finished with \\(?:\\(\\(?:[0-9]+ \\)?match\\(?= :es\\)?=20 > found\\)\\|\\(no matches found\\)\\).*" > > Since it is not uncommon in Emacs to pattern-match on generated text, > either the translator needs to understand regexps well or the code > must be restructured to avoid that kind of matching, perhaps by using > text properties. Besides, translating regexp strings precludes the use > of modern regexp notations like rx, since gettext is string-oriented. Is it possible to generate a regexp from ngettext arguments? For example, given the same arguments and calling a hypothetical function =E2=80=98rx-ngettext=E2=80=99: (rx-ngettext "finished with %d match found\n" "finished with %d matches found\n") to generate a regexp like: "finished with \\(?:\\(\\(?:[0-9]+ \\)?match\\(?:es\\)? found\\)"