emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: package.el strings


From: Eli Zaretskii
Subject: Re: package.el strings
Date: Sat, 15 Jul 2017 15:52:23 +0300

> From: Jean-Christophe Helary <address@hidden>
> Date: Fri, 14 Jul 2017 11:53:51 +0900
> 
> It took me a lot longer than I thought but here is a diff for your comments. 
> There is a dozen modifications in the file and a few comments.

Thanks for working in this.  I have a few comments:

> @@ -1490,7 +1492,7 @@ package-import-keyring
>        (setf (epg-context-home-directory context) package-gnupghome-dir))
>      (message "Importing %s..." (file-name-nondirectory file))
>      (epg-import-keys-from-file context file)
> -    (message "Importing %s...done" (file-name-nondirectory file))))
> +    (message "Importing %s... Done" (file-name-nondirectory file))))

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.

> -               (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 " ")))

You've removed the newline, so the prompt will wrap at some random
place.  Is it really a good idea?

Also, I'd lose the "Number" part, and use %d for format, so it's clear
to translators that a number will follow.

> -        (message "%s packages are not available (the rest already 
> installed), maybe you need to `M-x package-refresh-contents'"
> +        (message "Number of packages that are not available: %s (the rest is 
> already installed), maybe you need to `M-x package-refresh-contents'"

Likewise here: I'd say "Packages not available: %d".  Same issue with
some other replacements you propose.

> -                 (format "%s packages will be deleted:\n%s, proceed? "
> +                 (format "Number of packages to delete: %s (%s), proceed? "
>                     (length removable)
> -                   (mapconcat #'symbol-name removable ", ")))
> +                   (mapconcat #'symbol-name removable " ")))

And here.

> -    (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))

Too wordy for my liking.  How about this:

  (princ (format "Package %S is %s.\n\n" name status))

> -   (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))))

This loses the feature of saying just what's needed, instead of
showing zero.  Can we do better?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]