git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@grubix.eu>
To: git@vger.kernel.org
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Phillip Wood" <phillip.wood123@gmail.com>
Subject: [PATCH 4/4 v2] sequencer: spell out command names and do not translate them
Date: Fri, 19 Aug 2022 09:50:48 +0200	[thread overview]
Message-ID: <ef8b4536322eebd2bed53157f43349e9158631ae.1660894946.git.git@grubix.eu> (raw)
In-Reply-To: <xmqqilmpnvad.fsf@gitster.g>

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.

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


  reply	other threads:[~2022-08-19  7:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 15:38 [RFC/PATCH] sequencer: do not translate reflog messages Michael J Gruber
2022-08-12 17:21 ` Junio C Hamano
2022-08-12 19:21 ` Phillip Wood
2022-08-12 20:43   ` Junio C Hamano
2022-08-15 20:20     ` Johannes Schindelin
2022-08-16  8:59       ` Phillip Wood
2022-08-16 11:02         ` Johannes Schindelin
2022-08-18 13:13           ` [PATCH 0/4] sequencer: clarify translations Michael J Gruber
2022-08-18 13:13             ` [PATCH 1/4] sequencer: do not translate reflog messages Michael J Gruber
2022-08-18 14:55               ` Ævar Arnfjörð Bjarmason
2022-08-19  9:25                 ` Johannes Schindelin
2022-08-19 15:12                   ` Ævar Arnfjörð Bjarmason
2022-08-19 20:44                     ` Junio C Hamano
2022-08-19 21:13                       ` Ævar Arnfjörð Bjarmason
2022-08-19 22:42                         ` Junio C Hamano
2022-08-19 23:33                           ` Ævar Arnfjörð Bjarmason
2022-08-20  8:56                         ` Jeff King
2022-08-20 21:20                           ` Junio C Hamano
2022-08-18 13:13             ` [PATCH 2/4] sequencer: do not translate parameters to error_resolve_conflict() Michael J Gruber
2022-08-18 15:01               ` Ævar Arnfjörð Bjarmason
2022-08-18 15:23                 ` Michael J Gruber
2022-08-18 20:30                   ` Junio C Hamano
2022-08-19  9:26                 ` Johannes Schindelin
2022-08-19 17:36                   ` Junio C Hamano
2022-08-22 13:53                     ` Johannes Schindelin
2022-08-22 16:12                       ` Junio C Hamano
2022-08-18 13:13             ` [PATCH 3/4] sequencer: do not translate command names Michael J Gruber
2022-08-18 13:13             ` [PATCH 4/4] po: adjust README to code Michael J Gruber
2022-08-18 15:03               ` Ævar Arnfjörð Bjarmason
2022-08-18 20:36               ` Junio C Hamano
2022-08-19  7:50                 ` Michael J Gruber [this message]
2022-08-19  9:30                   ` [PATCH 4/4 v2] sequencer: spell out command names and do not translate them Johannes Schindelin
2022-08-19  9:32             ` [PATCH 0/4] sequencer: clarify translations Johannes Schindelin
2022-08-19 10:19               ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef8b4536322eebd2bed53157f43349e9158631ae.1660894946.git.git@grubix.eu \
    --to=git@grubix.eu \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).