From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: Before l10n, better practices for (message) ? Date: Tue, 23 May 2017 10:18:46 +0900 Message-ID: References: <2623E5C5-4D40-4C9F-BFF6-181D2E69F984@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1495502379 18221 195.159.176.226 (23 May 2017 01:19:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 May 2017 01:19:39 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 23 03:19:35 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCyU3-0004di-0v for ged-emacs-devel@m.gmane.org; Tue, 23 May 2017 03:19:35 +0200 Original-Received: from localhost ([::1]:45571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCyU8-0000Fb-I3 for ged-emacs-devel@m.gmane.org; Mon, 22 May 2017 21:19:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCyTN-0000FU-3G for emacs-devel@gnu.org; Mon, 22 May 2017 21:18:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCyTJ-0000pr-VW for emacs-devel@gnu.org; Mon, 22 May 2017 21:18:53 -0400 Original-Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:34960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCyTJ-0000pi-PF for emacs-devel@gnu.org; Mon, 22 May 2017 21:18:49 -0400 Original-Received: by mail-pf0-x235.google.com with SMTP id n23so98023851pfb.2 for ; Mon, 22 May 2017 18:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=tQukFwgX/JWznekEUkxggfeDtyvdQC0W1rzou9cfOw8=; b=pnb5XOIdq1f4mVhNlI/D9fkQ/UZxehj45/WXbeGxRgxvHRteYA9t2K42dy6QRe5n35 Jm25iZy3oonZZWeWSqyt8oMn1DBjw2sVgyiXL7YDknYqJcxwI0dm2fLBS1+z4O8VpClv JLPryLI67dzdz/5QlSnj3RsHe5iYeYTx1Uo5vDBG8ZtbJFM9t1pRFCEQA8RBbGYIVi9M Yi//2YvRs8QUSqZKBUCquka/rnqY9shVydEIQlhXxAo/GIyesJWbRb19Tgu1j7qETZck DEXhy6uJmMZSUtGeM1r/qYZQtR+8ET1tlHm3A0Xrv6L30YH/pmHWo6iCuNQQf2FZOHjd tN7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=tQukFwgX/JWznekEUkxggfeDtyvdQC0W1rzou9cfOw8=; b=udT8PHSnhq+Sl1izI/wqi0V53nQzbu4GRUVrvUD94H3VE4GSNM94+Ol3cOc/8RGXjB DDVXpLeqBCuesy1Rq72eyLo33p234kHL+dp2Qi0oj6cgDzMfylAnV74akHL0zBI+ps/K noUCouzFGURwn7/acppTN7HNxCPpQddmH5c23AAQnXGdKDcEMpx0fVwoqDKRLwQmIETe HGV3du+zsbnNpd8Mz+0T4xJSs4scniGFClkWcvs/veLWKbIWAXcWTI1RAmhPDt3U1g9s VO3gbI0aPpk8sGhnbJay/AQewW+JUmpls5+OoY+8Zv0AQctbtevFRKikLjn9wOqXAXvC HAKQ== X-Gm-Message-State: AODbwcAKD8rx7uL8t38lsfnE1T3hHyl2/gnNx7kmqnTbFZnNscPeuftB Fw14IjuRZbx9cFcj9Tc= X-Received: by 10.98.217.154 with SMTP id b26mr28394371pfl.136.1495502328602; Mon, 22 May 2017 18:18:48 -0700 (PDT) Original-Received: from [192.168.24.54] (pl25298.ag0304.nttpc.ne.jp. [133.232.153.210]) by smtp.gmail.com with ESMTPSA id t13sm34245075pfa.126.2017.05.22.18.18.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 May 2017 18:18:48 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::235 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:215114 Archived-At: > On May 23, 2017, at 9:59, Tino Calancha = wrote: > On Tue, 23 May 2017, Jean-Christophe Helary wrote: >=20 >> I just bumped into an English/code bug this morning. In package.el, = when 1 package is not needed anymore, the message is: >>=20 >> "Package menu: Operation finished. 1 packages are no longer needed, = type =E2=80=98M-x package-autoremove=E2=80=99 to remove them" ... >> So I'm asking whether do we have "best practices" for using = messages... > This was discussed in > https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00502.html >=20 > I proposed to add a simple function `string-plural-s' to standarize = those > plurarizations. Yes, but no. As a person who pays his bills doing translation and l10n, I would = *never* recommend to create UI strings programatically based on = *grammatical* assumptions. In fact I would forbid that if I could :) And = I think that should be an Emacs policy for all UI strings... I'm currently going through package.el and the easiest solution I have = for now is replace things like "%d package%s to install" (where %s is = "s" depending on whether %d is greater than 1...) into "Number of = packages to install: %d.". The packages.el authors have created incredible messages where "ing" is = replaced by "ed" depending on whether the process is running or = completed, just so as to save a few lines of static strings. Of course, = the code is very clever, but if we want to create a base for l10n one = day, all these clever grammatical hacks must permanently go away... So, as I just wrote, I'm working on package.el right now and I'll submit = a patch, and when I'm done, I'd like to see what kind of mechanisms we = have (or we need to create) to extract strings and use localized = ressources. Jean-Christophe=