From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: phillip.wood@dunelm.org.uk
Cc: Junio C Hamano <gitster@pobox.com>,
Michael J Gruber <git@grubix.eu>,
git@vger.kernel.org
Subject: Re: [RFC/PATCH] sequencer: do not translate reflog messages
Date: Tue, 16 Aug 2022 13:02:38 +0200 (CEST) [thread overview]
Message-ID: <09rn6r61-38qo-4s1q-q7qq-p5onp6p87o44@tzk.qr> (raw)
In-Reply-To: <870072d5-d220-09e7-684b-f9d7d8d59c93@gmail.com>
Hi Phillip,
On Tue, 16 Aug 2022, Phillip Wood wrote:
> On 15/08/2022 21:20, Johannes Schindelin wrote:
>
> > On Fri, 12 Aug 2022, Junio C Hamano wrote:
> >
> > > Phillip Wood <phillip.wood123@gmail.com> writes:
> > >
> > > > Removing the N_() stops these strings from being extracted for
> > > > translation, but there are several callers left that are still using
> > > > _() to get the (now non-existent) translated string. I only had a
> > > > quick look but I think we should remove the _() from all the callers
> > > > of action_name().
> > >
> > > Thanks, that's all correct.
> >
> > I am afraid that it is not.
> >
> > In https://github.com/git/git/blob/v2.37.2/sequencer.c#L502-L503, for
> > example, we use the value returned by `action_name()` in a translated
> > message:
> >
> > error(_("your local changes would be overwritten by %s."),
> > _(action_name(opts)));
>
> Isn't this message using action_name() to get the name of the command that the
> user ran? As that name is not localized when the user runs the command I don't
> see that we should be translating it (and playing sentence lego with the
> result) in this message. I think the same applies to the message at line 689
> that you mention below.
I do not believe that this error message talks about the command,
otherwise it would use "`git %s`" instead of "%s" here. Imagine, for a
second, that Git was written in French and you preferred to read your
error messages in English, therefore set your locale, and you just issued
a `git retour`, would this error message read well for you?
error: your local changes would be overwritten by retour.
That looks wrong to me. I could see us changing this to:
error: your local changes would be overwritten by `git retour`.
or to:
error: your local changes would be overwritten by revert.
i.e. either use "`git %s`" without translating, or keeping "%s" with the
translated `action_name()`. But it would probably read better to have the
action name localized (which is what I suggested).
Ciao,
Dscho
next prev parent reply other threads:[~2022-08-16 11:38 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 [this message]
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 ` [PATCH 4/4 v2] sequencer: spell out command names and do not translate them Michael J Gruber
2022-08-19 9:30 ` 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=09rn6r61-38qo-4s1q-q7qq-p5onp6p87o44@tzk.qr \
--to=johannes.schindelin@gmx.de \
--cc=git@grubix.eu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
/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).