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: package.el strings Date: Sat, 15 Jul 2017 23:48:57 +0900 Message-ID: References: <83y3rpeubc.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500130184 24300 195.159.176.226 (15 Jul 2017 14:49:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 14:49:44 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 15 16:49:41 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 1dWOO2-00061a-FJ for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2017 16:49:38 +0200 Original-Received: from localhost ([::1]:42323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWOO7-0000Zv-Q8 for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2017 10:49:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWONV-0000WI-UR for emacs-devel@gnu.org; Sat, 15 Jul 2017 10:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWONS-0001n2-Rr for emacs-devel@gnu.org; Sat, 15 Jul 2017 10:49:06 -0400 Original-Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]:34479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWONS-0001m2-Km for emacs-devel@gnu.org; Sat, 15 Jul 2017 10:49:02 -0400 Original-Received: by mail-pf0-x229.google.com with SMTP id q85so58057980pfq.1 for ; Sat, 15 Jul 2017 07:49:00 -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=SaiL58Z+LrhxUL718XtnIXsjAm7l955Ja8Q0uTXAbdw=; b=RBaWzQgih+vOZnXrLCn0aKDUMgoujZaiHJ2uLOTv6RxW02jc0uvHrZOcQrmFNZVRym bZGih13dnMFMRs94ymxEEetsBQBanwiCWneiDcdt2uK1/xM7CMEpvZSStiYOpqEF4SCv agh5VX7OYRnF4y5iRnZNex8Gi4+LSe7hkU0FoFH82ExY3YUAHGaqlNB/8liYPOlkdU6/ Xy0622Q4xr4LTYH9vU9GF4NaYRcsKGbNbve+5HosIPAspm1V+NMe+nPw2g8/Ax0tF1bu Y8LdDbUja4WiiecOFX5tY3U0AKnhKuimg6MTfOLrtQquvV1DCJx8gjxeXtaqD1iv5lrd EU1g== 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=SaiL58Z+LrhxUL718XtnIXsjAm7l955Ja8Q0uTXAbdw=; b=pzOdIUwCN1AzW+LntK+a59y5536HvAlqTQdzo/xBFO7w27VVG459ILiP6PSK/aqhAT waHavs8/dxTHXPS7RDfqxt5pzCcDTJRinRPcfhxPq+ytRgNhfASOoZxap6vYP+f8B0IW eHAkjhDXArdyJDCNJQzGh5jHsuvdZgrb4nq5quh76lfY4DFJtSWfnaEbALTppR5iy8oF /jOpek7k7zaVNDxXzkIvWl0iJ02MvRJbn5o+rzTnkRwooYicX/Hv5R8pZNsOY5UdTKDK uaT1OoF7SIGdNRXFWfpfCMCOhzlevr0AZ9Ok6ni7xoNArnW0EFxn57yQrrHVz9tc5Okw Wnxw== X-Gm-Message-State: AIVw1138b7zJwG877B6do3Fa3S75p5OLPFVuRJ4u3rkRUvaW94DvxHir OBVOm19pdP7PPEyfVqc= X-Received: by 10.98.42.4 with SMTP id q4mr10783001pfq.143.1500130139681; Sat, 15 Jul 2017 07:48:59 -0700 (PDT) Original-Received: from [192.168.24.55] (pl2587.ag0304.nttpc.ne.jp. [128.53.196.27]) by smtp.gmail.com with ESMTPSA id z69sm4291169pgz.42.2017.07.15.07.48.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jul 2017 07:48:58 -0700 (PDT) In-Reply-To: <83y3rpeubc.fsf@gnu.org> 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::229 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:216689 Archived-At: > On Jul 15, 2017, at 21:52, Eli Zaretskii wrote: >> - (message "Importing %s...done" (file-name-nondirectory file)))) >> + (message "Importing %s... Done" (file-name-nondirectory file)))) >=20 > Can you tell why this is needed? The current code is how we say this > in a lot of places, and I don't think I see why it's bad for l10n. I thought there was a typo with the lack of space between the ... and = the "done" and the lack upper case after a ... punctuation mark. If it = is not, I'm fine with the original. >> - (format "%s packages will be installed:\n%s, = proceed?" >> + (format "Number of packages to install: %s (%s), = proceed? " >> (length available) >> - (mapconcat #'symbol-name available ", "))) >> + (mapconcat #'symbol-name available " "))) >=20 > You've removed the newline, so the prompt will wrap at some random > place. Is it really a good idea? It was not a problem as far as I tested it since the package names are = separated by a space (depending on the number of packages the original = list itself can wrap in unexpected places). > Also, I'd lose the "Number" part, and use %d for format, so it's clear > to translators that a number will follow. Ok. Like: >> "Packages to install: %d (%s), proceed? " ? >> - (prin1 name) >> - (princ " is ") >> - (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a ")) >> - (princ status) >> - (princ " package.\n\n") >> + (let ((sentence (format "The status of package %S is `%s'.\n\n" = name status))) >> + (princ sentence)) >=20 > Too wordy for my liking. How about this: >=20 > (princ (format "Package %S is %s.\n\n" name status)) Nice :) It took me a while to figure out how to put all the parts = together... >> - (concat >> - (when delete "Delete ") >> - (package-menu--list-to-prompt delete) >> - (when (and delete install) >> - (if upgrade "; " "; and ")) >> - (when install "Install ") >> - (package-menu--list-to-prompt install) >> - (when (and upgrade (or install delete)) "; and ") >> - (when upgrade "Upgrade ") >> - (package-menu--list-to-prompt upgrade) >> - "? "))) >> + (format "Number of packages to delete: %s / install: %s / = upgrade: %s, proceed? " >> + (package-menu--list-to-prompt delete) >> + (package-menu--list-to-prompt install) >> + (package-menu--list-to-prompt upgrade)))) >=20 > This loses the feature of saying just what's needed, instead of > showing zero. Can we do better? If you ask, there probably is a way... I'll try to find something = better. Jean-Christophe=