summaryrefslogtreecommitdiff
path: root/lib/diff.tcl
diff options
context:
space:
mode:
authorLibravatar Christian Stimming <chs@ckiste.goetheallee>2007-07-21 14:21:34 +0200
committerLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2007-09-02 16:54:48 +0100
commit1ac17950e93a956d01b042db3de70010195eddcc (patch)
tree71f6b9f721c2ea5e218349241f12f7def2853d9f /lib/diff.tcl
parentgit-gui: Initialize Tcl's msgcat library for internationalization (diff)
downloadtgif-1ac17950e93a956d01b042db3de70010195eddcc.tar.xz
Mark strings for translation.
The procedure [mc ...] will translate the strings through msgcat. Strings must be enclosed in quotes, not in braces, because otherwise xgettext cannot extract them properly, although on the Tcl side both delimiters would work fine. [jes: I merged the later patches to that end.] Signed-off-by: Christian Stimming <stimming@tuhh.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'lib/diff.tcl')
-rw-r--r--lib/diff.tcl16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index e09e1257e1..b1129d551b 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -39,13 +39,13 @@ proc handle_empty_diff {} {
set s $file_states($path)
if {[lindex $s 0] ne {_M}} return
- info_popup "No differences detected.
+ info_popup [mc "No differences detected.
-[short_path $path] has no changes.
+%s has no changes.
The modification date of this file was updated by another application, but the content within the file was not changed.
-A rescan will be automatically started to find other files which may have the same state."
+A rescan will be automatically started to find other files which may have the same state." [short_path $path]]
clear_diff
display_file $path __
@@ -94,7 +94,7 @@ proc show_diff {path w {lno {}}} {
set diff_active 0
unlock_index
ui_status "Unable to display [escape_path $path]"
- error_popup "Error loading file:\n\n$err"
+ error_popup [append [mc "Error loading file:"] "\n\n$err"]
return
}
$ui_diff conf -state normal
@@ -159,7 +159,7 @@ proc show_diff {path w {lno {}}} {
set diff_active 0
unlock_index
ui_status "Unable to display [escape_path $path]"
- error_popup "Error loading diff:\n\n$err"
+ error_popup [append [mc "Error loading diff:"] "\n\n$err"]
return
}
@@ -275,14 +275,14 @@ proc apply_hunk {x y} {
set apply_cmd {apply --cached --whitespace=nowarn}
set mi [lindex $file_states($current_diff_path) 0]
if {$current_diff_side eq $ui_index} {
- set mode unstage
+ set failed_msg [mc "Failed to unstage selected hunk."]
lappend apply_cmd --reverse
if {[string index $mi 0] ne {M}} {
unlock_index
return
}
} else {
- set mode stage
+ set failed_msg [mc "Failed to stage selected hunk."]
if {[string index $mi 1] ne {M}} {
unlock_index
return
@@ -307,7 +307,7 @@ proc apply_hunk {x y} {
puts -nonewline $p $current_diff_header
puts -nonewline $p [$ui_diff get $s_lno $e_lno]
close $p} err]} {
- error_popup "Failed to $mode selected hunk.\n\n$err"
+ error_popup [append $failed_msg "\n\n$err"]
unlock_index
return
}