git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n
Date: Mon, 28 Mar 2022 14:16:21 +0200	[thread overview]
Message-ID: <220328.86lewudzw3.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <63bf6e97-1dca-c2b1-5673-301039e73acf@kdbg.org>


On Mon, Mar 28 2022, Johannes Sixt wrote:

> Am 27.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:
>> 
>> On Sun, Mar 27 2022, Johannes Sixt wrote:
>> 
>>> Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:
>>>> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for
>>>> translation, 2016-06-17).
>>>>
>>>> These strings are no longer used in-tree, and we shouldn't be wasting
>>>> translator time on them for the benefit of a hypothetical out-of-tree
>>>> user of git-sh-setup.sh.
>>>
>>> There is public documentation for these functions. Hence, you must
>>> assume that they are used in scripts outside of Git. Castrating their
>>> functionality like this patch does is unacceptable.
>> 
>> For require_clean_work_tree() the public documentation for this function
>> states that it will emit a specific error message in English, and you're
>> expected to Lego-interpolate a string that we'll concatenate with it:
>> 
>> 	[...]It emits an error message of the form `Cannot
>>         <action>: <reason>. <hint>`, and dies.  Example:
>> 	+
>> 	----------------
>> 	require_clean_work_tree rebase "Please commit or stash them."
>> 
>> So I think that marking it for translation like this as d323c6b6410 was
>> always broken in that it broke that documented promise.
>
> I can buy this argument. But then this must be a separate commit with
> this justification.

Sure, I can elaborate on that point & split it up.

>> But that's just an argument for keeping the require_clean_work_tree()
>> part of this patch, not require_work_tree_exists().
>> 
>> For that one and others in git-sh-setup we've never said that we'd
>> provide these translated (and to the extent we've implied anything about
>> the rest, have strongly implied the opposite with
>> require_clean_work_tree()'s docs).
>> 
>> Nothing will break for out-of-tree users as a result of this
>> change. When we added these functions and their documentation their
>> output wouldn't be translated, then sometimes it was, now it's not
>> again.
>
> This does not sound convincing at all, but rather like "I want the code
> to be so, and here is some handwaving to justify it". What is wrong with
> the status quo?

The larger context for why I was looking at this again is that I'm
trying to slowly get us to the point where we can remove the
i18n-in-shellscript entirtely.

But I thought that was a rather large digression for the commit message,
and that these being both unused, and not something the "public" API
affected ever promised it would do was sufficient.

>> We need also need to be mindful of translator time, it's a *lot* of
>> strings to go through, and e.g. I've commented in the past on patches
>> that marked stuff in t/helper/ for translation.
>
> Translator's time is your concern? No translator sifts through 5000
> strings on every release. There are tools that show only new strings to
> translate.

Yes, I'm the person who added this entire i18n infrastructure to git, I
know how it works :)

> A text is translated once and then it lies under the radar
> until someone changes it. Don't tell me that is time-consuming.

Yes, individual orphaned strings aren't, but they add up.

Just like having that "USE_PIC" comment in configure.ac isn't much of a
big deal, but it makes sense to clean up unused code, just as we're
adding new code.

I will say that your implicit proposal of keeping this forever instead
is assuming that we won't have more translations for git, and every new
translator will look at this.

Context is critical for translators, so even if it's one string it's a
string you'll quickly grep for and find ... no uses for, and then likely
go hunting around for where it's used only to (hopefully, in that case)
find this thread. Better not to have it.

> On the other hand, there is a lot of *reviewer* time that you are
> spending with changes like this. *That* should be your concern.

I'd think most of the that time, if any, will be spent on this
sub-thread you started, so ... :)

Which isn't to say it shouldn't have been brought up, but from my
perspective I was (and still am) making a rather small change that I
think won't harm anyone in practice, and gives us some incremental
tidyness & contributes to an eventual large "git rm git-sh-i18n.sh" et
al.

But on reflection I don't think it's worth worrying about, and we can
just do this change.


  reply	other threads:[~2022-03-28 12:29 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 12:46 [PATCH 0/6] various: remove dead code Ævar Arnfjörð Bjarmason
2021-11-19 12:46 ` [PATCH 1/6] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2021-11-19 14:32   ` Jeff King
2021-11-19 12:46 ` [PATCH 2/6] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2021-11-19 14:33   ` Jeff King
2021-11-19 12:46 ` [PATCH 3/6] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2021-11-19 14:34   ` Jeff King
2021-11-19 12:46 ` [PATCH 4/6] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason
2021-11-19 19:42   ` Junio C Hamano
2021-11-19 12:46 ` [PATCH 5/6] strbuf: remove unused istarts_with() function Ævar Arnfjörð Bjarmason
2021-11-19 14:40   ` Jeff King
2021-11-19 19:14   ` Junio C Hamano
2021-11-19 12:46 ` [PATCH 6/6] json-writer.[ch]: remove unused formatting functions Ævar Arnfjörð Bjarmason
2021-11-19 14:41   ` Jeff King
2021-11-19 21:53     ` Junio C Hamano
2021-11-19 14:42 ` [PATCH 0/6] various: remove dead code Jeff King
2021-11-19 20:26 ` [PATCH v2 0/5] " Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 1/5] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 2/5] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 3/5] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 4/5] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 5/5] json-writer.[ch]: remove unused formatting functions Ævar Arnfjörð Bjarmason
2022-03-26 17:14   ` [PATCH v3 0/7] various: remove dead code, drop i18n not used in-tree Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 1/7] run-command.h: remove always unused "clean_on_exit_handler_cbdata" Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 2/7] configure.ac: remove USE_PIC comment Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 3/7] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 4/7] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 5/7] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 6/7] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n Ævar Arnfjörð Bjarmason
2022-03-27 10:47       ` Johannes Sixt
2022-03-27 11:15         ` Ævar Arnfjörð Bjarmason
2022-03-28  6:04           ` Johannes Sixt
2022-03-28 12:16             ` Ævar Arnfjörð Bjarmason [this message]
2022-03-28 20:06               ` Johannes Sixt
2022-03-31 10:23               ` Phillip Wood
2022-03-31 11:15                 ` Ævar Arnfjörð Bjarmason
2022-03-31 20:27                   ` Johannes Sixt
2022-04-02 10:44                     ` Ævar Arnfjörð Bjarmason
2022-04-02 14:16                       ` Johannes Sixt
2022-04-03 15:22                         ` Ævar Arnfjörð Bjarmason
2022-04-04 20:20                           ` Johannes Sixt
2022-03-31  1:45     ` [PATCH v4 0/6] various: remove dead code Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 1/6] run-command.h: remove always unused "clean_on_exit_handler_cbdata" Ævar Arnfjörð Bjarmason
2022-03-31 22:03         ` Junio C Hamano
2022-03-31  1:45       ` [PATCH v4 2/6] configure.ac: remove USE_PIC comment Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 3/6] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 4/6] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2022-03-31 22:06         ` Junio C Hamano
2022-03-31  1:45       ` [PATCH v4 5/6] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 6/6] alloc.[ch]: remove alloc_report() function Æ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

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

  git send-email \
    --in-reply-to=220328.86lewudzw3.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.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.
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 NNTP newsgroup(s).