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

Re: Is there any interest in localizing term delimiters in git messages?

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Oct 19, 2023, 18:07 UTC
Message-ID
<573f1142-d1de-b379-2f8b-07396c1249ec@jeffhostetler.com>
In-Reply-To
<xmqqcyxaxzxw.fsf@gitster.g>
On 10/19/23 1:52 PM, Junio C Hamano wrote:
Show 42 quoted lines
> Jiang Xin <worldhello.net@gmail.com> writes:
> 
>> I tried to find similar patterns in `po/bg.po` using:
>>
>>      $ git  grep -h -B5 '([a-zA-Z_\.]*_[a-zA-Z_\.]\+)' po/bg.po
>>
>> And find other translated variable names in Bulgarian as follows:
>> ...
>> I suppose it would be better to keep those variable names
>> unchanged.
> 
> To me, all of them refer to names given to variables, functions, and
> mechanisms used internally as implementation details, and they are
> meant to help developers diagnose when end-users hit these errors.
> 
> I agree with you that translating these would be counter-productive
> for that purpose.
> 
> Having said that, I have to wonder if in an ideal world these should
> be written in terms that are more end-user facing.
> 
>>   * cookie_result in builtin/fsmonitor--daemon.c:
>>
>>     error(_("fsmonitor: cookie_result '%d' != SEEN"),
> 
> [jch: cc'ed JeffH for area expertise]
> 
> For example, what does it mean to the end user when the
> cookie->result we retrieve is different from FCIR_SEEN?  We lost
> sync with the fsmonitor daemon backend and to avoid yielding
> incorrect data we will be giving the "trivial" response only?  It is
> not obvious from the code and b05880d3 (fsmonitor--daemon: use a
> cookie file to sync with file system, 2022-03-25) that added it why
> the end-user might even want to be shown this message [*].  I wonder
> if this should be an untranslated trace2_* message that are meant
> for debugging.
> 
> 	Side note: and isn't the significance of the event
> 	    "warning", not "error"?  As far as the end-user is
> 	    concerned, after emitting this message
> 
> Also some of them might better be a BUG(), instead of die(_()).
...

Yeah, I think it should be an untranslated trace2 message rather than an error. You're right, the user cannot do anything with that information -- and by emitting a "trivial" result, we fall back to the normal behavior and cause the client to a regular scan. So there is no reason to scare the user.

Jeff
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 12 in “Is there any interest in localizing term delimiters in git messages?”
  1. Alexander ShopovOct 17, 2023
  2. Junio C HamanoOct 17, 2023
  3. Jiang XinOct 18, 2023
  4. Junio C HamanoOct 18, 2023
  5. commit: do not use cryptic "new_index" in end-user facing messagesJunio C Hamano, Oct 18, 2023
  6. Jiang XinOct 19, 2023
  7. Junio C HamanoOct 19, 2023
  8. Jeff HostetlerOct 19, 2023
  9. Junio C HamanoOct 19, 2023
  10. Torsten BögershausenOct 19, 2023
  11. Junio C HamanoOct 19, 2023
  12. Peter KreftingOct 21, 2023

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.