summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f57ca1e)
raw | patch | inline | side by side (parent: f57ca1e)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 21 Feb 2008 02:52:54 +0000 (21:52 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 21 Feb 2008 05:22:06 +0000 (00:22 -0500) |
Users may or may not be using aspell here. About the only thing
we are using that is aspell specific (and not supported by ispell
or an ispell variant) is some command line options when we start
up aspell, and a forced encoding of UTF-8. Both of these can be
corrected and/or cleaned up by users through an aspell wrapper
script, or through further improvements to git-gui. There is no
reason to require our translated strings to reference a specific
spell checker, especially if that spell checker implementation is
not very suitable for the language being translated.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
we are using that is aspell specific (and not supported by ispell
or an ispell variant) is some command line options when we start
up aspell, and a forced encoding of UTF-8. Both of these can be
corrected and/or cleaned up by users through an aspell wrapper
script, or through further improvements to git-gui. There is no
reason to require our translated strings to reference a specific
spell checker, especially if that spell checker implementation is
not very suitable for the language being translated.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/spellcheck.tcl | patch | blob | history |
diff --git a/lib/spellcheck.tcl b/lib/spellcheck.tcl
index d0486f80728b1db09117ddaa828b745f7173d776..f359356c84d01b14ddd3168ea39f5688a7463656 100644 (file)
--- a/lib/spellcheck.tcl
+++ b/lib/spellcheck.tcl
-# git-gui spellchecking support through aspell
+# git-gui spellchecking support through ispell/aspell
# Copyright (C) 2008 Shawn Pearce
class spellcheck {
-field s_fd {} ; # pipe to aspell
-field s_version {} ; # aspell version string
+field s_fd {} ; # pipe to ispell/aspell
+field s_version {} ; # ispell/aspell version string
field s_lang {} ; # current language code
field w_text ; # text widget we are spelling
field s_clear 0 ; # did we erase mispelled tags yet?
field s_seen [list] ; # lines last seen from $w_text in _run
field s_checked [list] ; # lines already checked
-field s_pending [list] ; # [$line $data] sent to aspell
+field s_pending [list] ; # [$line $data] sent to ispell/aspell
field s_suggest ; # array, list of suggestions, keyed by misspelling
constructor init {pipe_fd ui_text ui_menu} {
if {[gets $pipe_fd s_version] <= 0} {
close $pipe_fd
- error [mc "Not connected to aspell"]
+ error [mc "Spell checker sliently failed on startup"]
}
if {{@(#) } ne [string range $s_version 0 4]} {
close $pipe_fd
- error [strcat [mc "Unrecognized aspell version"] ": $s_version"]
+ error [strcat [mc "Unrecognized spell checker"] ": $s_version"]
}
set s_version [string range $s_version 5 end]
fconfigure $s_fd -block 1
if {[eof $s_fd]} {
if {![catch {close $s_fd} err]} {
- set err [mc "Unexpected EOF from aspell"]
+ set err [mc "Unexpected EOF from spell checker"]
}
catch {after cancel $s_i}
$w_text tag remove misspelled 1.0 end