git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Jordi Mas via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Jordi Mas <jmas@softcatala.org>
Subject: Re: [PATCH] l10n: allows to translate diff messages
Date: Tue, 13 Jul 2021 16:11:08 -0700	[thread overview]
Message-ID: <xmqq4kcx24j7.fsf@gitster.g> (raw)
In-Reply-To: <pull.1045.git.git.1626177676801.gitgitgadget@gmail.com> (Jordi Mas via GitGitGadget's message of "Tue, 13 Jul 2021 12:01:16 +0000")

"Jordi Mas via GitGitGadget" <gitgitgadget@gmail.com> writes:

> Subject: Re: [PATCH] l10n: allows to translate diff messages

"allow to translate" would be the right phrasing, but it is too
vague to say "diff messages".  You are only marking 3 messages for
translation when there are probably a handful more.  

You need to explain which ones, not just vague "diff messages".

I think you are focusing on the words on the "git diff --stat" and
"git diff --shortstat" summary line, so

    i18n: mark "git diff --[short]stat" summary for translation

perhaps?  And remember, i18n is the act of making the code capable
of being translated, while l10n is the act of actually translating
what i18n prepared into a particular language.  Here, i18n is more
appropriate.

> From: Jordi Mas <jmas@softcatala.org>
>
> Allows to translate the diff messages shown when the
> user commits, indicating the number of insertions,
> deletions and files changed.

Our log message first explain the current status/behaviour of the
code (and highlight the problem in it), and then gives an order to
the codebase to "be like so" in imperative mood.  Perhaps like this:

    "git diff --[short]stat" summarizes the number of paths touched
    and lines inserted and deleted.  Mark this message for
    translation.

Note that I didn't explicitly say what's wrong with the current
behaviour, but "mark for translation" as the order given to the
codebase, it should be clear enough from the context that the
problem is that it is not marked for translation.

Having said all that, I am not sure if this patch stop at a sensible
point.  At least "git diff --summary" output should also be updated
to match, as they often go hand-in-hand, no?

Also, when showing "git diff --stat" for a binary file, we'd say

	$path | Bin 1234 -> 1236 bytes

I wonder if that should also be translated.

While I am at it, there are a handful things that should NEVER be
translated in the "git diff" output.

> diff --git a/diff.c b/diff.c
> index 52c791574b..29db9ce079 100644

Between "diff --git" and "--- a/$path", there are metainfo lines
that are read by "git apply" (including this "index" line).  They
should never be translated.

Thanks.

  reply	other threads:[~2021-07-13 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 12:01 [PATCH] l10n: allows to translate diff messages Jordi Mas via GitGitGadget
2021-07-13 23:11 ` Junio C Hamano [this message]
2021-07-14  0:09   ` Bagas Sanjaya
2021-07-14  0:18   ` Ævar Arnfjörð Bjarmason

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=xmqq4kcx24j7.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jmas@softcatala.org \
    /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).