git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 4/6] i18n: factorize "foo does not take arguments" messages

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 3, 2022, 22:21 UTC
Message-ID
<xmqqr16du7tw.fsf@gitster.g>
In-Reply-To
<220403.86sfqukz67.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 11 quoted lines
> On Sat, Apr 02 2022, Jean-Noël Avila via GitGitGadget wrote:
>
>> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
>>
>> The messages are split into the ones for ref-filter which deal with
>> atoms and scalar which has an option.
>
> I see the git-for-each-ref manpage doesn't really refer to these
> consistently, but I tihnk s/atom/format/g or s/atom/name/g would be lot
> more obvious, especially in the context of how these are already
> discussed in the manpage.

I do not necessarily think so, even though "atom" is a word that directly faces those who wrote the code in for-each-ref.c that have been moved to ref-filter.c and not the end users.

These are only parts of a string that is given to --format=..., so "format" makes it more confusing than even the original.

I can buy
    '%(objectype)' in format does not take arguments

though. If you did not find a specific word to refer to these "field names" that the documentation consistently uses, it is a way to clarify which '%(objecttype)' we are referring to, without having to commit to a single word.

Or we can call them "field names" like the documentation calls them, which would make it into

    field name '%(objecttype)' does not take arguments

which is not too bad, but I somehow find the former (i.e. "X in format string does not take arguments") probably the easiest to follow, if you want to change the original.

Just my 2 yen.
Show 9 quoted lines
>> @@ -317,7 +317,7 @@ static int objecttype_atom_parser(struct ref_format *format, struct used_atom *a
>>  				  const char *arg, struct strbuf *err)
>>  {
>>  	if (arg)
>> -		return strbuf_addf_ret(err, -1, _("%%(objecttype) does not take arguments"));
>> +		return strbuf_addf_ret(err, -1, _("the atom '%s' does not take arguments"), "%(objecttype)");
>>  	if (*atom->name == '*')
>>  		oi_deref.info.typep = &oi_deref.type;
>>  	else
Previous: Ævar Arnfjörð BjarmasonNext: Jean-Noël Avila via GitGitGadget
Message 26 of 28 in “More i18n fixes”
  1. 0/7 More i18n fixesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  2. 1/7 i18n: factorize generic failure messagesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  3. 2/7 sequencer: factor GIT_AUTHOR_* from message stringsBagas Sanjaya via GitGitGadget, Mar 20, 2022
  4. Bagas SanjayaMar 21, 2022
  5. 3/7 i18n: factorize "bad argument" messagesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  6. 4/7 i18n: factorize "Server does not support foo" messagesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  7. 5/7 i18n: factorize "foo does not take arguments" messagesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  8. 7/7 i18n: factorize unrecognized options arguments messagesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  9. 6/7 i18n: factorize read-cache error messagesJean-Noël Avila via GitGitGadget, Mar 20, 2022
  10. Johannes SixtMar 21, 2022
  11. Ævar Arnfjörð BjarmasonMar 21, 2022
  12. Junio C HamanoMar 21, 2022
  13. Jean-Noël AVILAMar 21, 2022
  14. Jean-Noël AVILAMar 21, 2022
  15. 0/6 More i18n fixesJean-Noël Avila via GitGitGadget, Apr 2, 2022
  16. 1/6 i18n: factorize generic failure messagesJean-Noël Avila via GitGitGadget, Apr 2, 2022
  17. Bagas SanjayaApr 3, 2022
  18. Ævar Arnfjörð BjarmasonApr 3, 2022
  19. Ævar Arnfjörð BjarmasonApr 3, 2022
  20. 3/6 i18n: factorize server support messages in fetch-packJean-Noël Avila via GitGitGadget, Apr 2, 2022
  21. 2/6 sequencer: factor GIT_AUTHOR_* from message stringsBagas Sanjaya via GitGitGadget, Apr 2, 2022
  22. 5/6 i18n: factorize read-cache error messagesJean-Noël Avila via GitGitGadget, Apr 2, 2022
  23. Junio C HamanoApr 3, 2022
  24. 4/6 i18n: factorize "foo does not take arguments" messagesJean-Noël Avila via GitGitGadget, Apr 2, 2022
  25. Ævar Arnfjörð BjarmasonApr 3, 2022
  26. Junio C HamanoApr 3, 2022
  27. 6/6 i18n: factorize "bad argument" messagesJean-Noël Avila via GitGitGadget, Apr 2, 2022
  28. Ævar Arnfjörð BjarmasonApr 3, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.