git-gui: add some strings to translation
Most of these changes were suggested by Shawn Pearce in an answer to Johannes Schindelin. Some strings for the blame module were added too. [sp: Minor edits in blame module formatting] Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
4baba57f8d
commit
c8c4854bec
30
git-gui.sh
30
git-gui.sh
@ -37,7 +37,7 @@ if {[catch {package require Tcl 8.4} err]
|
|||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
-icon error \
|
-icon error \
|
||||||
-type ok \
|
-type ok \
|
||||||
-title "git-gui: fatal error" \
|
-title [mc "git-gui: fatal error"] \
|
||||||
-message $err
|
-message $err
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -526,7 +526,7 @@ if {[catch {set _git_version [git --version]} err]} {
|
|||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
-icon error \
|
-icon error \
|
||||||
-type ok \
|
-type ok \
|
||||||
-title "git-gui: fatal error" \
|
-title [mc "git-gui: fatal error"] \
|
||||||
-message "Cannot determine Git version:
|
-message "Cannot determine Git version:
|
||||||
|
|
||||||
$err
|
$err
|
||||||
@ -539,7 +539,7 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
|
|||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
-icon error \
|
-icon error \
|
||||||
-type ok \
|
-type ok \
|
||||||
-title "git-gui: fatal error" \
|
-title [mc "git-gui: fatal error"] \
|
||||||
-message [append [mc "Cannot parse Git version string:"] "\n\n$_git_version"]
|
-message [append [mc "Cannot parse Git version string:"] "\n\n$_git_version"]
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -621,7 +621,7 @@ if {[git-version < 1.5]} {
|
|||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
-icon error \
|
-icon error \
|
||||||
-type ok \
|
-type ok \
|
||||||
-title "git-gui: fatal error" \
|
-title [mc "git-gui: fatal error"] \
|
||||||
-message "[appname] requires Git 1.5.0 or later.
|
-message "[appname] requires Git 1.5.0 or later.
|
||||||
|
|
||||||
You are using [git-version]:
|
You are using [git-version]:
|
||||||
@ -640,7 +640,7 @@ if {[catch {set fd [open $idx r]} err]} {
|
|||||||
tk_messageBox \
|
tk_messageBox \
|
||||||
-icon error \
|
-icon error \
|
||||||
-type ok \
|
-type ok \
|
||||||
-title "git-gui: fatal error" \
|
-title [mc "git-gui: fatal error"] \
|
||||||
-message $err
|
-message $err
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -737,7 +737,7 @@ if {$_prefix ne {}} {
|
|||||||
regsub -all {[^/]+/} $_prefix ../ cdup
|
regsub -all {[^/]+/} $_prefix ../ cdup
|
||||||
if {[catch {cd $cdup} err]} {
|
if {[catch {cd $cdup} err]} {
|
||||||
catch {wm withdraw .}
|
catch {wm withdraw .}
|
||||||
error_popup "Cannot move to top of working directory:\n\n$err"
|
error_popup [append [mc "Cannot move to top of working directory:"] "\n\n$err"]
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
unset cdup
|
unset cdup
|
||||||
@ -2077,7 +2077,7 @@ blame {
|
|||||||
}
|
}
|
||||||
blame {
|
blame {
|
||||||
if {$head eq {} && ![file exists $path]} {
|
if {$head eq {} && ![file exists $path]} {
|
||||||
puts stderr "fatal: cannot stat path $path: No such file or directory"
|
puts stderr [mc "fatal: cannot stat path %s: No such file or directory" $path]
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
blame::new $head $path
|
blame::new $head $path
|
||||||
@ -2588,13 +2588,13 @@ focus -force $ui_comm
|
|||||||
if {[is_Cygwin]} {
|
if {[is_Cygwin]} {
|
||||||
set ignored_env 0
|
set ignored_env 0
|
||||||
set suggest_user {}
|
set suggest_user {}
|
||||||
set msg "Possible environment issues exist.
|
set msg [mc "Possible environment issues exist.
|
||||||
|
|
||||||
The following environment variables are probably
|
The following environment variables are probably
|
||||||
going to be ignored by any Git subprocess run
|
going to be ignored by any Git subprocess run
|
||||||
by [appname]:
|
by %s:
|
||||||
|
|
||||||
"
|
" [appname]]
|
||||||
foreach name [array names env] {
|
foreach name [array names env] {
|
||||||
switch -regexp -- $name {
|
switch -regexp -- $name {
|
||||||
{^GIT_INDEX_FILE$} -
|
{^GIT_INDEX_FILE$} -
|
||||||
@ -2618,18 +2618,18 @@ by [appname]:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if {$ignored_env > 0} {
|
if {$ignored_env > 0} {
|
||||||
append msg "
|
append msg [mc "
|
||||||
This is due to a known issue with the
|
This is due to a known issue with the
|
||||||
Tcl binary distributed by Cygwin."
|
Tcl binary distributed by Cygwin."]
|
||||||
|
|
||||||
if {$suggest_user ne {}} {
|
if {$suggest_user ne {}} {
|
||||||
append msg "
|
append msg [mc "
|
||||||
|
|
||||||
A good replacement for $suggest_user
|
A good replacement for %s
|
||||||
is placing values for the user.name and
|
is placing values for the user.name and
|
||||||
user.email settings into your personal
|
user.email settings into your personal
|
||||||
~/.gitconfig file.
|
~/.gitconfig file.
|
||||||
"
|
" $suggest_user]
|
||||||
}
|
}
|
||||||
warn_popup $msg
|
warn_popup $msg
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ method _read_file {fd jump} {
|
|||||||
|
|
||||||
_exec_blame $this $w_asim @asim_data \
|
_exec_blame $this $w_asim @asim_data \
|
||||||
[list] \
|
[list] \
|
||||||
{ copy/move tracking}
|
[mc "Loading copy/move tracking annotations..."]
|
||||||
}
|
}
|
||||||
} ifdeleted { catch {close $fd} }
|
} ifdeleted { catch {close $fd} }
|
||||||
|
|
||||||
@ -489,8 +489,8 @@ method _exec_blame {cur_w cur_d options cur_s} {
|
|||||||
set blame_lines 0
|
set blame_lines 0
|
||||||
|
|
||||||
$status start \
|
$status start \
|
||||||
"Loading$cur_s annotations..." \
|
$cur_s \
|
||||||
{lines annotated}
|
[mc "lines annotated"]
|
||||||
}
|
}
|
||||||
|
|
||||||
method _read_blame {fd cur_w cur_d} {
|
method _read_blame {fd cur_w cur_d} {
|
||||||
@ -671,10 +671,10 @@ method _read_blame {fd cur_w cur_d} {
|
|||||||
if {$cur_w eq $w_asim} {
|
if {$cur_w eq $w_asim} {
|
||||||
_exec_blame $this $w_amov @amov_data \
|
_exec_blame $this $w_amov @amov_data \
|
||||||
$original_options \
|
$original_options \
|
||||||
{ original location}
|
[mc "Loading original location annotations..."]
|
||||||
} else {
|
} else {
|
||||||
set current_fd {}
|
set current_fd {}
|
||||||
$status stop {Annotation complete.}
|
$status stop [mc "Annotation complete."]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$status update $blame_lines $total_lines
|
$status update $blame_lines $total_lines
|
||||||
@ -728,7 +728,7 @@ method _showcommit {cur_w lno} {
|
|||||||
|
|
||||||
if {$dat eq {}} {
|
if {$dat eq {}} {
|
||||||
set cmit {}
|
set cmit {}
|
||||||
$w_cviewer insert end "Loading annotation..." still_loading
|
$w_cviewer insert end [mc "Loading annotation..."] still_loading
|
||||||
} else {
|
} else {
|
||||||
set cmit [lindex $dat 0]
|
set cmit [lindex $dat 0]
|
||||||
set file [lindex $dat 1]
|
set file [lindex $dat 1]
|
||||||
@ -784,16 +784,16 @@ method _showcommit {cur_w lno} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$w_cviewer insert end "commit $cmit\n" header_key
|
$w_cviewer insert end "commit $cmit\n" header_key
|
||||||
$w_cviewer insert end "Author:\t" header_key
|
$w_cviewer insert end [append [mc "Author:"] "\t"] header_key
|
||||||
$w_cviewer insert end "$author_name $author_email" header_val
|
$w_cviewer insert end "$author_name $author_email" header_val
|
||||||
$w_cviewer insert end " $author_time\n" header_val
|
$w_cviewer insert end " $author_time\n" header_val
|
||||||
|
|
||||||
$w_cviewer insert end "Committer:\t" header_key
|
$w_cviewer insert end [append [mc "Committer:"] "\t"] header_key
|
||||||
$w_cviewer insert end "$committer_name $committer_email" header_val
|
$w_cviewer insert end "$committer_name $committer_email" header_val
|
||||||
$w_cviewer insert end " $committer_time\n" header_val
|
$w_cviewer insert end " $committer_time\n" header_val
|
||||||
|
|
||||||
if {$file ne $path} {
|
if {$file ne $path} {
|
||||||
$w_cviewer insert end "Original File:\t" header_key
|
$w_cviewer insert end [append [mc "Original File:"] "\t"] header_key
|
||||||
$w_cviewer insert end "[escape_path $file]\n" header_val
|
$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 summary $header($cmit,summary)}
|
||||||
catch {set author_time [foramt_date $header($cmit,author-time)]}
|
catch {set author_time [foramt_date $header($cmit,author-time)]}
|
||||||
|
|
||||||
$tooltip_t insert end "Originally By:\n" section_header
|
$tooltip_t insert end [append [mc "Originally By:"] "\n"] section_header
|
||||||
$tooltip_t insert end "commit $cmit\n"
|
$tooltip_t insert end "commit $cmit\n"
|
||||||
$tooltip_t insert end "$author_name $author_time\n"
|
$tooltip_t insert end "$author_name $author_time\n"
|
||||||
$tooltip_t insert end "$summary\n"
|
$tooltip_t insert end "$summary\n"
|
||||||
|
|
||||||
if {$file ne $path} {
|
if {$file ne $path} {
|
||||||
$tooltip_t insert end "In File: " section_header
|
$tooltip_t insert end [append [mc "In File:"] " "] section_header
|
||||||
$tooltip_t insert end "$file\n"
|
$tooltip_t insert end "$file\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
$tooltip_t insert end "\n"
|
$tooltip_t insert end "\n"
|
||||||
$tooltip_t insert end "Copied Or Moved Here By:\n" section_header
|
$tooltip_t insert end [append [mc "Copied Or Moved Here By:"] "\n"] section_header
|
||||||
$tooltip_t insert end $save
|
$tooltip_t insert end $save
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ method _finish_fetch {ok} {
|
|||||||
}
|
}
|
||||||
if {[catch {set new_hash [git rev-parse --verify "$l_trck^0"]} err]} {
|
if {[catch {set new_hash [git rev-parse --verify "$l_trck^0"]} err]} {
|
||||||
set ok 0
|
set ok 0
|
||||||
$w_cons insert "fatal: Cannot resolve $l_trck"
|
$w_cons insert [mc "fatal: Cannot resolve %s" $l_trck]
|
||||||
$w_cons insert $err
|
$w_cons insert $err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -319,7 +319,7 @@ method _readtree {} {
|
|||||||
|
|
||||||
set readtree_d {}
|
set readtree_d {}
|
||||||
$::main_status start \
|
$::main_status start \
|
||||||
"Updating working directory to '[_name $this]'..." \
|
[mc "Updating working directory to '%s'..." [_name $this]] \
|
||||||
{files checked out}
|
{files checked out}
|
||||||
|
|
||||||
set fd [git_read --stderr read-tree \
|
set fd [git_read --stderr read-tree \
|
||||||
@ -443,7 +443,7 @@ If you wanted to be on a branch, create one now starting from 'This Detached Che
|
|||||||
$ui_comm delete 0.0 end
|
$ui_comm delete 0.0 end
|
||||||
$ui_comm edit reset
|
$ui_comm edit reset
|
||||||
$ui_comm edit modified false
|
$ui_comm edit modified false
|
||||||
rescan [list ui_status "Checked out '$name'."]
|
rescan [list ui_status [mc "Checked out '%s'." $name]]
|
||||||
} else {
|
} else {
|
||||||
repository_state commit_type HEAD MERGE_HEAD
|
repository_state commit_type HEAD MERGE_HEAD
|
||||||
set PARENT $HEAD
|
set PARENT $HEAD
|
||||||
|
@ -272,7 +272,7 @@ proc commit_committree {fd_wt curHEAD msg} {
|
|||||||
&& [string length $old_tree] == 45} {
|
&& [string length $old_tree] == 45} {
|
||||||
set old_tree [string range $old_tree 5 end]
|
set old_tree [string range $old_tree 5 end]
|
||||||
} else {
|
} else {
|
||||||
error "Commit $PARENT appears to be corrupt"
|
error [mc "Commit %s appears to be corrupt" $PARENT]
|
||||||
}
|
}
|
||||||
|
|
||||||
if {$tree_id eq $old_tree} {
|
if {$tree_id eq $old_tree} {
|
||||||
@ -300,7 +300,7 @@ A rescan will be automatically started now.
|
|||||||
if {$use_enc ne {}} {
|
if {$use_enc ne {}} {
|
||||||
fconfigure $msg_wt -encoding $use_enc
|
fconfigure $msg_wt -encoding $use_enc
|
||||||
} else {
|
} else {
|
||||||
puts stderr "warning: Tcl does not support encoding '$enc'."
|
puts stderr [mc "warning: Tcl does not support encoding '%s'." $enc]
|
||||||
fconfigure $msg_wt -encoding utf-8
|
fconfigure $msg_wt -encoding utf-8
|
||||||
}
|
}
|
||||||
puts -nonewline $msg_wt $msg
|
puts -nonewline $msg_wt $msg
|
||||||
|
@ -105,11 +105,11 @@ proc hint_gc {} {
|
|||||||
set objects_current [expr {$objects_current * 256}]
|
set objects_current [expr {$objects_current * 256}]
|
||||||
set object_limit [expr {$object_limit * 256}]
|
set object_limit [expr {$object_limit * 256}]
|
||||||
if {[ask_popup \
|
if {[ask_popup \
|
||||||
"This repository currently has approximately $objects_current loose objects.
|
[mc "This repository currently has approximately %i loose objects.
|
||||||
|
|
||||||
To maintain optimal performance it is strongly recommended that you compress the database when more than $object_limit loose objects exist.
|
To maintain optimal performance it is strongly recommended that you compress the database when more than %i loose objects exist.
|
||||||
|
|
||||||
Compress the database now?"] eq yes} {
|
Compress the database now?" $objects_current $object_limit]] eq yes} {
|
||||||
do_gc
|
do_gc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ proc show_diff {path w {lno {}}} {
|
|||||||
set current_diff_path $path
|
set current_diff_path $path
|
||||||
set current_diff_side $w
|
set current_diff_side $w
|
||||||
set current_diff_header {}
|
set current_diff_header {}
|
||||||
ui_status "Loading diff of [escape_path $path]..."
|
ui_status [mc "Loading diff of %s..." [escape_path $path]]
|
||||||
|
|
||||||
# - Git won't give us the diff, there's nothing to compare to!
|
# - Git won't give us the diff, there's nothing to compare to!
|
||||||
#
|
#
|
||||||
@ -111,7 +111,7 @@ proc show_diff {path w {lno {}}} {
|
|||||||
} err ]} {
|
} err ]} {
|
||||||
set diff_active 0
|
set diff_active 0
|
||||||
unlock_index
|
unlock_index
|
||||||
ui_status "Unable to display [escape_path $path]"
|
ui_status [mc "Unable to display %s" [escape_path $path]]
|
||||||
error_popup [append [mc "Error loading file:"] "\n\n$err"]
|
error_popup [append [mc "Error loading file:"] "\n\n$err"]
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ proc show_diff {path w {lno {}}} {
|
|||||||
}
|
}
|
||||||
if {[string first "\0" $content] != -1} {
|
if {[string first "\0" $content] != -1} {
|
||||||
$ui_diff insert end \
|
$ui_diff insert end \
|
||||||
"* Binary file (not showing content)." \
|
[mc "* Binary file (not showing content)."] \
|
||||||
d_@
|
d_@
|
||||||
} else {
|
} else {
|
||||||
if {$sz > $max_sz} {
|
if {$sz > $max_sz} {
|
||||||
@ -181,7 +181,7 @@ proc show_diff {path w {lno {}}} {
|
|||||||
if {[catch {set fd [eval git_read --nice $cmd]} err]} {
|
if {[catch {set fd [eval git_read --nice $cmd]} err]} {
|
||||||
set diff_active 0
|
set diff_active 0
|
||||||
unlock_index
|
unlock_index
|
||||||
ui_status "Unable to display [escape_path $path]"
|
ui_status [mc "Unable to display %s" [escape_path $path]]
|
||||||
error_popup [append [mc "Error loading diff:"] "\n\n$err"]
|
error_popup [append [mc "Error loading diff:"] "\n\n$err"]
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ proc do_unstage_selection {} {
|
|||||||
[array names selected_paths]
|
[array names selected_paths]
|
||||||
} elseif {$current_diff_path ne {}} {
|
} elseif {$current_diff_path ne {}} {
|
||||||
unstage_helper \
|
unstage_helper \
|
||||||
"Unstaging [short_path $current_diff_path] from commit" \
|
[mc "Unstaging %s from commit" [short_path $current_diff_path]] \
|
||||||
[list $current_diff_path]
|
[list $current_diff_path]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -312,7 +312,7 @@ proc do_add_selection {} {
|
|||||||
[array names selected_paths]
|
[array names selected_paths]
|
||||||
} elseif {$current_diff_path ne {}} {
|
} elseif {$current_diff_path ne {}} {
|
||||||
add_helper \
|
add_helper \
|
||||||
"Adding [short_path $current_diff_path]" \
|
[mc "Adding %s" [short_path $current_diff_path]] \
|
||||||
[list $current_diff_path]
|
[list $current_diff_path]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,9 +181,9 @@ method _delete {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {$not_merged ne {}} {
|
if {$not_merged ne {}} {
|
||||||
set msg "The following branches are not completely merged into $check_head:
|
set msg [mc "The following branches are not completely merged into %s:
|
||||||
|
|
||||||
- [join $not_merged "\n - "]"
|
- %s" $check_head [join $not_merged "\n - "]]
|
||||||
|
|
||||||
if {$need_fetch} {
|
if {$need_fetch} {
|
||||||
append msg "\n\n" [mc "One or more of the merge tests failed because you have not fetched the necessary commits. Try fetching from %s first." $uri]
|
append msg "\n\n" [mc "One or more of the merge tests failed because you have not fetched the necessary commits. Try fetching from %s first." $uri]
|
||||||
|
Loading…
Reference in New Issue
Block a user