[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package.el strings
From: |
Jean-Christophe Helary |
Subject: |
Re: package.el strings |
Date: |
Sat, 15 Jul 2017 23:48:57 +0900 |
> On Jul 15, 2017, at 21:52, Eli Zaretskii <address@hidden> wrote:
>> - (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.
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 " ")))
>
> 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))
>
> Too wordy for my liking. How about this:
>
> (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))))
>
> 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