GEPS008: Moved Relationship module
svn: r19789
This commit is contained in:
parent
8b541c3559
commit
d42b5e2a3a
@ -9,7 +9,6 @@ src/ExportOptions.py
|
||||
src/gramps.py
|
||||
src/LdsUtils.py
|
||||
src/PlaceUtils.py
|
||||
src/Relationship.py
|
||||
src/Reorder.py
|
||||
src/Spell.py
|
||||
src/ToolTips.py
|
||||
@ -23,6 +22,9 @@ src/cli/clidbman.py
|
||||
src/cli/grampscli.py
|
||||
src/cli/plug/__init__.py
|
||||
|
||||
# gen
|
||||
src/gen/relationship.py
|
||||
|
||||
# gen db API
|
||||
src/gen/db/base.py
|
||||
src/gen/db/exceptions.py
|
||||
|
@ -25,7 +25,6 @@ gdir_PYTHON = \
|
||||
LdsUtils.py \
|
||||
Lru.py\
|
||||
MacTransUtils.py\
|
||||
Relationship.py\
|
||||
Reorder.py\
|
||||
Sort.py\
|
||||
soundex.py\
|
||||
|
@ -26,6 +26,7 @@ pkgpython_PYTHON = \
|
||||
errors.py \
|
||||
ggettext.py \
|
||||
recentfiles.py \
|
||||
relationship.py \
|
||||
updatecallback.py \
|
||||
user.py
|
||||
|
||||
|
@ -59,7 +59,7 @@ from gui.views.navigationview import NavigationView
|
||||
import config
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from gui.managedwindow import GrampsWindowManager
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
from gui.glade import Glade
|
||||
from Utils import navigation_label
|
||||
|
||||
@ -466,7 +466,7 @@ class DisplayState(gen.utils.Callback):
|
||||
"""method that rebinds the relationship to the current rel calc
|
||||
Should be called after load or reload of plugins
|
||||
"""
|
||||
self.relationship = Relationship.get_relationship_calculator(reinit=True)
|
||||
self.relationship = get_relationship_calculator(reinit=True)
|
||||
|
||||
def set_gendepth(self, value):
|
||||
""" Set the generations we search back for showing relationships
|
||||
|
@ -76,7 +76,7 @@ from gui.plug import (PluginWindows, ReportPluginDialog, ToolPluginDialog)
|
||||
from gui.plug.report import report
|
||||
from gen.plug.utils import version_str_to_tup, load_addon_file
|
||||
from gui.pluginmanager import GuiPluginManager
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
from gui.displaystate import DisplayState, RecentDocsMenu
|
||||
import const
|
||||
import constfunc
|
||||
@ -332,7 +332,7 @@ class ViewManager(CLIManager):
|
||||
|
||||
self.do_reg_plugins(self.dbstate, self.uistate)
|
||||
#plugins loaded now set relationship class
|
||||
self.rel_class = Relationship.get_relationship_calculator()
|
||||
self.rel_class = get_relationship_calculator()
|
||||
self.uistate.set_relationship_class()
|
||||
# Need to call after plugins have been registered
|
||||
self.check_for_updates()
|
||||
|
@ -38,7 +38,7 @@ import time
|
||||
#------------------------------------------------------------------------
|
||||
from gen.display.name import displayer as _nd
|
||||
from gen.errors import ReportError
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
FONT_SERIF, PARA_ALIGN_CENTER,
|
||||
PARA_ALIGN_LEFT, PARA_ALIGN_RIGHT)
|
||||
@ -266,7 +266,7 @@ class Calendar(Report):
|
||||
db.get_number_of_people())
|
||||
people = self.filter.apply(self.database, people,
|
||||
self._user.step_progress)
|
||||
rel_calc = Relationship.get_relationship_calculator()
|
||||
rel_calc = get_relationship_calculator()
|
||||
self._user.end_progress()
|
||||
|
||||
self._user.begin_progress(_('Calendar Report'),
|
||||
|
@ -33,7 +33,7 @@ Display a person's relations to the home person
|
||||
|
||||
from gen.simple import SimpleAccess, SimpleDoc
|
||||
from gen.ggettext import gettext as _
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
|
||||
# define the formatting string once as a constant. Since this is reused
|
||||
|
||||
@ -60,7 +60,7 @@ class AllRelReport():
|
||||
self.person = person
|
||||
self.sdb = SimpleAccess(database)
|
||||
self.sdoc = SimpleDoc(document)
|
||||
self.rel_class = Relationship.get_relationship_calculator()
|
||||
self.rel_class = get_relationship_calculator()
|
||||
|
||||
self.msg_list = []
|
||||
|
||||
|
@ -28,7 +28,7 @@ Display a person's siblings in a report window
|
||||
|
||||
from gen.simple import SimpleAccess, SimpleDoc
|
||||
from gui.plug.quick import QuickTable
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
def run(database, document, person):
|
||||
@ -40,7 +40,7 @@ def run(database, document, person):
|
||||
sdb = SimpleAccess(database)
|
||||
sdoc = SimpleDoc(document)
|
||||
stab = QuickTable(sdb)
|
||||
rel_class = Relationship.get_relationship_calculator()
|
||||
rel_class = get_relationship_calculator()
|
||||
|
||||
# display the title
|
||||
# feature request 2356: avoid genitive form
|
||||
|
@ -39,7 +39,7 @@ not explicitly in the dictionary, but "netastre" is.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -807,7 +807,7 @@ def _get_neboda_valenciana(levela, levelb, inlaw="", step=""):
|
||||
stramplada = _LEVEL_NAME_F[amplada]
|
||||
return retorn+u" valenciana "+ stramplada+inlaw
|
||||
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
@ -815,7 +815,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
INLAW = u' polític'
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
# kinship report
|
||||
|
||||
@ -824,7 +824,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
only_birth=True,
|
||||
in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
see Relationship.py
|
||||
see relationship.py
|
||||
"""
|
||||
|
||||
rel_str = u"parents llunyans"
|
||||
@ -906,7 +906,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
in_law_b=False,
|
||||
):
|
||||
"""
|
||||
see Relationship.py
|
||||
see relationship.py
|
||||
"""
|
||||
|
||||
if only_birth:
|
||||
@ -1042,7 +1042,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
def get_sibling_relationship_string(self, sib_type, gender_a,
|
||||
gender_b, in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
voir Relationship.py
|
||||
voir relationship.py
|
||||
"""
|
||||
|
||||
if in_law_a or in_law_b:
|
||||
@ -1114,6 +1114,6 @@ if __name__ == "__main__":
|
||||
# rel_xx.py module, and test your work with:
|
||||
# python src/plugins/rel/rel_xx.py
|
||||
#""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -34,7 +34,7 @@ Czech-specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -73,13 +73,13 @@ _niece_level = [ "", "neteř", "praneteř", "prapraneteř", ]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_male_cousin(self, level):
|
||||
if level > len(_level_name)-1:
|
||||
@ -227,6 +227,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Written by Alex Roitman, largely based on Relationship.py by Don Allingham
|
||||
# Written by Alex Roitman, largely based on relationship.py by Don Allingham
|
||||
# and on valuable input from Lars Kr. Lundin
|
||||
"""
|
||||
Specific classes for relationships.
|
||||
@ -35,7 +35,7 @@ Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -76,13 +76,13 @@ _niece_level = [ "", "niecen", "næstsøskendebarnet", "søsterens barnebarn", ]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_parents(self, level):
|
||||
if level > len(_parents_level)-1:
|
||||
@ -199,7 +199,7 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Original version written by Alex Roitman, largely based on Relationship.py
|
||||
# Original version written by Alex Roitman, largely based on relationship.py
|
||||
# by Don Allingham and on valuable input from Dr. Martin Senftleben
|
||||
# Modified by Joachim Breitner to not use „Großcousine“, in accordance with
|
||||
# http://de.wikipedia.org/wiki/Verwandtschaftsbeziehung
|
||||
@ -47,7 +47,7 @@ import re
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -127,12 +127,12 @@ _schwippschwager = {
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def _make_roman(self, num):
|
||||
roman = ''
|
||||
@ -300,6 +300,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
rc = RelationshipCalculator()
|
||||
test(rc, True)
|
||||
|
@ -33,7 +33,7 @@ Spanish-specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -118,13 +118,13 @@ _niece_level = [ "", "sobrina", "sobrina nieta", "sobrina bisnieta", ]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_male_cousin(self, level):
|
||||
if level < len(_level_name_male):
|
||||
@ -330,6 +330,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Written by Alex Roitman, largely based on Relationship.py by Don Allingham
|
||||
# Written by Alex Roitman, largely based on relationship.py by Don Allingham
|
||||
# and on valuable input from Eero Tamminen
|
||||
"""
|
||||
Specific classes for relationships.
|
||||
@ -35,7 +35,7 @@ Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -51,13 +51,13 @@ _parents_level = [ "", "vanhemmat", "isovanhemmat", "isoisovanhemmat",
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_cousin(self, level):
|
||||
if level == 0:
|
||||
@ -219,6 +219,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -33,7 +33,7 @@ French-specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -413,7 +413,7 @@ def get_niece(level, inlaw=""):
|
||||
else:
|
||||
return _NIECE_LEVEL[level] % inlaw
|
||||
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
@ -421,7 +421,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
INLAW = u' (par alliance)'
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
# kinship report
|
||||
|
||||
@ -430,7 +430,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
only_birth=True,
|
||||
in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
voir Relationship.py
|
||||
voir relationship.py
|
||||
"""
|
||||
|
||||
rel_str = u"des parents lointains"
|
||||
@ -551,7 +551,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
in_law_b=False,
|
||||
):
|
||||
"""
|
||||
voir Relationship.py
|
||||
voir relationship.py
|
||||
"""
|
||||
|
||||
if only_birth:
|
||||
@ -776,7 +776,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
def get_sibling_relationship_string(self, sib_type, gender_a,
|
||||
gender_b, in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
voir Relationship.py
|
||||
voir relationship.py
|
||||
"""
|
||||
|
||||
if in_law_a or in_law_b:
|
||||
@ -855,6 +855,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -33,7 +33,7 @@ Croatian-specific classes for calculating relationships and kinship names.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
#import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
_PARENTS = ['', 'otac i majka', 'djedovi i bake', 'pradjedovi i prabake',
|
||||
'%s pradjedovi i %s prabake']
|
||||
@ -149,12 +149,12 @@ def _get_uncles(gen, inlaw):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_plural_relationship_string(self, gena, genb, reltocommon_a='',
|
||||
reltocommon_b='', only_birth=True, in_law_a=False, in_law_b=False):
|
||||
@ -193,6 +193,6 @@ if __name__ == "__main__":
|
||||
# imported modules):
|
||||
# export PYTHONPATH=/path/to/gramps/src
|
||||
# python src/plugins/rel/rel_ru.py
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -35,7 +35,7 @@ Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -55,13 +55,13 @@ _level = \
|
||||
# Specific relationship functions
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
|
||||
def get_parents (self, level):
|
||||
@ -295,6 +295,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -38,7 +38,7 @@ Italian-Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -123,7 +123,7 @@ _niece_level = [ "", "la nipote%(step)s%(inlaw)s",
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
@ -133,7 +133,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
STEP = ' adottiv%(gen)s'
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -380,7 +380,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
only_birth=True,
|
||||
in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
See Comment in Relationship Class (Relationship.py)
|
||||
See Comment in Relationship Class (relationship.py)
|
||||
"""
|
||||
|
||||
if only_birth:
|
||||
@ -518,6 +518,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -31,7 +31,7 @@ Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -243,7 +243,7 @@ _uncle_level = [ "",
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
@ -255,7 +255,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
INLAW = 'aangetrouwde '
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_parents(self, level):
|
||||
if level > len(_parents_level)-1:
|
||||
@ -553,6 +553,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Written by Alex Roitman, largely based on Relationship.py by Don Allingham
|
||||
# Written by Alex Roitman, largely based on relationship.py by Don Allingham
|
||||
# and on valuable input from Frode Jemtland
|
||||
"""
|
||||
Norwegian-Specific classes for relationships.
|
||||
@ -35,7 +35,7 @@ Norwegian-Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -53,13 +53,13 @@ _cousin_terms = _cousin_level + ["fetter", "kusine"]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_parents(self, level):
|
||||
if level == 0:
|
||||
@ -262,6 +262,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -25,8 +25,8 @@
|
||||
# Rewritten in 2008 for 3.x version by Łukasz Rymarczyk
|
||||
# Written in 2007 by Piotr Czubaszek, largely based on rel_de.py by Alex Roitman.
|
||||
|
||||
# PL: Po objaśnienia oznaczania relacji zobacz Relationship.py
|
||||
# EN: For more information see Relationship.py
|
||||
# PL: Po objaśnienia oznaczania relacji zobacz relationship.py
|
||||
# EN: For more information see relationship.py
|
||||
#
|
||||
"""
|
||||
Polish-specific definitions of relationships.
|
||||
@ -38,7 +38,7 @@ Polish-specific definitions of relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -251,13 +251,13 @@ _niece_level_of_sisters_daughter = [ "", "siostrzenica",
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_son(self, level, inlaw=''):
|
||||
"""
|
||||
@ -923,6 +923,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -35,7 +35,7 @@ Specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -144,13 +144,13 @@ _NEPHEWS_NIECES_LEVEL = [u"", u"sobrinhos e sobrinhas",
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_male_cousin(self, level):
|
||||
if level < len(_level_name_male):
|
||||
@ -457,6 +457,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Written by Alex Roitman, largely based on Relationship.py by Don Allingham.
|
||||
# Written by Alex Roitman, largely based on relationship.py by Don Allingham.
|
||||
"""
|
||||
Russian-specific definitions of relationships
|
||||
"""
|
||||
@ -34,7 +34,7 @@ Russian-specific definitions of relationships
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -299,13 +299,13 @@ _nephews_nieces_level = [
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def get_parents(self, level):
|
||||
if level > len(_parents_level)-1:
|
||||
@ -502,6 +502,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -31,7 +31,7 @@ Slovak-specific classes for relationships.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -107,7 +107,7 @@ _nephews_nieces_level = [ "", "synovci a netere",
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
@ -116,7 +116,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
|
||||
# od aktívnej osoby vzhľadom k spoločnému predkovi Ga=[level]
|
||||
@ -232,7 +232,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
only_birth=True,
|
||||
in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
see Relationship.py
|
||||
see relationship.py
|
||||
"""
|
||||
rel_str = "vzdialení príbuzní"
|
||||
gen = " z %s-ej generácie"
|
||||
@ -324,7 +324,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
only_birth=True,
|
||||
in_law_a=False, in_law_b=False):
|
||||
"""
|
||||
see Relationship.py
|
||||
see relationship.py
|
||||
"""
|
||||
if only_birth:
|
||||
step = ''
|
||||
@ -591,6 +591,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -34,7 +34,7 @@ Slovenian-specific definitions of relationships
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -66,13 +66,13 @@ _neph_niec = [ u"", u"nečaki", u"pranečaki", u"prapranečaki" ]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def getAncestor(self, level):
|
||||
if level > len(_ancestors)-1:
|
||||
@ -329,7 +329,7 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
#
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
# Written by Alex Roitman, largely based on Relationship.py by Don Allingham
|
||||
# Written by Alex Roitman, largely based on relationship.py by Don Allingham
|
||||
# and on valuable input from Jens Arvidsson
|
||||
# Updated to 3.0 by Peter Landgren 2007-12-30.
|
||||
#
|
||||
@ -37,7 +37,7 @@ Swedish-specific definitions of relationships
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import gen.lib
|
||||
import Relationship
|
||||
import gen.relationship
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -67,7 +67,7 @@ u"artonde", u"nittonde", u"tjugonde" ]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
class RelationshipCalculator(gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
RelationshipCalculator Class
|
||||
"""
|
||||
@ -80,7 +80,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
|
||||
def __init__(self):
|
||||
Relationship.RelationshipCalculator.__init__(self)
|
||||
gen.relationship.RelationshipCalculator.__init__(self)
|
||||
|
||||
def _get_cousin(self, level, step, inlaw):
|
||||
if level > len(_cousin_level)-1:
|
||||
@ -540,6 +540,6 @@ if __name__ == "__main__":
|
||||
rel_xx.py module, and test your work with:
|
||||
python src/plugins/rel/rel_xx.py
|
||||
"""
|
||||
from Relationship import test
|
||||
from gen.relationship import test
|
||||
RC = RelationshipCalculator()
|
||||
test(RC, True)
|
||||
|
@ -40,7 +40,7 @@ import datetime, time
|
||||
from gen.display.name import displayer as global_name_display
|
||||
from gen.errors import ReportError
|
||||
from gen.lib import NameType, EventType, Name, Date, Person
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
FONT_SERIF, PARA_ALIGN_RIGHT,
|
||||
PARA_ALIGN_LEFT, PARA_ALIGN_CENTER)
|
||||
@ -218,7 +218,7 @@ class CalendarReport(Report):
|
||||
self._user.step_progress)
|
||||
self._user.end_progress()
|
||||
|
||||
rel_calc = Relationship.get_relationship_calculator()
|
||||
rel_calc = get_relationship_calculator()
|
||||
|
||||
self._user.begin_progress(_('Birthday and Anniversary Report'),
|
||||
_('Reading database...'), len(people))
|
||||
|
@ -40,7 +40,7 @@ from gen.ggettext import gettext as _
|
||||
#------------------------------------------------------------------------
|
||||
from gen.display.name import displayer as global_name_display
|
||||
from gen.errors import ReportError
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import (NumberOption, BooleanOption, PersonOption,
|
||||
@ -100,7 +100,7 @@ class KinshipReport(Report):
|
||||
self._name_display.set_default_format(name_format)
|
||||
|
||||
self.__db = database
|
||||
self.rel_calc = Relationship.get_relationship_calculator()
|
||||
self.rel_calc = get_relationship_calculator()
|
||||
|
||||
self.kinship_map = {}
|
||||
self.spouse_map = {}
|
||||
|
@ -48,7 +48,7 @@ from gen.display.name import displayer as name_displayer
|
||||
from gui.managedwindow import ManagedWindow
|
||||
from gui.views.treemodels import PeopleBaseModel, PersonTreeModel
|
||||
from libpersonview import BasePersonView
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
|
||||
from gui.dialog import ErrorDialog
|
||||
from gui.plug import tool
|
||||
@ -93,7 +93,7 @@ class RelCalc(tool.Tool, ManagedWindow):
|
||||
self.colord.append((0, col, size))
|
||||
|
||||
self.dbstate = dbstate
|
||||
self.relationship = Relationship.get_relationship_calculator()
|
||||
self.relationship = get_relationship_calculator()
|
||||
self.relationship.connect_db_signals(dbstate)
|
||||
|
||||
self.glade = Glade()
|
||||
|
@ -108,7 +108,7 @@ from libgedcom import make_gedcom_date
|
||||
from PlaceUtils import conv_lat_lon
|
||||
from gui.pluginmanager import GuiPluginManager
|
||||
|
||||
import Relationship
|
||||
from gen.relationship import get_relationship_calculator
|
||||
#------------------------------------------------
|
||||
# constants
|
||||
#------------------------------------------------
|
||||
@ -7025,7 +7025,7 @@ class NavWebReport(Report):
|
||||
self.base_pages()
|
||||
|
||||
# for use with discovering biological, half, and step siblings for use in display_ind_parents()...
|
||||
rel_class = Relationship.get_relationship_calculator()
|
||||
rel_class = get_relationship_calculator()
|
||||
|
||||
# build classes IndividualListPage and IndividualPage
|
||||
self.person_pages(ind_list, place_list, source_list, place_lat_long, rel_class)
|
||||
|
Loading…
Reference in New Issue
Block a user