return [eval [list format $fmt] $args]
}
+proc strcat {args} {
+ return [join $args {}]
+}
+
::msgcat::mcload $oguimsg
unset oguimsg
-icon error \
-type ok \
-title [mc "git-gui: fatal error"] \
- -message [append [mc "Cannot parse Git version string:"] "\n\n$_git_version"]
+ -message [strcat [mc "Cannot parse Git version string:"] "\n\n$_git_version"]
exit 1
}
set _prefix [git rev-parse --show-prefix]
} err]} {
catch {wm withdraw .}
- error_popup [append [mc "Cannot find the git directory:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot find the git directory:"] "\n\n$err"]
exit 1
}
if {![file isdirectory $_gitdir] && [is_Cygwin]} {
}
if {![file isdirectory $_gitdir]} {
catch {wm withdraw .}
- error_popup [append [mc "Git directory not found:"] "\n\n$_gitdir"]
+ error_popup [strcat [mc "Git directory not found:"] "\n\n$_gitdir"]
exit 1
}
if {$_prefix ne {}} {
regsub -all {[^/]+/} $_prefix ../ cdup
if {[catch {cd $cdup} err]} {
catch {wm withdraw .}
- error_popup [append [mc "Cannot move to top of working directory:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot move to top of working directory:"] "\n\n$err"]
exit 1
}
unset cdup
} elseif {![is_enabled bare]} {
if {[lindex [file split $_gitdir] end] ne {.git}} {
catch {wm withdraw .}
- error_popup [append [mc "Cannot use funny .git directory:"] "\n\n$_gitdir"]
+ error_popup [strcat [mc "Cannot use funny .git directory:"] "\n\n$_gitdir"]
exit 1
}
if {[catch {cd [file dirname $_gitdir]} err]} {
catch {wm withdraw .}
- error_popup [append [mc "No working directory"] " [file dirname $_gitdir]:\n\n$err"]
+ error_popup [strcat [mc "No working directory"] " [file dirname $_gitdir]:\n\n$err"]
exit 1
}
}
font configure $font $cn $cv
}
} err]} {
- error_popup [append [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]
+ error_popup [strcat [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]
}
foreach {cn cv} [font configure $font] {
font configure ${font}bold $cn $cv
}
$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
}
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
}
-type ok \
-title [wm title $w] \
-parent $w \
- -message [append [mc "Failed to rename '%s'." $oldname] "\n\n$err"]
+ -message [strcat [mc "Failed to rename '%s'." $oldname] "\n\n$err"]
return
}
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
}
}
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
}
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.
}
set top [winfo toplevel $w]
- set msg [append [mc "Invalid revision: %s" [get $this]] "\n\n$err"]
+ set msg [strcat [mc "Invalid revision: %s" [get $this]] "\n\n$err"]
tk_messageBox \
-icon error \
-type ok \
}
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
}
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 {}
}
}
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
}
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
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
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
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
}
proc do_save_config {w} {
if {[catch {save_config} err]} {
- error_popup [append [mc "Failed to completely save options:"] "\n\n$err"]
+ error_popup [strcat [mc "Failed to completely save options:"] "\n\n$err"]
}
reshow_diff
destroy $w
puts $fd " \"[file normalize $argv0]\""
close $fd
} err]} {
- error_popup [append [mc "Cannot write script:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot write script:"] "\n\n$err"]
}
}
}
puts $fd " &\""
close $fd
} err]} {
- error_popup [append [mc "Cannot write script:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot write script:"] "\n\n$err"]
}
}
}
file attributes $exe -permissions u+x,g+x,o+x
} err]} {
- error_popup [append [mc "Cannot write icon:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot write icon:"] "\n\n$err"]
}
}
}