summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4baba57)
raw | patch | inline | side by side (parent: 4baba57)
author | Michele Ballabio <barra_cuda@katamail.com> | |
Thu, 13 Sep 2007 13:19:05 +0000 (15:19 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 14 Sep 2007 00:43:26 +0000 (20:43 -0400) |
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>
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>
diff --git a/git-gui.sh b/git-gui.sh
index a4e2ad2fd7d82403dd2ad1f4844b65662d6cfead..2d7a2a82ca371edd0f965aea8a82c801f6fc19dd 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
tk_messageBox \
-icon error \
-type ok \
- -title "git-gui: fatal error" \
+ -title [mc "git-gui: fatal error"] \
-message $err
exit 1
}
tk_messageBox \
-icon error \
-type ok \
- -title "git-gui: fatal error" \
+ -title [mc "git-gui: fatal error"] \
-message "Cannot determine Git version:
$err
tk_messageBox \
-icon error \
-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"]
exit 1
}
tk_messageBox \
-icon error \
-type ok \
- -title "git-gui: fatal error" \
+ -title [mc "git-gui: fatal error"] \
-message "[appname] requires Git 1.5.0 or later.
You are using [git-version]:
tk_messageBox \
-icon error \
-type ok \
- -title "git-gui: fatal error" \
+ -title [mc "git-gui: fatal error"] \
-message $err
exit 1
}
regsub -all {[^/]+/} $_prefix ../ cdup
if {[catch {cd $cdup} err]} {
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
}
unset cdup
}
blame {
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
}
blame::new $head $path
if {[is_Cygwin]} {
set ignored_env 0
set suggest_user {}
- set msg "Possible environment issues exist.
+ set msg [mc "Possible environment issues exist.
The following environment variables are probably
going to be ignored by any Git subprocess run
-by [appname]:
+by %s:
-"
+" [appname]]
foreach name [array names env] {
switch -regexp -- $name {
{^GIT_INDEX_FILE$} -
}
}
if {$ignored_env > 0} {
- append msg "
+ append msg [mc "
This is due to a known issue with the
-Tcl binary distributed by Cygwin."
+Tcl binary distributed by Cygwin."]
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
user.email settings into your personal
~/.gitconfig file.
-"
+" $suggest_user]
}
warn_popup $msg
}
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 352aa19421034033968f6a311b1e8948ac01e25f..d14805e929e2791ebd130ebb4a39c4e1e99dd3fb 100644 (file)
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
_exec_blame $this $w_asim @asim_data \
[list] \
- { copy/move tracking}
+ [mc "Loading copy/move tracking annotations..."]
}
} ifdeleted { catch {close $fd} }
set blame_lines 0
$status start \
- "Loading$cur_s annotations..." \
- {lines annotated}
+ $cur_s \
+ [mc "lines annotated"]
}
method _read_blame {fd cur_w cur_d} {
if {$cur_w eq $w_asim} {
_exec_blame $this $w_amov @amov_data \
$original_options \
- { original location}
+ [mc "Loading original location annotations..."]
} else {
set current_fd {}
- $status stop {Annotation complete.}
+ $status stop [mc "Annotation complete."]
}
} else {
$status update $blame_lines $total_lines
if {$dat eq {}} {
set cmit {}
- $w_cviewer insert end "Loading annotation..." still_loading
+ $w_cviewer insert end [mc "Loading annotation..."] still_loading
} else {
set cmit [lindex $dat 0]
set file [lindex $dat 1]
}
$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_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_time\n" header_val
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
}
catch {set summary $header($cmit,summary)}
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 "$author_name $author_time\n"
$tooltip_t insert end "$summary\n"
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 "\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
}
diff --git a/lib/checkout_op.tcl b/lib/checkout_op.tcl
index f07262ca00876d885954ae15310a0faa197aa5ff..a011044f90039e1063a90c233747bb150d24bd20 100644 (file)
--- a/lib/checkout_op.tcl
+++ b/lib/checkout_op.tcl
}
if {[catch {set new_hash [git rev-parse --verify "$l_trck^0"]} err]} {
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
}
}
set readtree_d {}
$::main_status start \
- "Updating working directory to '[_name $this]'..." \
+ [mc "Updating working directory to '%s'..." [_name $this]] \
{files checked out}
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 edit reset
$ui_comm edit modified false
- rescan [list ui_status "Checked out '$name'."]
+ rescan [list ui_status [mc "Checked out '%s'." $name]]
} else {
repository_state commit_type HEAD MERGE_HEAD
set PARENT $HEAD
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 15489c616b76567604a605ce59b8fbb797318678..a037c4f7d0d9c186ba76a93731ce51a3aa169da1 100644 (file)
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
&& [string length $old_tree] == 45} {
set old_tree [string range $old_tree 5 end]
} else {
- error "Commit $PARENT appears to be corrupt"
+ error [mc "Commit %s appears to be corrupt" $PARENT]
}
if {$tree_id eq $old_tree} {
if {$use_enc ne {}} {
fconfigure $msg_wt -encoding $use_enc
} 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
}
puts -nonewline $msg_wt $msg
diff --git a/lib/database.tcl b/lib/database.tcl
index 118b1b29ab76671812a1e367218c2ba6247df74c..d66aa3fe3367e0a8db0ee5c90925352a3a143198 100644 (file)
--- a/lib/database.tcl
+++ b/lib/database.tcl
set objects_current [expr {$objects_current * 256}]
set object_limit [expr {$object_limit * 256}]
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
}
}
diff --git a/lib/diff.tcl b/lib/diff.tcl
index d0134096409c78221fe5dd46e9af714e555965f5..c2ae4555fe438c4263402485fea73396fcfd37e6 100644 (file)
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
set current_diff_path $path
set current_diff_side $w
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!
#
} err ]} {
set diff_active 0
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"]
return
}
}
if {[string first "\0" $content] != -1} {
$ui_diff insert end \
- "* Binary file (not showing content)." \
+ [mc "* Binary file (not showing content)."] \
d_@
} else {
if {$sz > $max_sz} {
if {[catch {set fd [eval git_read --nice $cmd]} err]} {
set diff_active 0
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"]
return
}
diff --git a/lib/index.tcl b/lib/index.tcl
index 228bccfd82b4b9e9f9704cd28efc5252eb5d2aad..47255261d293432b2094385de89387d401d20a66 100644 (file)
--- a/lib/index.tcl
+++ b/lib/index.tcl
[array names selected_paths]
} elseif {$current_diff_path ne {}} {
unstage_helper \
- "Unstaging [short_path $current_diff_path] from commit" \
+ [mc "Unstaging %s from commit" [short_path $current_diff_path]] \
[list $current_diff_path]
}
}
[array names selected_paths]
} elseif {$current_diff_path ne {}} {
add_helper \
- "Adding [short_path $current_diff_path]" \
+ [mc "Adding %s" [short_path $current_diff_path]] \
[list $current_diff_path]
}
}
index 06b5eabf91bda920c1ce382ce8ec970b0bdf4b0c..c7b81486984d46a9dca59867c406a8e247d76313 100644 (file)
}
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} {
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]