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>
This commit is contained in:
@ -236,7 +236,7 @@ method _update_ref {} {
|
||||
if {[catch {
|
||||
git update-ref -m $reflog_msg $ref $new $cur
|
||||
} err]} {
|
||||
_error $this [append [mc "Failed to update '%s'." $newbranch] "\n\n$err"]
|
||||
_error $this [strcat [mc "Failed to update '%s'." $newbranch] "\n\n$err"]
|
||||
return 0
|
||||
}
|
||||
}
|
||||
@ -351,7 +351,7 @@ method _readtree_wait {fd} {
|
||||
set err $readtree_d
|
||||
regsub {^fatal: } $err {} err
|
||||
$::main_status stop [mc "Aborted checkout of '%s' (file level merging is required)." [_name $this]]
|
||||
warn_popup [append [mc "File level merge required."] "
|
||||
warn_popup [strcat [mc "File level merge required."] "
|
||||
|
||||
$err
|
||||
|
||||
@ -575,7 +575,7 @@ method _toplevel {title} {
|
||||
}
|
||||
|
||||
method _fatal {err} {
|
||||
error_popup [append [mc "Failed to set current branch.
|
||||
error_popup [strcat [mc "Failed to set current branch.
|
||||
|
||||
This working directory is only partially switched. We successfully updated your files, but failed to update an internal Git file.
|
||||
|
||||
|
Reference in New Issue
Block a user