From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs i18n Date: Thu, 07 Mar 2019 16:46:02 +0200 Message-ID: <83o96mbv4l.fsf@gnu.org> 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> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="129222"; mail-complaints-to="usenet@blaine.gmane.org" Cc: juri@linkov.net, eggert@cs.ucla.edu, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 07 16:22:59 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 1h1urJ-000XOj-NZ for ged-emacs-devel@m.gmane.org; Thu, 07 Mar 2019 16:22:57 +0100 Original-Received: from localhost ([127.0.0.1]:53683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1urI-0007kp-Jl for ged-emacs-devel@m.gmane.org; Thu, 07 Mar 2019 10:22:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1uI2-0002lH-9v for emacs-devel@gnu.org; Thu, 07 Mar 2019 09:46:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1uI1-0007Ku-F7; Thu, 07 Mar 2019 09:46:29 -0500 Original-Received: from [176.228.60.248] (port=4026 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h1uHu-0007DU-1H; Thu, 07 Mar 2019 09:46:22 -0500 In-reply-to: (message from Richard Stallman on Wed, 06 Mar 2019 22:42:06 -0500) 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:233887 Archived-At: > From: Richard Stallman > Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org, juri@linkov.net > Date: Wed, 06 Mar 2019 22:42:06 -0500 > > > If we do that, how do we deal with strings that are computed by > > concatenation or formatting? > > Feed them in through %s or something like that. But then the strings that are formatted via %s will not be translated, they will remain in English. > I'm proposing the convention that the first argument to 'message' gets > by default translated, and other arguments don't. With this > convention, whichever result you want, it is clear how to get it. > > We already do things basically this way, because if you want to > compute a string to be the message, you don't want % to be treated > specially in it. So you use "%s" as the first argument and pas that > string as the second. For the point I'm trying to make, it is immaterial whether the first argument is "%s" and the second argument is computed from several sources, or the first argument is that computed string. The problems that follow are the same. > > They get in one piece to functions like > > 'message', but the catalog will not hold that concatenated string, it > > will have the parts separately. > > That would happen if the catalog is made ONLY by scanning the source. > That's why I suggested a feature to record whatever nontrivial format > strings are passed to 'message' and are not in the catalog. Such a feature will only help when a given call to 'message' produce a small number of fixed text strings. If the text it produces includes some non-deterministic ingredient, this method will not help.