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

Re: git-gui-i18n: Make "Revert changes in these $n files" translatable.

From
Christian Stimming <stimming@tuhh.de>
Date
Jul 27, 2007, 11:49 UTC
Message-ID
<20070727134923.jahvcmejwgww0oow@webmail.tu-harburg.de>
In-Reply-To
<53264.26898.qm@web38901.mail.mud.yahoo.com>
Quoting Brett Schwarz <brett_schwarz@yahoo.com>:
Show 8 quoted lines
>> > - Buttons in hard reset confirmation (branch->revert or merge->abort,
>> >   and it is yes/no dialog).
>>
>> Maybe those need to be translated in the tcl/tk system libraries?
>
> These are indeed in the Tk libs. Unfortunately, there is no straight  
>  forward way to change the button text for tk_messageBox. I'll   
> probably submit a patch to Tcl core for this.
That would indeed be a very good solution here.
Show 11 quoted lines
> In the mean time, if this is important, there are 2 ways around this:
>
> 1) override the button text in the msgcat. (...)
> So, somewhere in the git-gui, you would  have to do something like:
>     namespace eval ::Tk {
>       ::msgcat::mcset en_us &OK <new_term>
>       ::msgcat::mcset en_us &Cancel <new_term>
>       ::msgcat::mcset en_us &Yes <new_term>
>       ::msgcat::mcset en_us &No <new_term>
>       <continue for each language, if needed>
>     }

I think this wouldn't help much here. First of all, the original messages might be different between different Tcl versions. But secondly and more importantly, as Harri Ilari pointed out, we should prefer to provide button texts different from Yes/No but rather questions like "Revert"/"Cancel".

> 2) Re-write the tk_messageBox, to include an option to specify the   
> button text. This wouldn't be too hard actually, but this would live  
>  with git-gui.

This would indeed be the nicer solution and it would improve both the English button labels and their translations all in one.

> I don't think option #1 is robust enough, but would be the easiest   
> approach. Note also that this would only be for unix platforms,   
> since for windows and Mac, it calls the platform's equivalent.

By the way: I have been using git-gui on Windows with mingw-git(+msys) and ActiveTcl for several weeks by now. Works like a charm, and I'm looking forward to propose it as a fully localized, fully cross-platform, and simply the best SCM, to the co-workers in my company... :-)

Christian
Previous: Brett Schwarz
Message 2 of 2 in “Re: git-gui-i18n: Make "Revert changes in these $n files" translatable.”
  1. Brett SchwarzJul 27, 2007
  2. Christian StimmingJul 27, 2007

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.