Re: [PATCH 1/4] sequencer: do not translate reflog messages
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 19, 2022, 09:25 UTC
- Message-ID
- <6oqr69o7-qsps-sr86-o4r9-16r7no9n5424@tzk.qr>
- In-Reply-To
- <220818.86zgg18umf.gmgdl@evledraar.gmail.com>
Hi Ævar,
On Thu, 18 Aug 2022, Ævar Arnfjörð Bjarmason wrote:
Show 39 quoted lines
> On Thu, Aug 18 2022, Michael J Gruber wrote:
>
> > Traditionally, reflog messages were never translated, in particular not
> > on storage.
> >
> > Due to the switch of more parts of git to the sequencer, old changes in
> > the sequencer code may lead to recent changes in git's behaviour. E.g.:
> > c28cbc5ea6 ("sequencer: mark action_name() for translation", 2016-10-21)
> > marked several uses of `action_name()` for translation. Recently, this
> > lead to a partially translated reflog:
> >
> > `rebase: fast-forward` is translated (e.g. in de to `Rebase: Vorspulen`)
> > whereas other reflog entries such as `rebase (pick):` remain
> > untranslated as they should be.
> >
> > Change the relevant line in the sequencer so that this reflog entry
> > remains untranslated, as well.
> >
> > Signed-off-by: Michael J Gruber <git@grubix.eu>
> > ---
> > sequencer.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sequencer.c b/sequencer.c
> > index 5f22b7cd37..51d75dfbe1 100644
> > --- a/sequencer.c
> > +++ b/sequencer.c
> > @@ -575,7 +575,7 @@ static int fast_forward_to(struct repository *r,
> > if (checkout_fast_forward(r, from, to, 1))
> > return -1; /* the callee should have complained already */
> >
> > - strbuf_addf(&sb, _("%s: fast-forward"), _(action_name(opts)));
> > + strbuf_addf(&sb, "%s: fast-forward", action_name(opts));
> >
> > transaction = ref_transaction_begin(&err);
> > if (!transaction ||
>
> I 95% agree with this direction, but the other 5% of me is thinking
> "isn't this fine then? Let's keep it?".No, it's not fine, we mustn't keep it, because we expect Git itself to parse the reflog.
Ciao, Johannes