summaryrefslogtreecommitdiff
path: root/lib/blame.tcl
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-09-14 01:50:09 -0400
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-09-14 01:51:18 -0400
commit31bb1d1b2d1e893836b0d2b091fed9e39ee84853 (patch)
tree88f778a7c48f2941c5c89a137c0f162eab68250d /lib/blame.tcl
parentgit-gui: Make the tree browser also use lightgray selection (diff)
downloadtgif-31bb1d1b2d1e893836b0d2b091fed9e39ee84853.tar.xz
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 <spearce@spearce.org>
Diffstat (limited to 'lib/blame.tcl')
-rw-r--r--lib/blame.tcl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index d14805e929..a911c3c77d 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -784,16 +784,16 @@ method _showcommit {cur_w lno} {
}
$w_cviewer insert end "commit $cmit\n" header_key
- $w_cviewer insert end [append [mc "Author:"] "\t"] header_key
+ $w_cviewer insert end [strcat [mc "Author:"] "\t"] header_key
$w_cviewer insert end "$author_name $author_email" header_val
$w_cviewer insert end " $author_time\n" header_val
- $w_cviewer insert end [append [mc "Committer:"] "\t"] header_key
+ $w_cviewer insert end [strcat [mc "Committer:"] "\t"] header_key
$w_cviewer insert end "$committer_name $committer_email" header_val
$w_cviewer insert end " $committer_time\n" header_val
if {$file ne $path} {
- $w_cviewer insert end [append [mc "Original File:"] "\t"] header_key
+ $w_cviewer insert end [strcat [mc "Original File:"] "\t"] header_key
$w_cviewer insert end "[escape_path $file]\n" header_val
}
@@ -907,18 +907,18 @@ method _open_tooltip {cur_w} {
catch {set summary $header($cmit,summary)}
catch {set author_time [foramt_date $header($cmit,author-time)]}
- $tooltip_t insert end [append [mc "Originally By:"] "\n"] section_header
+ $tooltip_t insert end [strcat [mc "Originally By:"] "\n"] section_header
$tooltip_t insert end "commit $cmit\n"
$tooltip_t insert end "$author_name $author_time\n"
$tooltip_t insert end "$summary\n"
if {$file ne $path} {
- $tooltip_t insert end [append [mc "In File:"] " "] section_header
+ $tooltip_t insert end [strcat [mc "In File:"] " "] section_header
$tooltip_t insert end "$file\n"
}
$tooltip_t insert end "\n"
- $tooltip_t insert end [append [mc "Copied Or Moved Here By:"] "\n"] section_header
+ $tooltip_t insert end [strcat [mc "Copied Or Moved Here By:"] "\n"] section_header
$tooltip_t insert end $save
}