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: Thu, 21 Jun 2018 01:19:17 +0900 Message-ID: References: <83y3rpeubc.fsf@gnu.org> <07C02D08-66BB-4454-AA25-B512BFC39A2A@gmail.com> <83vamk965y.fsf@gnu.org> <84FCCBF3-F20F-48E2-B05E-F6DB218D8896@gmail.com> <87lgdarcwi.fsf@gmail.com> <87in8eqk93.fsf@gmail.com> <87wowroub1.fsf@gmail.com> <83fu1ltrdc.fsf@gnu.org> <83efh5tql6.fsf@gnu.org> <897F2F9F-8534-460F-9077-68A59E866EEA@gmail.com> <83in6dsbar.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_694D21DC-1542-49E6-99B4-54AF91C969B6" X-Trace: blaine.gmane.org 1529511451 7696 195.159.176.226 (20 Jun 2018 16:17:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2018 16:17:31 +0000 (UTC) Cc: npostavs@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 20 18:17:27 2018 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 1fVfnR-0001rL-Fm for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2018 18:17:25 +0200 Original-Received: from localhost ([::1]:50729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVfpY-0001pV-PY for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2018 12:19:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVfpR-0001pQ-Rb for emacs-devel@gnu.org; Wed, 20 Jun 2018 12:19:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVfpQ-0007kh-QJ for emacs-devel@gnu.org; Wed, 20 Jun 2018 12:19:29 -0400 Original-Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:44894) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVfpM-0007jQ-1Z; Wed, 20 Jun 2018 12:19:24 -0400 Original-Received: by mail-pf0-x241.google.com with SMTP id h12-v6so43872pfk.11; Wed, 20 Jun 2018 09:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=kbce3l21hzKWvVI2hCVd+j620Qc1IaI3DX7iwtAppgs=; b=PYx2vztgJ6TowgGOibaPgXgTsl7b+DEwZbuBjZSPvrENjHTpkxolVHCgkbSfS4NIuc g/WZ/9QSW6FS9+fG+AWYWlcB4UTV6h4WMuRKzlbgqhjadV4CChxeJ33KQ5rAd5+C4Pfe dVbiz8RrE/sJXzOUG9yBoWd8PXkxrmdazMZ93KgbTbNcedILTCvuh01av5bR5Rfmvabk A9dd4/zkn/QpCDCgWki+cQIU1wHycIT3bwMo3g8ewH+atRt3/12w62EVzOoFUbQAQ3gR VY+2cJ4ZaYXQb9PcXjhjl1no5M56pyFm+twOu/cP3doYTSwQ/OGVNC2yfC3H8zmcHpQU ++kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=kbce3l21hzKWvVI2hCVd+j620Qc1IaI3DX7iwtAppgs=; b=hLIrp5jpO9Ni2ZlfjiCgwtOIHXHDVfzuLLEZdgvfcgpgiCDnRt+TkrPkk8bG1JHglR jV64tRcU6G37yJ11289YKqCz/RsaSNITi6W/3buIUgrIBoh05vDbT8DEZOPPuPEt8+aT pWjL7U84ouyp5IwqbHMN3plSDp6ak1GNjYtsGYIk+SAC+/R0d85gkHQrFUI2/NXQumgy chabnSxk5bXj9FivE4t3kPlvrY2wPGO/iJdDWR1jy3/qtn3OhLPkjlnvfj90Kpgitwqa 3DHB8tDVhJpHOnfE8Ajv78w+b+ef4AFc14z8PaNYJn2ntiAUWtDkzso7BFg/o60tZ5Tk NNDw== X-Gm-Message-State: APt69E2epZx8WxevJPnCm7GOTkW58h7WCBNdVVoJ9LFDLO/rx4uOPvOJ /WP7+Bq5foI+oHEH5rHHOUOcsg== X-Google-Smtp-Source: ADUXVKL1xlixhIsZKU0TR6SzxZlgcBGirA6UP10C9lURenaWL5/uTWLGozjvsAAfLcYR3x5d07sTjA== X-Received: by 2002:a63:6741:: with SMTP id b62-v6mr19586253pgc.5.1529511562853; Wed, 20 Jun 2018 09:19:22 -0700 (PDT) Original-Received: from [192.168.1.7] (pl31219.ag0304.nttpc.ne.jp. [111.89.224.243]) by smtp.gmail.com with ESMTPSA id t67-v6sm6063091pfg.51.2018.06.20.09.19.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 09:19:21 -0700 (PDT) In-Reply-To: <83in6dsbar.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.8.2) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 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:226555 Archived-At: --Apple-Mail=_694D21DC-1542-49E6-99B4-54AF91C969B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Et voil=C3=A0 ! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D * lisp/emacs-lisp/package.el: reformat message strings for future l10n =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Jean-Christophe=20 > On Jun 21, 2018, at 0:54, Eli Zaretskii wrote: >=20 >> From: Jean-Christophe Helary >> Date: Wed, 20 Jun 2018 22:53:56 +0900 >> Cc: Eli Zaretskii , >> Noam Postavsky >>=20 >> Do you prefer that I remove this hunk ? >=20 > Yes. Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --Apple-Mail=_694D21DC-1542-49E6-99B4-54AF91C969B6 Content-Type: multipart/mixed; boundary="Apple-Mail=_DA16C768-13BE-4542-A196-6A963F27929F" --Apple-Mail=_DA16C768-13BE-4542-A196-6A963F27929F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Et = voil=C3=A0 !

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
* lisp/emacs-lisp/package.el: reformat = message strings for future l10n
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D

= --Apple-Mail=_DA16C768-13BE-4542-A196-6A963F27929F Content-Disposition: attachment; filename=package.el_0621.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="package.el_0621.diff" Content-Transfer-Encoding: 7bit On branch l10n Your branch is up to date with 'origin/master'. Changes to be committed: (use "git reset HEAD ..." to unstage) modified: lisp/emacs-lisp/package.el diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 94d98178c4..8219b62d83 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1015,6 +1015,7 @@ package-buffer-info (let ((file-name (match-string-no-properties 1)) (desc (match-string-no-properties 2)) (start (line-beginning-position))) +;; The terminating comment could be a generic string that is not in English (unless (search-forward (concat ";;; " file-name ".el ends here")) (error "Package lacks a terminating comment")) ;; Try to include a trailing newline. @@ -1552,7 +1553,7 @@ package--download-one-archive (let* ((location (cdr archive)) (name (car archive)) (content (buffer-string)) - (dir (expand-file-name (format "archives/%s" name) package-user-dir)) + (dir (expand-file-name (concat "archives/" name) package-user-dir)) (local-file (expand-file-name file dir))) (when (listp (read-from-string content)) (make-directory dir t) @@ -2034,12 +2035,12 @@ package-install-selected-packages (cond (available (when (y-or-n-p - (format "%s packages will be installed:\n%s, proceed?" + (format "Packages to install: %d (%s), proceed? " (length available) - (mapconcat #'symbol-name available ", "))) + (mapconcat #'symbol-name available " "))) (mapc (lambda (p) (package-install p 'dont-select)) available))) ((> difference 0) - (message "%s packages are not available (the rest already installed), maybe you need to `M-x package-refresh-contents'" + (message "Packages that are not available: %d (the rest is already installed), maybe you need to `M-x package-refresh-contents'" difference)) (t (message "All your packages are already installed")))))) @@ -2158,9 +2159,9 @@ package-autoremove (let ((removable (package--removable-packages))) (if removable (when (y-or-n-p - (format "%s packages will be deleted:\n%s, proceed? " + (format "Packages to delete: %d (%s), proceed? " (length removable) - (mapconcat #'symbol-name removable ", "))) + (mapconcat #'symbol-name removable " "))) (mapc (lambda (p) (package-delete (cadr (assq p package-alist)) t)) removable)) @@ -2247,12 +2248,9 @@ describe-package-1 (setq status "available obsolete")) (when incompatible-reason (setq status "incompatible")) - (prin1 name) - (princ " is ") - (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a ")) - (princ status) - (princ " package.\n\n") + (princ (format "Package %S is %s.\n\n" name status)) + ;; TODO: remove the string decorations and reformat the strings for future l10n (package--print-help-section "Status") (cond (built-in (insert (propertize (capitalize status) @@ -2634,9 +2632,9 @@ package-menu-toggle-hiding (user-error "The current buffer is not a Package Menu")) (setq package-menu--hide-packages (not package-menu--hide-packages)) - (message "%s packages" (if package-menu--hide-packages - "Hiding obsolete or unwanted" - "Displaying all")) + (if package-menu--hide-packages + (message "Hiding obsolete or unwanted packages") + (message "Displaying all packages")) (revert-buffer nil 'no-confirm)) (defun package--remove-hidden (pkg-list) @@ -2960,11 +2958,11 @@ package-menu-hide-package (let ((hidden (cl-remove-if-not (lambda (e) (string-match re (symbol-name (car e)))) package-archive-contents))) - (message (substitute-command-keys - (concat "Hiding %s packages, type `\\[package-menu-toggle-hiding]'" - " to toggle or `\\[customize-variable] RET package-hidden-regexps'" - " to customize it")) - (length hidden))))) + (message "Packages to hide: %d. Type `%s' to toggle or `%s' to customize" + (length hidden) + (substitute-command-keys "\\[package-menu-toggle-hidding]") + (substitute-command-keys "\\[customize-variable] RET package-hidden-regexps"))))) + (defun package-menu-describe-package (&optional button) "Describe the current package. @@ -3099,7 +3097,7 @@ package-menu--mark-upgrades-1 (setq package-menu--mark-upgrades-pending nil) (let ((upgrades (package-menu--find-upgrades))) (if (null upgrades) - (message "No packages to upgrade.") + (message "No packages to upgrade") (widen) (save-excursion (goto-char (point-min)) @@ -3112,9 +3110,9 @@ package-menu--mark-upgrades-1 (package-menu-mark-install)) (t (package-menu-mark-delete)))))) - (message "%d package%s marked for upgrading." - (length upgrades) - (if (= (length upgrades) 1) "" "s"))))) + (message "Packages marked for upgrading: %d" + (length upgrades))))) + (defun package-menu-mark-upgrades () "Mark all upgradable packages in the Package Menu. @@ -3137,17 +3135,12 @@ package-menu--list-to-prompt PACKAGES is a list of `package-desc' objects. Formats the returned string to be usable in a minibuffer prompt (see `package-menu--prompt-transaction-p')." - (cond - ;; None - ((not packages) "") - ;; More than 1 - ((cdr packages) - (format "these %d packages (%s)" - (length packages) - (mapconcat #'package-desc-full-name packages ", "))) - ;; Exactly 1 - (t (format-message "package `%s'" - (package-desc-full-name (car packages)))))) + ;; The case where `package' is empty is handled in + ;; package-menu--prompt-transaction-p below + (format "%d (%s)" + (length packages) + (mapconcat #'package-desc-full-name packages " "))) + (defun package-menu--prompt-transaction-p (delete install upgrade) "Prompt the user about DELETE, INSTALL, and UPGRADE. @@ -3155,16 +3148,14 @@ package-menu--prompt-transaction-p Either may be nil, but not all." (y-or-n-p (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) - "? "))) + (when delete + (format "Packages to delete: %s. " (package-menu--list-to-prompt delete))) + (when install + (format "Packages to install: %s. " (package-menu--list-to-prompt install))) + (when upgrade + (format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade))) + "Proceed? "))) + (defun package-menu--partition-transaction (install delete) "Return an alist describing an INSTALL DELETE transaction. @@ -3248,25 +3239,24 @@ package-menu-execute (when (or noquery (package-menu--prompt-transaction-p .delete .install .upgrade)) (let ((message-template - (concat "Package menu: Operation %s [" - (when .delete (format "Delet__ %s" (length .delete))) - (when (and .delete .install) "; ") - (when .install (format "Install__ %s" (length .install))) - (when (and .upgrade (or .install .delete)) "; ") - (when .upgrade (format "Upgrad__ %s" (length .upgrade))) + (concat "[ " + (when .delete + (format "Delete %d " (length .delete))) + (when .install + (format "Install %d " (length .install))) + (when .upgrade + (format "Upgrade %d " (length .upgrade))) "]"))) - (message (replace-regexp-in-string "__" "ing" message-template) "started") + (message "Operation %s started" message-template) ;; Packages being upgraded are not marked as selected. (package--update-selected-packages .install .delete) (package-menu--perform-transaction install-list delete-list) (when package-selected-packages (if-let* ((removable (package--removable-packages))) - (message "Package menu: Operation finished. %d packages %s" - (length removable) - (substitute-command-keys - "are no longer needed, type `\\[package-autoremove]' to remove them")) - (message (replace-regexp-in-string "__" "ed" message-template) - "finished")))))))) + (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them" + (length removable) + (substitute-command-keys "\\[package-autoremove]")) + (message "Operation %s finished" message-template)))))))) (defun package-menu--version-predicate (A B) (let ((vA (or (aref (cadr A) 1) '(0))) @@ -3333,11 +3323,11 @@ package-menu--populate-new-package-list (defun package-menu--find-and-notify-upgrades () "Notify the user of upgradable packages." (when-let* ((upgrades (package-menu--find-upgrades))) - (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." - (length upgrades) - (if (= (length upgrades) 1) "" "s") - (substitute-command-keys "\\[package-menu-mark-upgrades]") - (if (= (length upgrades) 1) "it" "them")))) + (message "Packages that can be upgraded: %d; type `%s' to mark for upgrading." + (length upgrades) + (substitute-command-keys "\\[package-menu-mark-upgrades]")) + )) + (defun package-menu--post-refresh () "If there's a *Packages* buffer, revert it and check for new packages and upgrades. --Apple-Mail=_DA16C768-13BE-4542-A196-6A963F27929F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

Jean-Christophe 

On Jun = 21, 2018, at 0:54, Eli Zaretskii <eliz@gnu.org> wrote:

From: Jean-Christophe = Helary <brandelune@gmail.com>
Date: Wed, 20 Jun = 2018 22:53:56 +0900
Cc: Eli Zaretskii <eliz@gnu.org>,
Noam Postavsky <npostavs@gmail.com>

Do = you prefer that I remove this hunk ?

Yes.

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


= --Apple-Mail=_DA16C768-13BE-4542-A196-6A963F27929F-- --Apple-Mail=_694D21DC-1542-49E6-99B4-54AF91C969B6--