{"thread":{"id":"10402","subject":"How to run git-gui always in English?","startedAt":"2007-10-21T06:47:10Z","lastAt":"2007-10-30T09:58:47Z","messageCount":11,"participants":["Steffen Prohaska","Shawn O. Pearce","Peter Karlsson","Alex Riesen","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56752","messageId":"CCAD0DE0-65D4-4FEC-B02F-658010FECD04@zib.de","threadId":"10402","inReplyTo":null,"subject":"How to run git-gui always in English?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-21T06:47:10Z","receivedAt":"2007-10-21T06:47:10Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"There are a lot of efforts going on to localize git-gui,\nincluding technical terms like \"push\". Personally I don't\nunderstand what this should be useful for. The command is called\n\"git push\"s. So, why should it be named differently in the gui.\n\nAnyway, I can switch it off, right? So here's my question.\n\nHow can I switch msysgit's git-gui to English, independently of\nthe language selected for Windows? I recognized that git-gui\nadjusts to the 'language selection' of Windows. How can I\ndisable this? I want git-gui to always display English. Nothing\nelse, never! I can't help people who use a different language\nin the gui, because I'll not understand what they are talking\nabout and they'll not understand me.\n\nCan I set an option in git-gui's option menu? I haven't\nfound one.\n\n\tSteffen\n"},{"id":"56753","messageId":"20071021065230.GE14735@spearce.org","threadId":"10402","inReplyTo":"CCAD0DE0-65D4-4FEC-B02F-658010FECD04@zib.de","subject":"Re: How to run git-gui always in English?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-21T06:52:30Z","receivedAt":"2007-10-21T06:52:30Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> wrote:\n> There are a lot of efforts going on to localize git-gui,\n> including technical terms like \"push\". Personally I don't\n> understand what this should be useful for. The command is called\n> \"git push\"s. So, why should it be named differently in the gui.\n> \n> Anyway, I can switch it off, right? So here's my question.\n> \n> How can I switch msysgit's git-gui to English, independently of\n> the language selected for Windows? I recognized that git-gui\n> adjusts to the 'language selection' of Windows. How can I\n> disable this? I want git-gui to always display English. Nothing\n> else, never! I can't help people who use a different language\n> in the gui, because I'll not understand what they are talking\n> about and they'll not understand me.\n> \n> Can I set an option in git-gui's option menu? I haven't\n> found one.\n\nYea, we don't have a UI to let you set what language the UI should\nappear in.  Partly because once the UI is up we'd have to restart\nthe entire process to change the strings its using.  And partly\nbecause nobody has asked for this before.\n\nI think that if you set LANG=en before you start git-gui it will\ntake on English, and so will all of the standard dialogs that we\n\"borrow\" from wish.\n\n-- \nShawn.\n"},{"id":"56754","messageId":"C65193EE-A45D-49ED-8831-1A006421A915@zib.de","threadId":"10402","inReplyTo":"20071021065230.GE14735@spearce.org","subject":"Re: How to run git-gui always in English?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-21T07:03:36Z","receivedAt":"2007-10-21T07:03:36Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Oct 21, 2007, at 8:52 AM, Shawn O. Pearce wrote:\n\n> Steffen Prohaska <prohaska@zib.de> wrote:\n>\n>> How can I switch msysgit's git-gui to English, independently of\n>> the language selected for Windows? I recognized that git-gui\n>> adjusts to the 'language selection' of Windows. How can I\n>> disable this? I want git-gui to always display English. Nothing\n>> else, never! I can't help people who use a different language\n>> in the gui, because I'll not understand what they are talking\n>> about and they'll not understand me.\n>>\n>> Can I set an option in git-gui's option menu? I haven't\n>> found one.\n>>\n>\n> Yea, we don't have a UI to let you set what language the UI should\n> appear in.  Partly because once the UI is up we'd have to restart\n> the entire process to change the strings its using.  And partly\n> because nobody has asked for this before.\n>\n> I think that if you set LANG=en before you start git-gui it will\n> take on English, and so will all of the standard dialogs that we\n> \"borrow\" from wish.\n\nHmm. I have no shell. I run git-gui from the Windows Start Menu.\nIt directly runs wish to execute the Windows git-gui wrapper:\n\n--- SNIP ---\n#!/bin/sh\n# Tcl ignores the next line -*- tcl -*- \\\nexec wish \"$0\" -- \"$@\"\n\nif { $argc >=2 && [lindex $argv 0] == \"--working-dir\" } {\n         cd [lindex $argv 1]\n         set argv [lrange $argv 2 end]\n         incr argc -2\n}\n\nset gitguidir [file dirname [info script]]\nregsub -all \";\" $gitguidir \"\\\\;\" gitguidir\nset env(PATH) \"$gitguidir;$env(PATH)\"\nunset gitguidir\n\nsource [file join [file dirname [info script]] git-gui.tcl]\n--- SNIP ---\n\nDo we have a chance before we source the real git-gui.tcl?\nMaybe we could \"set env(LANG)\" based on \"git config gui.lang\"?\nOr is it already too late because we needed to restart wish?\n\n\tSteffen\n"},{"id":"56755","messageId":"20071021071543.GF14735@spearce.org","threadId":"10402","inReplyTo":"C65193EE-A45D-49ED-8831-1A006421A915@zib.de","subject":"Re: How to run git-gui always in English?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-21T07:15:43Z","receivedAt":"2007-10-21T07:15:43Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> wrote:\n> On Oct 21, 2007, at 8:52 AM, Shawn O. Pearce wrote:\n> >\n> >I think that if you set LANG=en before you start git-gui it will\n> >take on English, and so will all of the standard dialogs that we\n> >\"borrow\" from wish.\n> \n> Do we have a chance before we source the real git-gui.tcl?\n> Maybe we could \"set env(LANG)\" based on \"git config gui.lang\"?\n> Or is it already too late because we needed to restart wish?\n\nHmm.  Really quick testing here shows that we just need to make sure\nenv(LANG) is set before we do the msgcat::mcload call in git-gui.sh\nline 104.\n\nIf we're going to use a `git config gui.lang` thing then we can\nprobably just make a msgcat::mclocale call on line 103 just before we\nload our message file.  Unfortunately this is before we have located\ngit so technically git-gui doesn't know how to run git-config and\nthus cannot get to gui.lang.  :-|\n\nHmm.  Looking at this further we may be able to insert the mclocale\ncall at two locations; one at line 864 before we open the repository\nwizard, and again at line 1802, just before we start to initialize\nour UI.  This does mean that for really serious errors (e.g. \"No\ngit in PATH\") we'll be using your native OS language.\n\n-- \nShawn.\n"},{"id":"57022","messageId":"5AD0C329-7136-42A3-9202-865E70A29B65@zib.de","threadId":"10402","inReplyTo":"CCAD0DE0-65D4-4FEC-B02F-658010FECD04@zib.de","subject":"Re: How to run git-gui always in English?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-23T20:00:18Z","receivedAt":"2007-10-23T20:00:18Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Oct 21, 2007, at 8:47 AM, Steffen Prohaska wrote:\n\n> How can I switch msysgit's git-gui to English, independently of\n> the language selected for Windows? I recognized that git-gui\n> adjusts to the 'language selection' of Windows. How can I\n> disable this? I want git-gui to always display English. Nothing\n> else, never! I can't help people who use a different language\n> in the gui, because I'll not understand what they are talking\n> about and they'll not understand me.\n\nAnd it's even worse. An error in the localization can completely\nbreak git-gui. Apparently the German localization included in\nmsysgit's Git-1.5.3-preview20071019.exe _is_ broken (see\nattached png).\n\nShouldn't the localization code be a bit more fault tolerant?\n\n\tSteffen\n\n\n\n\n\n"},{"id":"57035","messageId":"20071023224537.GH14735@spearce.org","threadId":"10402","inReplyTo":"5AD0C329-7136-42A3-9202-865E70A29B65@zib.de","subject":"Re: How to run git-gui always in English?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-23T22:45:38Z","receivedAt":"2007-10-23T22:45:38Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Steffen Prohaska <prohaska@zib.de> wrote:\n> On Oct 21, 2007, at 8:47 AM, Steffen Prohaska wrote:\n> \n> >How can I switch msysgit's git-gui to English, independently of\n> >the language selected for Windows? I recognized that git-gui\n> >adjusts to the 'language selection' of Windows. How can I\n> >disable this? I want git-gui to always display English. Nothing\n> >else, never! I can't help people who use a different language\n> >in the gui, because I'll not understand what they are talking\n> >about and they'll not understand me.\n> \n> And it's even worse. An error in the localization can completely\n> break git-gui. Apparently the German localization included in\n> msysgit's Git-1.5.3-preview20071019.exe _is_ broken (see\n> attached png).\n> \n> Shouldn't the localization code be a bit more fault tolerant?\n\nYes.  This is a possible workaround:\n\n>From 410aa617e7ca8240500e90f0b0389bde7b7b40aa Mon Sep 17 00:00:00 2001\nFrom: Shawn O. Pearce <spearce@spearce.org>\nDate: Tue, 23 Oct 2007 18:44:55 -0400\nSubject: [PATCH] git-gui: Protect against bad translation strings\n\nIf a translation string uses a format character we don't have an\nargument for then it may throw an error when we attempt to format\nthe translation.  In this case switch back to the default format\nthat comes with the program (aka the English translation).\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n git-gui.sh |   15 +++++++++++----\n 1 files changed, 11 insertions(+), 4 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 38c6e59..a7227ac 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -88,13 +88,20 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {\n \n package require msgcat\n \n-proc mc {fmt args} {\n-\tset fmt [::msgcat::mc $fmt]\n+proc _mc_trim {fmt} {\n \tset cmk [string first @@ $fmt]\n \tif {$cmk > 0} {\n-\t\tset fmt [string range $fmt 0 [expr {$cmk - 1}]]\n+\t\treturn [string range $fmt 0 [expr {$cmk - 1}]]\n \t}\n-\treturn [eval [list format $fmt] $args]\n+\treturn $fmt\n+}\n+\n+proc mc {en_fmt args} {\n+\tset fmt [_mc_trim [::msgcat::mc $en_fmt]]\n+\tif {[catch {set msg [eval [list format $fmt] $args]} err]} {\n+\t\tset msg [eval [list format [_mc_trim $en_fmt]] $args]\n+\t}\n+\treturn $msg\n }\n \n proc strcat {args} {\n-- \n1.5.3.4.1324.ga7925\n\n\n\n-- \nShawn.\n"},{"id":"57266","messageId":"Pine.LNX.4.62.0710260857210.3542@perkele.intern.softwolves.pp.se","threadId":"10402","inReplyTo":"CCAD0DE0-65D4-4FEC-B02F-658010FECD04@zib.de","subject":"Re: How to run git-gui always in English?","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-26T08:00:32Z","receivedAt":"2007-10-26T08:00:32Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Steffen Prohaska:\n\n> There are a lot of efforts going on to localize git-gui, including \n> technical terms like \"push\". Personally I don't understand what this \n> should be useful for. The command is called \"git push\"s. So, why should it \n> be named differently in the gui.\n\nNot that I agree that \"push\" is a technical word, but perhaps you have a \npoint. Why should there be such words in the GUI to start with? It's a GUI, \ntrying to abstract away the command line. Why not have a button \"Send\" or a \nmenu entry \"Send changes to server\", mimicing the \"git push\" command line \noption? Using command line names or showing protocol data directly in a \nuser-oriented GUI is most often a bad idea.\n\nOr perhaps what we need is an actual translation from \"gitish\" to English, \nwhich would have\n\nmsgid \"Push\"\nmsgstr \"Send changes to server\"\n\n?\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"57310","messageId":"20071026214124.GB3062@steel.home","threadId":"10402","inReplyTo":"Pine.LNX.4.62.0710260857210.3542@perkele.intern.softwolves.pp.se","subject":"Re: How to run git-gui always in English?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-10-26T21:41:24Z","receivedAt":"2007-10-26T21:41:24Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Peter Karlsson, Fri, Oct 26, 2007 10:00:32 +0200:\n> Steffen Prohaska:\n>\n>> There are a lot of efforts going on to localize git-gui, including \n>> technical terms like \"push\". Personally I don't understand what this \n>> should be useful for. The command is called \"git push\"s. So, why should it \n>> be named differently in the gui.\n>\n> Not that I agree that \"push\" is a technical word, but perhaps you have a \n> point. Why should there be such words in the GUI to start with? It's a GUI, \n> trying to abstract away the command line. Why not have a button \"Send\" or a \n> menu entry \"Send changes to server\", mimicing the \"git push\" command line \n> option? Using command line names or showing protocol data directly in a \n> user-oriented GUI is most often a bad idea.\n>\n> Or perhaps what we need is an actual translation from \"gitish\" to English, \n> which would have\n>\n> msgid \"Push\"\n> msgstr \"Send changes to server\"\n>\n\nBecause you do not send changes to a _server_. There is no server.\nThere is just another repo. Hence just \"push\"\n"},{"id":"57530","messageId":"Pine.LNX.4.62.0710291357420.23695@perkele.intern.softwolves.pp.se","threadId":"10402","inReplyTo":"20071026214124.GB3062@steel.home","subject":"Re: How to run git-gui always in English?","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-29T12:58:26Z","receivedAt":"2007-10-29T12:58:26Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Alex Riesen:\n\n> Because you do not send changes to a _server_. There is no server. There \n> is just another repo. Hence just \"push\"\n\nFine. \"Send to repository\", then. My point is that if \"push\" is a technical \nterm, then it doesn't belong in the GUI, and if it isn't, then it should be \ntranslated like any other UI element.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"57550","messageId":"7vbqahm14c.fsf@gitster.siamese.dyndns.org","threadId":"10402","inReplyTo":"Pine.LNX.4.62.0710291357420.23695@perkele.intern.softwolves.pp.se","subject":"Re: How to run git-gui always in English?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-30T08:56:51Z","receivedAt":"2007-10-30T08:56:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Peter Karlsson <peter@softwolves.pp.se> writes:\n\n> Alex Riesen:\n>\n>> Because you do not send changes to a _server_. There is no\n>> server. There is just another repo. Hence just \"push\"\n>\n> Fine. \"Send to repository\", then. My point is that if \"push\" is a\n> technical term, then it doesn't belong in the GUI, and if it isn't,\n> then it should be translated like any other UI element.\n\nWhy doesn't a \"technical term\" belong in the GUI in the first\nplace?\n\nIf majority of people who use git know and use the term \"push\"\nto describe that concept, certainly they will be the people from\nwhom the new people who start to use git (either from command\nline or from GUI) get help.  Why do you want to have them use\ndifferent language to make the communication more difficult?\n"},{"id":"57554","messageId":"Pine.LNX.4.64.0710300957580.4362@racer.site","threadId":"10402","inReplyTo":"Pine.LNX.4.62.0710291357420.23695@perkele.intern.softwolves.pp.se","subject":"Re: How to run git-gui always in English?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-30T09:58:47Z","receivedAt":"2007-10-30T09:58:47Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 29 Oct 2007, Peter Karlsson wrote:\n\n> Alex Riesen:\n> \n> > Because you do not send changes to a _server_. There is no server. There is\n> > just another repo. Hence just \"push\"\n> \n> Fine. \"Send to repository\", then. My point is that if \"push\" is a technical\n> term, then it doesn't belong in the GUI, and if it isn't, then it should be\n> translated like any other UI element.\n\nCome on.  \"Byte\" is a technical term, too, and only the French translate \nit.  Same goes for \"Computer\".  There is a point where hiding the truth \nfrom the user becomes silly.  This is it.\n\nCiao,\nDscho\n"}]}