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: Wed, 06 Mar 2019 22:19:11 +0200 Message-ID: <83zhq7bvsw.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> <65e3fe78-3264-12ff-1edf-a05bfd86a9a9@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259648"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org, rms@gnu.org, juri@linkov.net To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 06 21:19:40 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 1h1d0u-0015Ry-Bm for ged-emacs-devel@m.gmane.org; Wed, 06 Mar 2019 21:19:40 +0100 Original-Received: from localhost ([127.0.0.1]:39078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1d0t-0002L2-9E for ged-emacs-devel@m.gmane.org; Wed, 06 Mar 2019 15:19:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1d0h-0002Kw-Iz for emacs-devel@gnu.org; Wed, 06 Mar 2019 15:19:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1d0f-0001pb-Cn; Wed, 06 Mar 2019 15:19:25 -0500 Original-Received: from [176.228.60.248] (port=3739 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h1d0Z-0006FR-9D; Wed, 06 Mar 2019 15:19:19 -0500 In-reply-to: <65e3fe78-3264-12ff-1edf-a05bfd86a9a9@cs.ucla.edu> (message from Paul Eggert on Wed, 6 Mar 2019 11:47:23 -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:233871 Archived-At: > Cc: juri@linkov.net, emacs-devel@gnu.org > From: Paul Eggert > Date: Wed, 6 Mar 2019 11:47:23 -0800 > > On 3/6/19 10:15 AM, Eli Zaretskii wrote: > > > how do we deal with strings that are computed by concatenation or > > formatting? > > > The same way that other GNU packages deal with them: we redo calls, to > make the strings easier to translate. For example, instead of this code > (adapted from todo-mode.el): > >   (message (concat "The highlighted item" (if (= count 1) " is " "s > precedes ") >                    "the timestamp %s.") >            timestamp) > > we do something like this: > >   (nmessage count >             "The highlighted item is not up to date." >             "The highlighted items are not up to date." >             timestamp) That's the easy case. This one is a bit tougher: (message "The program says: " (shell-command-to-string "foo")) > It's inevitable that we'd need to redo Lisp code this way, as > translators cannot be expected to be programming experts that understand > arbitrary Lisp code involving 'concat' and whatnot. This is what other > GNU packages have done, and Emacs can do something similar. Except that Emacs is so much larger that doing this "like other packages" might make the job infeasible. Which is one reason why I think we should start from doc strings: they are both easier and much more important.