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

Re: [PATCH 1/1] Mark messages for translations

From
Alexander Shopov <ash@kambanaria.org>
Date
Jan 15, 2018, 09:16 UTC
Message-ID
<CAP6f5M=HdjfQT+oO76sMfcD7zOfajeukh_VxSL_diqEsCWAYWw@mail.gmail.com>
In-Reply-To
<CAP6f5MnaMiqEMbGW_xj6X495jF=txpzeq+DEHOkz7VCg2D6D9w@mail.gmail.com>
And again, sigh:
>>   const char git_usage_string[] =
....
>>   const char git_more_info_string[] =
> It is not obvious to me where git_usage_string is looked up in the
> message catalog. It is used that way in builtin/help.c ..

I wanted to be consistent with the current state of the file. This is the same way const char git_more_info_string[] is defined and initialized. Having it this way saves the lookup on each usage I guess but any performance gains will be negligible. Is there a convention?

> We have settled with lower-case letters at the beginning of error
> messages. (See Documentation/CodingGuidelines, "Error Messages".) You
> could fix that while you are touching die, die_errno, etc, messages.
Great! It will allow for further reduction in repetition of messages.
> I notice you change past tense to present tense in some cases.

I am reading this that messages SHOULD be in present tense (unless they MUST be in past tense). This is good. Perhaps I will look at current messages and then fix en masse (if there is sth to fix).

> I'm not a friend of geeky abbreviations like "chdir" or "cwd" in
> user-visible messages

I agree but I would also keep in mind that using the name of the function may alllow to parametrize the messages like: Cannot execute "%s" on "%s" - for example. Anyway this is not that important for me. Will wait for other opinions.

>> -                     die_errno("fork failed");
>> +                     die_errno(_("fork failed"));
>> -             die_errno("setsid failed");
>> +             die_errno(_("setsid failed"));
> it is useful to have the function name in  the message. Which rises the
> question:why translate them at all?
Why not eat the cake while having it - one can pass function name in  a
 message like: '"%s" failed'

Regards: al_shopov

Previous: Alexander Shopov
Message 20 of 20 in “Marked end user messages for translation”
  1. 0/1 Marked end user messages for translationAlexander Shopov, Jan 15, 2018
  2. 1/1 Mark messages for translationsAlexander Shopov, Jan 15, 2018
  3. Johannes SixtJan 15, 2018
  4. Eric SunshineJan 15, 2018
  5. Duy NguyenJan 15, 2018
  6. 0/1 Mark messages for translationsAlexander Shopov, Feb 6, 2018
  7. 1/1 Mark messages for translationsAlexander Shopov, Feb 6, 2018
  8. Eric SunshineFeb 6, 2018
  9. Jeff KingFeb 6, 2018
  10. 0/1 Mark messages for translationsAlexander Shopov, Feb 9, 2018
  11. 1/1 Mark messages for translationsAlexander Shopov, Feb 9, 2018
  12. Junio C HamanoFeb 9, 2018
  13. Junio C HamanoFeb 9, 2018
  14. Jeff KingFeb 9, 2018
  15. t0002: simplify error checkingJeff King, Feb 10, 2018
  16. Alexander ShopovFeb 12, 2018
  17. Jeff KingFeb 12, 2018
  18. 0/1 Mark messages for translationAlexander Shopov, Feb 13, 2018
  19. 1/1 Mark messages for translationsAlexander Shopov, Feb 13, 2018
  20. Alexander ShopovJan 15, 2018

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.