GEPS008: Moved soundex module
svn: r19800
This commit is contained in:
parent
aa7ae06f6e
commit
a2af7d66b3
@ -7,7 +7,6 @@
|
||||
src/AutoComp.py
|
||||
src/ImgManip.py
|
||||
src/Sort.py
|
||||
src/soundex.py
|
||||
src/TreeTips.py
|
||||
|
||||
# cli
|
||||
@ -18,6 +17,7 @@ src/cli/user.py
|
||||
src/gen/errors.py
|
||||
src/gen/__init__.py
|
||||
src/gen/recentfiles.py
|
||||
src/gen/soundex.py
|
||||
src/gen/updatecallback.py
|
||||
src/gen/user.py
|
||||
|
||||
|
@ -22,7 +22,6 @@ gdir_PYTHON = \
|
||||
LdsUtils.py \
|
||||
MacTransUtils.py\
|
||||
Sort.py\
|
||||
soundex.py\
|
||||
Spell.py\
|
||||
ToolTips.py\
|
||||
TransUtils.py\
|
||||
|
@ -27,6 +27,7 @@ pkgpython_PYTHON = \
|
||||
ggettext.py \
|
||||
recentfiles.py \
|
||||
relationship.py \
|
||||
soundex.py \
|
||||
updatecallback.py \
|
||||
user.py
|
||||
|
||||
|
@ -19,7 +19,7 @@ dist_pkgdata_DATA = \
|
||||
addmedia.glade \
|
||||
dialog.glade \
|
||||
configure.glade \
|
||||
dateedit.glade \
|
||||
editdate.glade \
|
||||
editsource.glade \
|
||||
editcitation.glade \
|
||||
styleeditor.glade \
|
||||
|
@ -40,7 +40,7 @@ import const
|
||||
import gen.lib
|
||||
from gui.utils import ProgressMeter
|
||||
from gui.plug import tool
|
||||
import soundex
|
||||
from gen.soundex import soundex, compare
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from gui.dialog import OkDialog
|
||||
from gui.listmodel import ListModel
|
||||
@ -250,7 +250,7 @@ class Merge(tool.Tool,ManagedWindow):
|
||||
def gen_key(self, val):
|
||||
if self.use_soundex:
|
||||
try:
|
||||
return soundex.soundex(val)
|
||||
return soundex(val)
|
||||
except UnicodeEncodeError:
|
||||
return val
|
||||
else:
|
||||
@ -401,7 +401,7 @@ class Merge(tool.Tool,ManagedWindow):
|
||||
def name_compare(self, s1, s2):
|
||||
if self.use_soundex:
|
||||
try:
|
||||
return soundex.compare(s1,s2)
|
||||
return compare(s1,s2)
|
||||
except UnicodeEncodeError:
|
||||
return s1 == s2
|
||||
else:
|
||||
|
@ -30,7 +30,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import const
|
||||
import soundex
|
||||
from gen.soundex import soundex
|
||||
from gui.display import display_help
|
||||
from gui.managedwindow import ManagedWindow
|
||||
import AutoComp
|
||||
@ -90,9 +90,9 @@ class SoundGen(tool.Tool, ManagedWindow):
|
||||
n = person.get_primary_name().get_surname()
|
||||
self.name.set_text(n)
|
||||
try:
|
||||
se_text = soundex.soundex(n)
|
||||
se_text = soundex(n)
|
||||
except UnicodeEncodeError:
|
||||
se_text = soundex.soundex('')
|
||||
se_text = soundex('')
|
||||
self.value.set_text(se_text)
|
||||
else:
|
||||
self.name.set_text("")
|
||||
@ -108,9 +108,9 @@ class SoundGen(tool.Tool, ManagedWindow):
|
||||
|
||||
def on_apply_clicked(self, obj):
|
||||
try:
|
||||
se_text = soundex.soundex(unicode(obj.get_text()))
|
||||
se_text = soundex(unicode(obj.get_text()))
|
||||
except UnicodeEncodeError:
|
||||
se_text = soundex.soundex('')
|
||||
se_text = soundex('')
|
||||
self.value.set_text(se_text)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user