git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Unification of user message strings

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 19, 2012, 19:39 UTC
Message-ID
<7v1uoobcsv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1332179503-2992-2-git-send-email-vfr@lyx.org>
Vincent van Ravesteijn <vfr@lyx.org> writes:
Show 26 quoted lines
> From: Vincent van Ravesteijn <vfr@lyx.org>
>
> Rewrite user messages to stick to a uniform style for all messages. From the surrounding code, the following guidelines were deduced:
> - messages start with a capital,
> - short messages do not end with a full stop,
> - paths, filenames, and commands are quoted by single quotes (if not separated by the normal text by a ':'),
> - 'could not' is used rather than 'cannot'.
>
> Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
> ---
>  gpg-interface.c |    6 +++---
>  grep.c          |    2 +-
>  help.c          |    2 +-
>  sequencer.c     |   24 ++++++++++++------------
>  4 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/gpg-interface.c b/gpg-interface.c
> index 09ab64a..5e14a21 100644
> --- a/gpg-interface.c
> +++ b/gpg-interface.c
> @@ -56,7 +56,7 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *sig
>  	args[3] = NULL;
>  
>  	if (start_command(&gpg))
> -		return error(_("could not run gpg."));
> +		return error(_("Could not run 'gpg'"));

Ok with s/c/C/, but I am not sure about the 'gpg' bit. The name of the program and path to it can be configured so the user may be expecting to run a program called gnupg, and unquoted gpg feels more like a generic term to refer to the program. It might be worth using all-CAPS, though.

Likewise for the other hunks for this file.
> -		return error(_("cannot open %s: %s"), filename,
> +		return error(_("Could not open '%s': %s"), filename,

Honestly speaking, I would personally prefer "Cannot open" over "Could not open". Yes, all the error messages report _after_ we attempted to do something and finding that we _couldn't_ do that thing, so "Could not" may be technically more correct, but still...

But that is probably just me.
Other than that, the patch looks good; let's hear from others, too.
Previous: Vincent van RavesteijnNext: Vincent van Ravesteijn
Message 3 of 10 in “Unify the style of user messages”
  1. 0/2 Unify the style of user messagesVincent van Ravesteijn, Mar 19, 2012
  2. 1/2 Unification of user message stringsVincent van Ravesteijn, Mar 19, 2012
  3. Junio C HamanoMar 19, 2012
  4. Vincent van RavesteijnMar 19, 2012
  5. Jeff KingMar 19, 2012
  6. Junio C HamanoMar 19, 2012
  7. Vincent van RavesteijnMar 20, 2012
  8. Jakub NarebskiMar 20, 2012
  9. Vincent van RavesteijnMar 20, 2012
  10. 2/2 Make some strings translatableVincent van Ravesteijn, Mar 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.