{"thread":{"id":"9252","subject":"Re: git-gui-i18n: Make \"Revert changes in these $n files\" translatable.","startedAt":"2007-07-27T06:41:10Z","lastAt":"2007-07-27T11:49:23Z","messageCount":2,"participants":["Brett Schwarz","Christian Stimming"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48773","messageId":"53264.26898.qm@web38901.mail.mud.yahoo.com","threadId":"9252","inReplyTo":null,"subject":"Re: git-gui-i18n: Make \"Revert changes in these $n files\" translatable.","fromName":"Brett Schwarz","fromEmail":"brett_schwarz@yahoo.com","sentAt":"2007-07-27T06:41:10Z","receivedAt":"2007-07-27T06:41:10Z","isPatch":false,"sender":{"key":"brett_schwarz@yahoo.com","avatar":null},"body":"> \n> \n> ----- Original Message ----\n> From: Christian Stimming <stimming@tuhh.de>\n> To: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi>\n> Cc: Shawn O. Pearce <spearce@spearce.org>; Brett Schwarz <brett_schwarz@yahoo.com>; git@vger.kernel.org; Paul Mackerras <paulus@samba.org>; Junio C Hamano <gitster@pobox.com>\n> Sent: Thursday, July 26, 2007 5:34:49 AM\n> Subject: Re: git-gui-i18n: Make \"Revert changes in these $n files\" translatable.\n> \n> Quoting Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi>:\n> > On Thu, Jul 26, 2007 at 10:47:23AM +0200, Christian Stimming wrote:\n> >> The issue with plural forms is even more complicated than that.\n> >\n\n\n<snip>\n\n> > - Buttons in hard reset confirmation (branch->revert or merge->abort,\n> >   and it is yes/no dialog).\n> \n> I see this in translated form (German Ja/Nein), and also the button  \n> text (translated or not) doesn't appear in the git-gui source code.  \n> Maybe those need to be translated in the tcl/tk system libraries?\n> \n\nThese 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.\n\nIn the mean time, if this is important, there are 2 ways around this:\n\n1) override the button text in the msgcat. Tk does it's own msgcat internally (under the Tk namespace), and that's what prevents msgcat from changing these. You can see these under msgs directory where Tk is installed (/usr/local/tk8.4/msgs on my system). So, you would have to override for each language specified in that directory (if it warrants overriding). So, somewhere in the git-gui, you would have to do something like:\n    namespace eval ::Tk {\n      ::msgcat::mcset en_us &OK <new_term>\n      ::msgcat::mcset en_us &Cancel <new_term>\n      ::msgcat::mcset en_us &Yes <new_term>\n      ::msgcat::mcset en_us &No <new_term>\n      <continue for each language, if needed>\n    }\n\n2) 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.\n\nI 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.\n\nHTH,\n\n    --brett\n\n\n\n\n\n\n       \n____________________________________________________________________________________\nBuilding a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.\nhttp://smallbusiness.yahoo.com/webhosting \n"},{"id":"48792","messageId":"20070727134923.jahvcmejwgww0oow@webmail.tu-harburg.de","threadId":"9252","inReplyTo":"53264.26898.qm@web38901.mail.mud.yahoo.com","subject":"Re: git-gui-i18n: Make \"Revert changes in these $n files\" translatable.","fromName":"Christian Stimming","fromEmail":"stimming@tuhh.de","sentAt":"2007-07-27T11:49:23Z","receivedAt":"2007-07-27T11:49:23Z","isPatch":false,"sender":{"key":"stimming@tuhh.de","avatar":"https://avatars.githubusercontent.com/u/227778?v=4"},"body":"Quoting Brett Schwarz <brett_schwarz@yahoo.com>:\n>> > - Buttons in hard reset confirmation (branch->revert or merge->abort,\n>> >   and it is yes/no dialog).\n>>\n>> Maybe those need to be translated in the tcl/tk system libraries?\n>\n> These are indeed in the Tk libs. Unfortunately, there is no straight  \n>  forward way to change the button text for tk_messageBox. I'll   \n> probably submit a patch to Tcl core for this.\n\nThat would indeed be a very good solution here.\n\n> In the mean time, if this is important, there are 2 ways around this:\n>\n> 1) override the button text in the msgcat. (...)\n> So, somewhere in the git-gui, you would  have to do something like:\n>     namespace eval ::Tk {\n>       ::msgcat::mcset en_us &OK <new_term>\n>       ::msgcat::mcset en_us &Cancel <new_term>\n>       ::msgcat::mcset en_us &Yes <new_term>\n>       ::msgcat::mcset en_us &No <new_term>\n>       <continue for each language, if needed>\n>     }\n\nI think this wouldn't help much here. First of all, the original  \nmessages might be different between different Tcl versions. But  \nsecondly and more importantly, as Harri Ilari pointed out, we should  \nprefer to provide button texts different from Yes/No but rather  \nquestions like \"Revert\"/\"Cancel\".\n\n> 2) Re-write the tk_messageBox, to include an option to specify the   \n> button text. This wouldn't be too hard actually, but this would live  \n>  with git-gui.\n\nThis would indeed be the nicer solution and it would improve both the  \nEnglish button labels and their translations all in one.\n\n> I don't think option #1 is robust enough, but would be the easiest   \n> approach. Note also that this would only be for unix platforms,   \n> since for windows and Mac, it calls the platform's equivalent.\n\nBy the way: I have been using git-gui on Windows with mingw-git(+msys)  \nand ActiveTcl for several weeks by now. Works like a charm, and I'm  \nlooking forward to propose it as a fully localized, fully  \ncross-platform, and simply the best SCM, to the co-workers in my  \ncompany... :-)\n\nChristian\n"}]}