From 31bb1d1b2d1e893836b0d2b091fed9e39ee84853 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 14 Sep 2007 01:50:09 -0400 Subject: git-gui: Paper bag fix missing translated strings The Tcl expression "[append [mc Foo] Bar]" does not return the string "FooBar" after translation; instead it is setting the variable Foo to the value Bar, or if Foo is already defined it is appending Bar onto the end of it. This is *not* what we wanted to have happen here. Tcl's join function is actually the correct function but its default joinStr argument is a single space. Unfortunately all of our call sites do not want an extra space added to their string. So we need a small wrapper function to make the call to join with an empty join string. In C this is (roughly) the job of the strcat function. Since strcat is not yet used at the global level it is a reasonable name to use here. Signed-off-by: Shawn O. Pearce --- lib/diff.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/diff.tcl') diff --git a/lib/diff.tcl b/lib/diff.tcl index c2ae4555fe..43565e412f 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -112,7 +112,7 @@ proc show_diff {path w {lno {}}} { set diff_active 0 unlock_index ui_status [mc "Unable to display %s" [escape_path $path]] - error_popup [append [mc "Error loading file:"] "\n\n$err"] + error_popup [strcat [mc "Error loading file:"] "\n\n$err"] return } $ui_diff conf -state normal @@ -182,7 +182,7 @@ proc show_diff {path w {lno {}}} { set diff_active 0 unlock_index ui_status [mc "Unable to display %s" [escape_path $path]] - error_popup [append [mc "Error loading diff:"] "\n\n$err"] + error_popup [strcat [mc "Error loading diff:"] "\n\n$err"] return } -- cgit v1.2.3