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

Re: [PATCH 4/4 v2] sequencer: spell out command names and do not translate them

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 19, 2022, 09:30 UTC
Message-ID
<o4op5qqo-206p-on30-49q7-n1qp4859q0n7@tzk.qr>
In-Reply-To
<ef8b4536322eebd2bed53157f43349e9158631ae.1660894946.git.git@grubix.eu>
Hi Michael & Junio,
On Fri, 19 Aug 2022, Michael J Gruber wrote:
Show 15 quoted lines
> When we talk about sequencer action names as such we do translate the
> action name. In all cases, we talk about the like-named git command
> name, though, which is not translated.
>
> In order to make the correspondence clearer, reword those error messages
> to use the (untranslated) git command name, and adjust the po README to
> match the code base.
>
> Signed-off-by: Michael J Gruber <git@grubix.eu>
> ---
> I guess there are two extreme views regarding these cases (in terms of
> how much to translate) and a few in between. v2 here implements the
> one of these. As a result, we don't need to N_()-mark the action names
> any more unless I'm overlooking something. I'm holding this back until
> the consensus is clear.
Thank you for being careful.

In general, I would like to leave the decision whether or not to mention the _English_ word for an operation (or whether to treat the error message's prefix as a short-hand for the Git command) to the l10n maintainer, so that things can be consistent between translations.

Ciao, Dscho

Show 51 quoted lines
> Overall, we are not consistent with the prefixes in our error messages
> (command or not) nor the capitalisation. One could say that at the point
> of an error/die worse has gone wrong than the wording, of course ;)
>
>  po/README.md | 2 +-
>  sequencer.c  | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/po/README.md b/po/README.md
> index 3e4f897d93..7b7ad24412 100644
> --- a/po/README.md
> +++ b/po/README.md
> @@ -273,7 +273,7 @@ General advice:
>
>    ```c
>    /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
> -  die(_("%s: Unable to write new index file"), action_name(opts));
> +  die(_("git %s: unable to write new index file"), action_name(opts));
>    ```
>
>  We provide wrappers for C, Shell and Perl programs. Here's how they're
> diff --git a/sequencer.c b/sequencer.c
> index 79dad522f5..c26dc46268 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -539,8 +539,8 @@ static int error_dirty_index(struct repository *repo, struct replay_opts *opts)
>  	if (repo_read_index_unmerged(repo))
>  		return error_resolve_conflict(action_name(opts));
>
> -	error(_("your local changes would be overwritten by %s."),
> -		_(action_name(opts)));
> +	error(_("git %s: your local changes would be overwritten"),
> +		action_name(opts)));
>
>  	if (advice_enabled(ADVICE_COMMIT_BEFORE_MERGE))
>  		advise(_("commit your changes or stash them to proceed."));
> @@ -725,8 +725,8 @@ static int do_recursive_merge(struct repository *r,
>  		 * TRANSLATORS: %s will be "revert", "cherry-pick" or
>  		 * "rebase".
>  		 */
> -		return error(_("%s: Unable to write new index file"),
> -			_(action_name(opts)));
> +		return error(_("git %s: unable to write new index file"),
> +			action_name(opts));
>
>  	if (!clean)
>  		append_conflicts_hint(r->index, msgbuf,
> --
> 2.37.2.653.g5b2587383a
>
>
Previous: Michael J GruberNext: Johannes Schindelin
Message 32 of 34 in “sequencer: do not translate reflog messages”
  1. sequencer: do not translate reflog messagesMichael J Gruber, Aug 12, 2022
  2. Junio C HamanoAug 12, 2022
  3. Phillip WoodAug 12, 2022
  4. Junio C HamanoAug 12, 2022
  5. Johannes SchindelinAug 15, 2022
  6. Phillip WoodAug 16, 2022
  7. Johannes SchindelinAug 16, 2022
  8. 0/4 sequencer: clarify translationsMichael J Gruber, Aug 18, 2022
  9. 3/4 sequencer: do not translate command namesMichael J Gruber, Aug 18, 2022
  10. 1/4 sequencer: do not translate reflog messagesMichael J Gruber, Aug 18, 2022
  11. Ævar Arnfjörð BjarmasonAug 18, 2022
  12. Johannes SchindelinAug 19, 2022
  13. Ævar Arnfjörð BjarmasonAug 19, 2022
  14. Junio C HamanoAug 19, 2022
  15. Ævar Arnfjörð BjarmasonAug 19, 2022
  16. Junio C HamanoAug 19, 2022
  17. Ævar Arnfjörð BjarmasonAug 19, 2022
  18. Jeff KingAug 20, 2022
  19. Junio C HamanoAug 20, 2022
  20. 2/4 sequencer: do not translate parameters to error_resolve_conflict()Michael J Gruber, Aug 18, 2022
  21. Ævar Arnfjörð BjarmasonAug 18, 2022
  22. Michael J GruberAug 18, 2022
  23. Junio C HamanoAug 18, 2022
  24. Johannes SchindelinAug 19, 2022
  25. Junio C HamanoAug 19, 2022
  26. Johannes SchindelinAug 22, 2022
  27. Junio C HamanoAug 22, 2022
  28. 4/4 po: adjust README to codeMichael J Gruber, Aug 18, 2022
  29. Ævar Arnfjörð BjarmasonAug 18, 2022
  30. Junio C HamanoAug 18, 2022
  31. 4/4 sequencer: spell out command names and do not translate themMichael J Gruber, Aug 19, 2022
  32. Johannes SchindelinAug 19, 2022
  33. Johannes SchindelinAug 19, 2022
  34. Michael J GruberAug 19, 2022

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.