{"thread":{"id":"11530","subject":"[PATCH] gitk: fix \"Key bindings\" message","startedAt":"2008-01-08T13:37:46Z","lastAt":"2008-01-15T22:31:49Z","messageCount":5,"participants":["Michele Ballabio","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"64740","messageId":"200801081437.46398.barra_cuda@katamail.com","threadId":"11530","inReplyTo":null,"subject":"[PATCH] gitk: fix \"Key bindings\" message","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2008-01-08T13:37:46Z","receivedAt":"2008-01-08T13:37:46Z","isPatch":true,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"Fix string substitution. Now the \"Key bindings\" message under the\n\"Help\" menu is ready for translation.\n\nSigned-off-by: Michele Ballabio <barra_cuda@katamail.com>\n---\n gitk |   32 ++++++++++++++++----------------\n 1 files changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 4a923af..871a006 100755\n--- a/gitk\n+++ b/gitk\n@@ -1309,7 +1309,7 @@ proc keys {} {\n     message $w.m -text [mc \"\n Gitk key bindings:\n \n-<$M1T-Q>\t\tQuit\n+<%s-Q>\t\tQuit\n <Home>\t\tMove to first commit\n <End>\t\tMove to last commit\n <Up>, p, i\tMove up one commit\n@@ -1318,12 +1318,12 @@ Gitk key bindings:\n <Right>, x, l\tGo forward in history list\n <PageUp>\tMove up one page in commit list\n <PageDown>\tMove down one page in commit list\n-<$M1T-Home>\tScroll to top of commit list\n-<$M1T-End>\tScroll to bottom of commit list\n-<$M1T-Up>\tScroll commit list up one line\n-<$M1T-Down>\tScroll commit list down one line\n-<$M1T-PageUp>\tScroll commit list up one page\n-<$M1T-PageDown>\tScroll commit list down one page\n+<%s-Home>\tScroll to top of commit list\n+<%s-End>\tScroll to bottom of commit list\n+<%s-Up>\tScroll commit list up one line\n+<%s-Down>\tScroll commit list down one line\n+<%s-PageUp>\tScroll commit list up one page\n+<%s-PageDown>\tScroll commit list down one page\n <Shift-Up>\tFind backwards (upwards, later commits)\n <Shift-Down>\tFind forwards (downwards, earlier commits)\n <Delete>, b\tScroll diff view up one page\n@@ -1331,20 +1331,20 @@ Gitk key bindings:\n <Space>\t\tScroll diff view down one page\n u\t\tScroll diff view up 18 lines\n d\t\tScroll diff view down 18 lines\n-<$M1T-F>\t\tFind\n-<$M1T-G>\t\tMove to next find hit\n+<%s-F>\t\tFind\n+<%s-G>\t\tMove to next find hit\n <Return>\tMove to next find hit\n /\t\tMove to next find hit, or redo find\n ?\t\tMove to previous find hit\n f\t\tScroll diff view to next file\n-<$M1T-S>\t\tSearch for next hit in diff view\n-<$M1T-R>\t\tSearch for previous hit in diff view\n-<$M1T-KP+>\tIncrease font size\n-<$M1T-plus>\tIncrease font size\n-<$M1T-KP->\tDecrease font size\n-<$M1T-minus>\tDecrease font size\n+<%s-S>\t\tSearch for next hit in diff view\n+<%s-R>\t\tSearch for previous hit in diff view\n+<%s-KP+>\tIncrease font size\n+<%s-plus>\tIncrease font size\n+<%s-KP->\tDecrease font size\n+<%s-minus>\tDecrease font size\n <F5>\t\tUpdate\n-\"] \\\n+\" $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T ] \\\n \t    -justify left -bg white -border 2 -relief groove\n     pack $w.m -side top -fill both -padx 2 -pady 2\n     button $w.ok -text [mc \"Close\"] -command \"destroy $w\" -default active\n-- \n1.5.3.5\n"},{"id":"64795","messageId":"18308.2284.160506.432481@cargo.ozlabs.ibm.com","threadId":"11530","inReplyTo":"200801081437.46398.barra_cuda@katamail.com","subject":"Re: [PATCH] gitk: fix \"Key bindings\" message","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-01-08T23:36:12Z","receivedAt":"2008-01-08T23:36:12Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Michele Ballabio writes:\n\n> -\"] \\\n> +\" $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T ] \\\n\nIck.  Are you sure you have the right number of instances of $M1T? :)\n\nI'd prefer to use [string map].\n\nActually, for translation, it would probably be better to bust up that\nhelp text into a series of shorter strings, maybe even one per line.\n\nPaul.\n"},{"id":"64860","messageId":"200801091916.52680.barra_cuda@katamail.com","threadId":"11530","inReplyTo":"18308.2284.160506.432481@cargo.ozlabs.ibm.com","subject":"[PATCH - v2] gitk: fix \"Key bindings\" message","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2008-01-09T18:16:52Z","receivedAt":"2008-01-09T18:16:52Z","isPatch":true,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"Fix string substitution using 'string map'. Now the\n\"Key bindings\" menu is ready for translation.\n\nSigned-off-by: Michele Ballabio <barra_cuda@katamail.com>\n---\nOn Wednesday 09 January 2008, Paul Mackerras wrote:\n> Michele Ballabio writes:\n> \n> > -\"] \\\n> > +\" $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T $M1T ] \\\n> \n> Ick.  Are you sure you have the right number of instances of $M1T? :)\n\nYes :^P. I was sure there was a better fix but didn't know where to look at.\n\n> I'd prefer to use [string map].\n\nThis patch tries to do so. Is this correct?\n\n> Actually, for translation, it would probably be better to bust up that\n> help text into a series of shorter strings, maybe even one per line.\n\nOr split this by \"topic\": \"scrolling\", \"search\", \"fonts\", \"history\"...\n\n gitk |   34 +++++++++++++++++-----------------\n 1 files changed, 17 insertions(+), 17 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 801a5a9..24796e1 100755\n--- a/gitk\n+++ b/gitk\n@@ -1306,10 +1306,10 @@ proc keys {} {\n     }\n     toplevel $w\n     wm title $w [mc \"Gitk key bindings\"]\n-    message $w.m -text [mc \"\n+    message $w.m -text [ string map \"M1T $M1T\" [ mc \"\n Gitk key bindings:\n \n-<$M1T-Q>\t\tQuit\n+<M1T-Q>\t\tQuit\n <Home>\t\tMove to first commit\n <End>\t\tMove to last commit\n <Up>, p, i\tMove up one commit\n@@ -1318,12 +1318,12 @@ Gitk key bindings:\n <Right>, x, l\tGo forward in history list\n <PageUp>\tMove up one page in commit list\n <PageDown>\tMove down one page in commit list\n-<$M1T-Home>\tScroll to top of commit list\n-<$M1T-End>\tScroll to bottom of commit list\n-<$M1T-Up>\tScroll commit list up one line\n-<$M1T-Down>\tScroll commit list down one line\n-<$M1T-PageUp>\tScroll commit list up one page\n-<$M1T-PageDown>\tScroll commit list down one page\n+<M1T-Home>\tScroll to top of commit list\n+<M1T-End>\tScroll to bottom of commit list\n+<M1T-Up>\tScroll commit list up one line\n+<M1T-Down>\tScroll commit list down one line\n+<M1T-PageUp>\tScroll commit list up one page\n+<M1T-PageDown>\tScroll commit list down one page\n <Shift-Up>\tFind backwards (upwards, later commits)\n <Shift-Down>\tFind forwards (downwards, earlier commits)\n <Delete>, b\tScroll diff view up one page\n@@ -1331,20 +1331,20 @@ Gitk key bindings:\n <Space>\t\tScroll diff view down one page\n u\t\tScroll diff view up 18 lines\n d\t\tScroll diff view down 18 lines\n-<$M1T-F>\t\tFind\n-<$M1T-G>\t\tMove to next find hit\n+<M1T-F>\t\tFind\n+<M1T-G>\t\tMove to next find hit\n <Return>\tMove to next find hit\n /\t\tMove to next find hit, or redo find\n ?\t\tMove to previous find hit\n f\t\tScroll diff view to next file\n-<$M1T-S>\t\tSearch for next hit in diff view\n-<$M1T-R>\t\tSearch for previous hit in diff view\n-<$M1T-KP+>\tIncrease font size\n-<$M1T-plus>\tIncrease font size\n-<$M1T-KP->\tDecrease font size\n-<$M1T-minus>\tDecrease font size\n+<M1T-S>\t\tSearch for next hit in diff view\n+<M1T-R>\t\tSearch for previous hit in diff view\n+<M1T-KP+>\tIncrease font size\n+<M1T-plus>\tIncrease font size\n+<M1T-KP->\tDecrease font size\n+<M1T-minus>\tDecrease font size\n <F5>\t\tUpdate\n-\"] \\\n+\" ] ] \\\n \t    -justify left -bg white -border 2 -relief groove\n     pack $w.m -side top -fill both -padx 2 -pady 2\n     button $w.ok -text [mc \"Close\"] -command \"destroy $w\" -default active\n-- \n1.5.3.5\n"},{"id":"65375","messageId":"18316.40891.875291.618507@cargo.ozlabs.ibm.com","threadId":"11530","inReplyTo":"200801091916.52680.barra_cuda@katamail.com","subject":"Re: [PATCH - v2] gitk: fix \"Key bindings\" message","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-01-15T11:57:47Z","receivedAt":"2008-01-15T11:57:47Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Michele Ballabio writes:\n\n> This patch tries to do so. Is this correct?\n\nPretty good...  I think that $M1T needs to be passed through [mc] as\nwell, and I would tend to use [list M1T $M1T] rather than \"M1T $M1T\",\nbut apart from that it's OK.  I am wondering whether the help text\nneeds to be busted up into individual lines for processing by [mc].\n\nPaul.\n"},{"id":"65427","messageId":"200801152331.49990.barra_cuda@katamail.com","threadId":"11530","inReplyTo":"18316.40891.875291.618507@cargo.ozlabs.ibm.com","subject":"[PATCH - v3] gitk: fix \"Key bindings\" message","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2008-01-15T22:31:49Z","receivedAt":"2008-01-15T22:31:49Z","isPatch":true,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"The \"Key bindings\" message under the \"Help\" menu was too long\nand could not be parsed by the translation engine.\n\nFix both issues by translating one line at a time.\n\nSigned-off-by: Michele Ballabio <barra_cuda@katamail.com>\n---\nOn Tuesday 15 January 2008, Paul Mackerras wrote:\n> I am wondering whether the help text\n> needs to be busted up into individual lines for processing by [mc].\n\nHere it is. With this patch the strings do show up in po/gitk.pot.\n\n gitk |   78 +++++++++++++++++++++++++++++++++---------------------------------\n 1 files changed, 39 insertions(+), 39 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 5560e4d..7555968 100755\n--- a/gitk\n+++ b/gitk\n@@ -1307,45 +1307,45 @@ proc keys {} {\n     }\n     toplevel $w\n     wm title $w [mc \"Gitk key bindings\"]\n-    message $w.m -text [mc \"\n-Gitk key bindings:\n-\n-<$M1T-Q>\t\tQuit\n-<Home>\t\tMove to first commit\n-<End>\t\tMove to last commit\n-<Up>, p, i\tMove up one commit\n-<Down>, n, k\tMove down one commit\n-<Left>, z, j\tGo back in history list\n-<Right>, x, l\tGo forward in history list\n-<PageUp>\tMove up one page in commit list\n-<PageDown>\tMove down one page in commit list\n-<$M1T-Home>\tScroll to top of commit list\n-<$M1T-End>\tScroll to bottom of commit list\n-<$M1T-Up>\tScroll commit list up one line\n-<$M1T-Down>\tScroll commit list down one line\n-<$M1T-PageUp>\tScroll commit list up one page\n-<$M1T-PageDown>\tScroll commit list down one page\n-<Shift-Up>\tFind backwards (upwards, later commits)\n-<Shift-Down>\tFind forwards (downwards, earlier commits)\n-<Delete>, b\tScroll diff view up one page\n-<Backspace>\tScroll diff view up one page\n-<Space>\t\tScroll diff view down one page\n-u\t\tScroll diff view up 18 lines\n-d\t\tScroll diff view down 18 lines\n-<$M1T-F>\t\tFind\n-<$M1T-G>\t\tMove to next find hit\n-<Return>\tMove to next find hit\n-/\t\tMove to next find hit, or redo find\n-?\t\tMove to previous find hit\n-f\t\tScroll diff view to next file\n-<$M1T-S>\t\tSearch for next hit in diff view\n-<$M1T-R>\t\tSearch for previous hit in diff view\n-<$M1T-KP+>\tIncrease font size\n-<$M1T-plus>\tIncrease font size\n-<$M1T-KP->\tDecrease font size\n-<$M1T-minus>\tDecrease font size\n-<F5>\t\tUpdate\n-\"] \\\n+    message $w.m -text \"\n+[mc \"Gitk key bindings:\"]\n+\n+[mc \"<%s-Q>\t\tQuit\" $M1T]\n+[mc \"<Home>\t\tMove to first commit\"]\n+[mc \"<End>\t\tMove to last commit\"]\n+[mc \"<Up>, p, i\tMove up one commit\"]\n+[mc \"<Down>, n, k\tMove down one commit\"]\n+[mc \"<Left>, z, j\tGo back in history list\"]\n+[mc \"<Right>, x, l\tGo forward in history list\"]\n+[mc \"<PageUp>\tMove up one page in commit list\"]\n+[mc \"<PageDown>\tMove down one page in commit list\"]\n+[mc \"<%s-Home>\tScroll to top of commit list\" $M1T]\n+[mc \"<%s-End>\tScroll to bottom of commit list\" $M1T]\n+[mc \"<%s-Up>\tScroll commit list up one line\" $M1T]\n+[mc \"<%s-Down>\tScroll commit list down one line\" $M1T]\n+[mc \"<%s-PageUp>\tScroll commit list up one page\" $M1T]\n+[mc \"<%s-PageDown>\tScroll commit list down one page\" $M1T]\n+[mc \"<Shift-Up>\tFind backwards (upwards, later commits)\"]\n+[mc \"<Shift-Down>\tFind forwards (downwards, earlier commits)\"]\n+[mc \"<Delete>, b\tScroll diff view up one page\"]\n+[mc \"<Backspace>\tScroll diff view up one page\"]\n+[mc \"<Space>\t\tScroll diff view down one page\"]\n+[mc \"u\t\tScroll diff view up 18 lines\"]\n+[mc \"d\t\tScroll diff view down 18 lines\"]\n+[mc \"<%s-F>\t\tFind\" $M1T]\n+[mc \"<%s-G>\t\tMove to next find hit\" $M1T]\n+[mc \"<Return>\tMove to next find hit\"]\n+[mc \"/\t\tMove to next find hit, or redo find\"]\n+[mc \"?\t\tMove to previous find hit\"]\n+[mc \"f\t\tScroll diff view to next file\"]\n+[mc \"<%s-S>\t\tSearch for next hit in diff view\" $M1T]\n+[mc \"<%s-R>\t\tSearch for previous hit in diff view\" $M1T]\n+[mc \"<%s-KP+>\tIncrease font size\" $M1T]\n+[mc \"<%s-plus>\tIncrease font size\" $M1T]\n+[mc \"<%s-KP->\tDecrease font size\" $M1T]\n+[mc \"<%s-minus>\tDecrease font size\" $M1T]\n+[mc \"<F5>\t\tUpdate\"]\n+\" \\\n \t    -justify left -bg white -border 2 -relief groove\n     pack $w.m -side top -fill both -padx 2 -pady 2\n     button $w.ok -text [mc \"Close\"] -command \"destroy $w\" -default active\n-- \n1.5.3.5\n"}]}