summaryrefslogtreecommitdiff
path: root/lib/commit.tcl
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-14 01:50:09 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-09-14 01:51:18 -0400
commit31bb1d1b2d1e893836b0d2b091fed9e39ee84853 (patch)
tree88f778a7c48f2941c5c89a137c0f162eab68250d /lib/commit.tcl
parentbba060462c8732a5cb46ea00165198a9579517ae (diff)
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/commit.tcl')
-rw-r--r--lib/commit.tcl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl
index a037c4f7d0..7099f5c6f7 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -46,7 +46,7 @@ You are currently in the middle of a merge that has not been fully completed. Y
}
set msg [string trim $msg]
} err]} {
- error_popup [append [mc "Error loading commit data for amend:"] "\n\n$err"]
+ error_popup [strcat [mc "Error loading commit data for amend:"] "\n\n$err"]
return
}
@@ -73,12 +73,12 @@ proc committer_ident {} {
if {$GIT_COMMITTER_IDENT eq {}} {
if {[catch {set me [git var GIT_COMMITTER_IDENT]} err]} {
- error_popup [append [mc "Unable to obtain your identity:"] "\n\n$err"]
+ error_popup [strcat [mc "Unable to obtain your identity:"] "\n\n$err"]
return {}
}
if {![regexp {^(.*) [0-9]+ [-+0-9]+$} \
$me me GIT_COMMITTER_IDENT]} {
- error_popup [append [mc "Invalid GIT_COMMITTER_IDENT:"] "\n\n$me"]
+ error_popup [strcat [mc "Invalid GIT_COMMITTER_IDENT:"] "\n\n$me"]
return {}
}
}
@@ -254,7 +254,7 @@ proc commit_committree {fd_wt curHEAD msg} {
gets $fd_wt tree_id
if {$tree_id eq {} || [catch {close $fd_wt} err]} {
- error_popup [append [mc "write-tree failed:"] "\n\n$err"]
+ error_popup [strcat [mc "write-tree failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
return
@@ -314,7 +314,7 @@ A rescan will be automatically started now.
}
lappend cmd <$msg_p
if {[catch {set cmt_id [eval git $cmd]} err]} {
- error_popup [append [mc "commit-tree failed:"] "\n\n$err"]
+ error_popup [strcat [mc "commit-tree failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
return
@@ -336,7 +336,7 @@ A rescan will be automatically started now.
if {[catch {
git update-ref -m $reflogm HEAD $cmt_id $curHEAD
} err]} {
- error_popup [append [mc "update-ref failed:"] "\n\n$err"]
+ error_popup [strcat [mc "update-ref failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
return