From a3d97afaa8b4187d62496ccc9cf268e8bd47c5db Mon Sep 17 00:00:00 2001 From: Vasco Almeida Date: Sun, 8 May 2016 10:52:57 +0000 Subject: git-gui: fix incorrect use of Tcl append command Fix wrong use of append command in strings marked for translation. According to Tcl/Tk Documentation [1], append varName ?value value value ...? appends all value arguments to the current value of variable varName. This means that append "[appname] ([reponame]): " [mc "File Viewer"] is setting a variable named "[appname] ([reponame]): " to the output of [mc "File Viewer"], rather than returning the concatenation of both expressions as one might expect. The format for some strings enables, for instance, a French translator to translate like "%s (%s) : Create Branch" (space before colon). Conversely, strings already translated will be marked as fuzzy and the translator must update them herself. For some cases, use alternative way for concatenation instead of using strcat procedure defined in git-gui.sh. Reference: 31bb1d1 ("git-gui: Paper bag fix missing translated strings", 2007-09-14) fixes the same issue slightly differently. [1] http://www.tcl.tk/man/tcl/TclCmd/append.htm Signed-off-by: Vasco Almeida Signed-off-by: Pat Thoyts --- lib/merge.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/merge.tcl') diff --git a/lib/merge.tcl b/lib/merge.tcl index 5ab6f8f10..2b10a9838 100644 --- a/lib/merge.tcl +++ b/lib/merge.tcl @@ -144,7 +144,7 @@ constructor dialog {} { } make_dialog top w - wm title $top [append "[appname] ([reponame]): " [mc "Merge"]] + wm title $top [mc "%s (%s): Merge" [appname] [reponame]] if {$top ne {.}} { wm geometry $top "+[winfo rootx .]+[winfo rooty .]" } -- cgit v1.2.1