Merge branch 'maintenance/gramps50' of https://github.com/gramps-project/gramps into maintenance/gramps50

This commit is contained in:
Pär Ekholm 2018-11-24 18:20:06 +01:00
commit c7d552c238
18 changed files with 226 additions and 365 deletions

View File

@ -221,9 +221,9 @@ register('interface.view', True)
register('interface.surname-box-height', 150)
register('interface.treemodel-cache-size', 1000)
register('paths.recent-export-dir', '')
register('paths.recent-export-dir', USER_HOME)
register('paths.recent-file', '')
register('paths.recent-import-dir', '')
register('paths.recent-import-dir', USER_HOME)
register('paths.report-directory', USER_HOME)
register('paths.website-directory', USER_HOME)
register('paths.website-cms-uri', '')

View File

@ -1293,9 +1293,9 @@ class ClipboardListView:
data = [_ob.__class__.DRAG_TARGET.drag_type, _ob, None,
_ob._type, _ob._value, _ob._dbid, _ob._dbname]
contains = model_contains(model, data)
if (contains and
if (contains and not
((context.action if hasattr(context, "action") else
context.get_actions()) != Gdk.DragAction.MOVE)):
context.get_actions()) & Gdk.DragAction.MOVE)):
continue
drop_info = widget.get_dest_row_at_pos(x, y)
if drop_info:
@ -1314,7 +1314,7 @@ class ClipboardListView:
# on self, then it moves the first, and copies the rest.
if ((context.action if hasattr(context, "action") else
context.get_actions()) == Gdk.DragAction.MOVE):
context.get_actions()) & Gdk.DragAction.MOVE):
context.finish(True, True, time)
# remember time for double drop workaround.

View File

@ -303,27 +303,6 @@ class DbLoader(CLIDbLoader):
self._end_progress()
return True
#-------------------------------------------------------------------------
#
# default dir selection
#
#-------------------------------------------------------------------------
def get_default_dir():
# Suggested folder: try last open file, last import, last export,
# then home.
default_dir = os.path.dirname(config.get('paths.recent-file'))
if default_dir:
default_dir += os.path.sep
if len(default_dir)<=1:
default_dir = config.get('paths.recent-import-dir')
if len(default_dir)<=1:
default_dir = config.get('paths.recent-export-dir')
if len(default_dir)<=1:
default_dir = '~/'
else:
default_dir = "~/"
return default_dir
#-------------------------------------------------------------------------
#
# FileChooser filters: what to show in the file chooser
@ -474,13 +453,7 @@ class GrampsImportFileDialog(ManagedWindow):
(box, type_selector) = format_maker()
import_dialog.set_extra_widget(box)
# Suggested folder: try last open file, import, then last export,
# then home.
default_dir = config.get('paths.recent-import-dir')
if len(default_dir)<=1:
default_dir = get_default_dir()
import_dialog.set_current_folder(default_dir)
import_dialog.set_current_folder(config.get('paths.recent-import-dir'))
while True:
# the import_dialog.run() makes it modal, so any change to that
# line would require the ManagedWindow.__init__ to be changed also

View File

@ -387,12 +387,11 @@ class EditFamily(EditPrimary):
return Family()
def _local_init(self):
self.build_interface()
self.added = self.obj.handle is None
if self.added:
self.obj.handle = create_id()
self.build_interface()
self.load_data()
def _connect_db_signals(self):
@ -558,6 +557,8 @@ class EditFamily(EditPrimary):
self.fbutton_del.connect('clicked', self.del_father_clicked)
self.fbutton_add.connect('clicked', self.add_father_clicked)
if self.added:
return # avoids crash on drag because not in db yet
#allow for a context menu
self.set_contexteventbox(self.top.get_object("eventboxtop"))
#allow for drag of the family object from eventboxtop

View File

@ -250,7 +250,8 @@ class EditPerson(EditPrimary):
self.eventbox.connect('button-press-event',
self._image_button_press)
# allow to initiate a drag-and-drop with this person if it has a handle
#if self.obj.get_handle():
if self.added:
return # Avoid HandleError if dragging an objet not in db yet
tglist = Gtk.TargetList.new([])
tglist.add(DdTargets.PERSON_LINK.atom_drag_type,
DdTargets.PERSON_LINK.target_flags,

View File

@ -55,7 +55,7 @@ from gi.repository import GdkPixbuf
#
#-------------------------------------------------------------------------
from gramps.gen.const import USER_HOME, ICON, SPLASH, GRAMPS_LOCALE as glocale
from gramps.gen.const import ICON, SPLASH, GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.config import config
from ...pluginmanager import GuiPluginManager
@ -558,12 +558,7 @@ class ExportAssistant(ManagedWindow, Gtk.Assistant):
ix = self.get_selected_format_index()
ext = self.map_exporters[ix].get_extension()
# Suggested folder: try last export, then last import, then home.
default_dir = config.get('paths.recent-export-dir')
if len(default_dir)<=1:
default_dir = config.get('paths.recent-import-dir')
if len(default_dir)<=1:
default_dir = USER_HOME
if ext == 'gramps':
new_filename = os.path.join(default_dir,'data.gramps')

View File

@ -30,6 +30,7 @@ Provide the base classes for GRAMPS' DataView classes
#
#----------------------------------------------------------------
from abc import abstractmethod
import os
import pickle
import time
import logging
@ -1071,6 +1072,8 @@ class ListView(NavigationView):
combobox.set_active(0)
box.show_all()
chooser.set_extra_widget(box)
default_dir = config.get('paths.recent-export-dir')
chooser.set_current_folder(default_dir)
while True:
value = chooser.run()
@ -1083,6 +1086,7 @@ class ListView(NavigationView):
else:
chooser.destroy()
return
config.set('paths.recent-export-dir', os.path.split(fn)[0])
self.write_tabbed_file(fn, fl)
def write_tabbed_file(self, name, type):

View File

@ -1252,9 +1252,12 @@ class FanChartWidget(FanChartBaseWidget):
self.center_xy = self.center_xy_from_delta()
cr.translate(*self.center_xy)
else: # printing
self.center_xy = halfdist, halfdist
if self.form == FORM_QUADRANT:
self.center_xy = self.CENTER + PIXELS_PER_GENERATION, halfdist
else:
self.center_xy = halfdist + PIXELS_PER_GENERATION, halfdist
cr.scale(scale, scale)
cr.translate(halfdist, halfdist)
cr.translate(*self.center_xy)
cr.save()
cr.rotate(math.radians(self.rotate_value))

View File

@ -94,7 +94,7 @@ class FanChartDescWidget(FanChartBaseWidget):
"""
Interactive Fan Chart Widget.
"""
CENTER = 50 # we require a larger center as CENTER includes the 1st partner
CENTER = 60 # we require a larger center as CENTER includes the 1st partner
def __init__(self, dbstate, uistate, callback_popup=None):
"""
@ -152,7 +152,7 @@ class FanChartDescWidget(FanChartBaseWidget):
elif self.form == FORM_HALFCIRCLE:
self.rootangle_rad = [math.radians(90), math.radians(90 + 180)]
elif self.form == FORM_QUADRANT:
self.rootangle_rad = [math.radians(90), math.radians(90 + 90)]
self.rootangle_rad = [math.radians(180), math.radians(270)]
self.handle2desc = {}
self.famhandle2desc = {}
@ -361,12 +361,10 @@ class FanChartDescWidget(FanChartBaseWidget):
"""
Compute the half radius of the circle
"""
radius = PIXELS_PER_GEN_SMALL * N_GEN_SMALL + PIXELS_PER_GEN_LARGE \
* ( self.nrgen() - N_GEN_SMALL ) + self.CENTER
return radius
return self.get_radiusinout_for_generation(self.nrgen())[1]
def get_radiusinout_for_generation(self,generation):
radius_first_gen = self.CENTER - (1-PIXELS_PER_GENPERSON_RATIO) * PIXELS_PER_GEN_SMALL
radius_first_gen = 14 # fudged to make inner circle a bit tighter
if generation < N_GEN_SMALL:
radius_start = PIXELS_PER_GEN_SMALL * generation + radius_first_gen
return (radius_start,radius_start + PIXELS_PER_GEN_SMALL)
@ -435,9 +433,12 @@ class FanChartDescWidget(FanChartBaseWidget):
self.center_xy = self.center_xy_from_delta()
cr.translate(*self.center_xy)
else: # printing
self.center_xy = halfdist, halfdist
if self.form == FORM_QUADRANT:
self.center_xy = self.CENTER, halfdist
else:
self.center_xy = halfdist, halfdist
cr.scale(scale, scale)
cr.translate(halfdist, halfdist)
cr.translate(*self.center_xy)
cr.save()
# Draw center person:

View File

@ -239,6 +239,8 @@ class InteractiveSearchBox:
return
model = self._treeview.get_model()
if not model:
return
selection = self._treeview.get_selection()
# disable flush timeout while searching
if self._entry_flush_timeout:

View File

@ -337,6 +337,20 @@ class HtmlDoc(BaseDoc, TextDoc):
self._empty = 0
self.__write_text(text, mark, links=links)
def write_markup(self, text, s_tags, mark=None):
"""
Overwrite base method
Writes the text in the current paragraph. Should only be used after a
start_paragraph and before an end_paragraph.
@param text: text to write. The text is assumed to be _not_ escaped
@param s_tags: assumed to be list of styledtexttags to apply to the
text
@param mark: IndexMark to use for indexing
"""
markuptext = self._backend.add_markup_from_styled(text, s_tags)
self.__write_text(markuptext, mark=mark, markup=True)
def write_title(self):
"""
Add title field to header

View File

@ -281,7 +281,8 @@ class GedcomWriter(UpdateCallback):
textlines = textlines.replace('\n\r', '\n')
textlines = textlines.replace('\r', '\n')
# Need to double '@' See Gedcom 5.5 spec 'any_char'
if not textlines.startswith('@'): # avoid xrefs
# but avoid xrefs and escapes
if not textlines.startswith('@') and '@#' not in textlines:
textlines = textlines.replace('@', '@@')
textlist = textlines.split('\n')
token_level = level

View File

@ -4,6 +4,7 @@
#
# Copyright (C) 2003-2005 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2018 Robin van der Vliet
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -38,388 +39,240 @@ import gramps.gen.relationship
#
#-------------------------------------------------------------------------
_removed_level = [ " ",
" eerste",
" tweede",
" derde",
" vierde",
" vijfde",
" zesde",
" zevende",
" achtste",
" negende",
" tiende",
" elfde",
" twaalfde",
" dertiende",
" veertiende",
" vijftiende",
" zestiende",
" zeventiende",
" achttiende",
" negentiende",
" twintigste",
" eenentwintigste",
" tweeëntwintigste",
" drieëntwingste",
" vierentwingste",
" vijfentwintigste",
" zesentwintigste",
" zevenentwintigste",
" achtentwintigste",
" negenentwintigste",
" dertigste" ]
_ordinal_level = [ "",
"eerste", "tweede", "derde", "vierde", "vijfde",
"zesde", "zevende", "achtste", "negende", "tiende",
"elfde", "twaalfde", "dertiende", "veertiende", "vijftiende",
"zestiende", "zeventiende", "achttiende", "negentiende", "twintigste",
"eenentwintigste", "tweeëntwintigste", "drieëntwintigste", "vierentwintigste", "vijfentwintigste",
"zesentwintigste", "zevenentwintigste", "achtentwintigste", "negenentwintigste", "dertigste",
"eenendertigste", "tweeëndertigste", "drieëndertigste", "vierendertigste", "vijfendertigste",
"zesendertigste", "zevenendertigste", "achtendertigste", "negenendertigste", "veertigste",
"eenenveertigste", "tweeënveertigste", "drieënveertigste", "vierenveertigste", "vijfenveertigste",
"zesenveertigste", "zevenenveertigste", "achtenveertigste", "negenenveertigste", "vijftigste" ]
_parents_level = [ "",
"ouders",
"grootouders",
"overgrootouders",
"betovergrootouders",
"oudouders",
"oudgrootouders",
"oudovergrootouders",
"oudbetovergrootouders",
"stamouders",
"stamgrootouders", # gen 10
"stamovergrootouders",
"stambetovergrootouders",
"stamoudouders",
"stamoudgrootouders",
"stamoudovergrootouders",
"stamoudbetovergrootouders",
"edelouders",
"edelgrootoders",
"edelovergrootoudouders",
"edelbetovergrootouders", # gen 20
"edeloudouders",
"edeloudgrootouders",
"edeloudvergrootouders",
"edeloudbetovergrootouders",
"edelstamouders",
"edelstamgrootouders",
"edelstamovergrootouders",
"edelstambetovergrootouders",
"edelstamoudouders" ]
_removed_level = [ "", "",
"groot", "overgroot", "betovergroot", "oud", "oudgroot",
"oudovergroot", "oudbetovergroot", "stam", "stamgroot", "stamovergroot",
"stambetovergroot", "stamoud", "stamoudgroot", "stamoudovergroot", "stamoudbetovergroot",
"edel", "edelgroot", "edelovergroot", "edelbetovergroot", "edeloud",
"edeloudgroot", "edeloudovergroot", "edeloudbetovergroot", "edelstam", "edelstamgroot",
"edelstamovergroot", "edelstambetovergroot", "edelstamoud", "edelstamoudgroot", "edelstamoudovergroot",
"edelstamoudbetovergroot", "voor", "voorgroot", "voorovergroot", "voorbetovergroot",
"vooroud", "vooroudgroot", "vooroudovergroot", "vooroudbetovergroot", "voorstam",
"voorstamgroot", "voorstamovergroot", "voorstambetovergroot", "voorstamoud", "voorstamoudgroot",
"voorstamoudovergroot", "voorstamoudbetovergroot", "vooredel" ]
_father_level = [ "",
"%s%svader",
"%s%sgrootvader",
"%s%sovergrootvader",
"%s%sbetovergrootvader",
"%s%soudvader (generatie 5)",
"%s%soudgrootvader (generatie 6)",
"%s%soudovergrootvader (generatie 7)",
"%s%soudbetovergrootvader (generatie 8)",
"%s%sstamvader (generatie 9)",
"%s%sstamgrootvader (generatie 10)",
"%s%sstamovergrootvader (generatie 11)",
"%s%sstambetovergrootvader (generatie 12)",
"%s%sstamoudvader (generatie 13)",
"%s%sstamoudgrootvader (generatie 14)",
"%s%sstamoudovergrootvader (generatie 15)",
"%s%sstamoudbetovergrootvader (generatie 16)",
"%s%sedelvader (generatie 17)",
"%s%sedelgrootvader (generatie 18)",
"%s%sedelovergrootoudvader (generatie 19)",
"%s%sedelbetovergrootvader (generatie 20)",
"%s%sedeloudvader (generatie 21)",
"%s%sedeloudgrootvader (generatie 22)",
"%s%sedeloudvergrootvader (generatie 23)",
"%s%sedeloudbetovergrootvader (generatie 24)",
"%s%sedelstamvader (generatie 25)",
"%s%sedelstamgrootvader (generatie 26)",
"%s%sedelstamovergrootvader (generatie 27)",
"%s%sedelstambetovergrootvader (generatie 28)",
"%s%sedelstamoudvader (generatie 29)" ]
_child_level = [ "", "",
"klein", "achterklein", "achterachterklein" ]
_mother_level = [ "",
"%s%smoeder",
"%s%sgrootmoeder",
"%s%sovergrootmoeder",
"%s%sbetovergrootmoeder",
"%s%soudmoeder (generatie 5)",
"%s%soudgrootmoeder (generatie 6)",
"%s%soudovergrootmoeder (generatie 7)",
"%s%soudbetovergrootmoeder (generatie 8)",
"%s%sstammoeder (generatie 9)",
"%s%sstamgrootmoeder (generatie 10)",
"%s%sstamovergrootmoeder (generatie 11)",
"%s%sstambetovergrootmoeder (generatie 12)",
"%s%sstamoudmoeder (generatie 13)",
"%s%sstamoudgrootmoeder (generatie 14)",
"%s%sstamoudovergrootmoeder (generatie 15)",
"%s%sstamoudbetovergrootmoeder (generatie 16)",
"%s%sedelmoeder (generatie 17)",
"%s%sedelgrootmoeder (generatie 18)",
"%s%sedelovergrootoudmoeder (generatie 19)",
"%s%sedelbetovergrootmoeder (generatie 20)",
"%s%sedeloudmoeder (generatie 21)",
"%s%sedeloudgrootmoeder (generatie 22)",
"%s%sedeloudvergrootmoeder (generatie 23)",
"%s%sedeloudbetovergrootmoeder (generatie 24)",
"%s%sedelstammoeder (generatie 25)",
"%s%sedelstamgrootmoeder (generatie 26)",
"%s%sedelstamovergrootmoeder (generatie 27)",
"%s%sedelstambetovergrootmoeder (generatie 28)",
"%s%sedelstamoudmoeder (generatie 29)" ]
_nibling_level = [ "", "",
"achter", "achterachter", "achterachterachter" ]
_ouder_level = [ "",
"%s%souder ",
"%s%sgrootouder",
"%s%sovergrootouder",
"%s%sbetovergrootouder",
"%s%soudouder (generatie 5)",
"%s%soudgrootouder (generatie 6)",
"%s%soudovergrootouder (generatie 7)",
"%s%soudbetovergrootouder (generatie 8)",
"%s%sstamouder (generatie 9)",
"%s%sstamgrootouder (generatie 10)",
"%s%sstamovergrootouder (generatie 11)",
"%s%sstambetovergrootouder (generatie 12)",
"%s%sstamoudouder (generatie 13)",
"%s%sstamoudgrootouder (generatie 14)",
"%s%sstamoudovergrootouder (generatie 15)",
"%s%sstamoudbetovergrootouder (generatie 16)",
"%s%sedelouder (generatie 17)",
"%s%sedelgrootouder (generatie 18)",
"%s%sedelovergrootoudouder (generatie 19)",
"%s%sedelbetovergrootouder (generatie 20)",
"%s%sedeloudouder (generatie 21)",
"%s%sedeloudgrootouder (generatie 22)",
"%s%sedeloudvergrootouder (generatie 23)",
"%s%sedeloudbetovergrootouder (generatie 24)",
"%s%sedelstamouder (generatie 25)",
"%s%sedelstamgrootouder (generatie 26)",
"%s%sedelstamovergrootouder (generatie 27)",
"%s%sedelstambetovergrootouder (generatie 28)",
"%s%sedelstamoudouder (generatie 29)" ]
_son_level = [ "",
"%s%szoon",
"%s%skleinzoon",
"%s%sachterkleinzoon",
"%s%sachterachterkleinzoon",
"%s%sachterachterachterkleinzoon"]
_daughter_level = [ "",
"%s%sdochter",
"%s%skleindochter",
"%s%sachterkleindochter",
"%s%sachterachterkleindochter",
"%s%sachterachterachterkleindochter"]
_kind_level = [ "",
"%s%skind",
"%s%skleinkind",
"%s%sachterkleinkind",
"%s%sachterachterkleinkind",
"%s%sachterachterachterkleinkind"]
_nephew_level = [ "",
"%s%sneef",
"%s%sachterneef",
"%s%sachterachterneef" ]
_niece_level = [ "",
"%s%snicht",
"%s%sachternicht",
"%s%sachterachternicht"]
_aunt_level = [ "",
"%s%stante",
"%s%sgroottante",
"%s%sovergroottante",
"%s%sbetovergroottante",
"%s%soudtante"]
_uncle_level = [ "",
"%s%soom",
"%s%sgrootoom",
"%s%sovergrootoom",
"%s%sbetovergrootoom",
"%s%soudoom"]
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
"""
RelationshipCalculator Class
"""
#sibling strings
STEP = 'stief'
HALF = 'half'
STEP = "stief"
HALF = "half"
INLAW = 'aangetrouwde '
INLAW = "aangetrouwde "
def __init__(self):
gramps.gen.relationship.RelationshipCalculator.__init__(self)
def get_parents(self, level):
if level > len(_parents_level)-1:
if level > len(_removed_level)-1:
return "verre voorouders (%d generaties)" % level
elif level > 4:
return "%souders (%d generaties)" % (_removed_level[level], level)
else:
return _parents_level[level]
return "%souders" % _removed_level[level]
def _get_father(self, level, step='', inlaw=''):
def _get_father(self, level, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if level > len(_father_level)-1:
if level > len(_removed_level)-1:
return "verre %s%svoorvader (%d generaties)" % (inlaw, step, level)
elif level > 4:
return "%s%s%svader (%d generaties)" % (inlaw, step, _removed_level[level], level)
else:
return _father_level[level] % (inlaw, step)
return "%s%s%svader" % (inlaw, step, _removed_level[level])
def _get_son(self, level, step='', inlaw=''):
def _get_son(self, level, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if level < len(_son_level):
return _son_level[level] % (inlaw, step)
if level > len(_child_level)-1:
return "verre %s%sachterkleinzoon (%d generaties)" % (inlaw, step, level)
else:
return "verre %s%sachterkleinzoon (%d generaties)" % (inlaw,
step, level)
return "%s%s%szoon" % (inlaw, step, _child_level[level])
def _get_mother(self, level, step='', inlaw=''):
def _get_mother(self, level, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if level > len(_mother_level)-1:
return "verre %s%svoormoeder (%d generaties)" % (inlaw, step, level)
if level > len(_removed_level)-1:
return "verre %s%svoormoeder (%d generaties)" % (inlaw, step, level)
elif level > 4:
return "%s%s%smoeder (%d generaties)" % (inlaw, step, _removed_level[level], level)
else:
return _mother_level[level] % (inlaw, step)
return "%s%s%smoeder" % (inlaw, step, _removed_level[level])
def _get_daughter(self, level, step='', inlaw=''):
def _get_daughter(self, level, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if level > len(_daughter_level)-1:
return "verre %s%sachterkleindochter (%d generaties)" % (inlaw,
step, level)
if level > len(_child_level)-1:
return "verre %s%sachterkleindochter (%d generaties)" % (inlaw, step, level)
else:
return _daughter_level[level] % (inlaw, step)
return "%s%s%sdochter" % (inlaw, step, _child_level[level])
def _get_parent_unknown(self, level, step='', inlaw=''):
def _get_parent_unknown(self, level, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if level > len(_ouder_level)-1:
return "verre %s%svoorouder (%d generaties)" % (inlaw, step, level)
elif level == 1:
return _mother_level[level] % (inlaw, step) + ' of ' + \
_father_level[level] % (inlaw, step)
if level > len(_removed_level)-1:
return "verre %s%svoorouder (%d generaties)" % (inlaw, step, level)
elif level > 4:
return "%s%s%souder (%d generaties)" % (inlaw, step, _removed_level[level], level)
else:
return _ouder_level[level] % (inlaw, step)
return "%s%s%souder" % (inlaw, step, _removed_level[level])
def _get_child_unknown(self, level, step='', inlaw=''):
def _get_child_unknown(self, level, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if level > len(_kind_level)-1:
return "ver %s%sachterkleinkind (%d generaties)" % (inlaw, step,
level)
else:
return _kind_level[level] % (inlaw, step)
if inlaw == "aangetrouwde ":
#The word "kind" is grammatically neuter, so it has a different adjective.
inlaw = "aangetrouwd "
def _get_aunt(self, level, removed, step='', inlaw=''):
if level > len(_child_level)-1:
return "ver %s%sachterkleinkind (%d generaties)" % (inlaw, step, level)
else:
return "%s%s%skind" % (inlaw, step, _child_level[level])
def _get_aunt(self, level, removed, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if removed == 1 and level < len(_aunt_level):
return _aunt_level[level] % (inlaw, step)
if removed == 1 and level < len(_removed_level):
if level > 4:
return "%s%s%stante (%d generaties)" % (inlaw, step, _removed_level[level], level)
else:
return "%s%s%stante" % (inlaw, step, _removed_level[level])
elif removed == 1:
return "verre %s%stante (%d generaties)" % (inlaw, step, level)
elif level > len(_aunt_level)-1 and removed > len(_removed_level) -1:
elif level > len(_removed_level)-1 and removed > len(_ordinal_level)-1:
return "verre %s%stante (%d generaties, %d graden)" % (inlaw, step,
level, removed)
elif level > len(_aunt_level)-1:
return "verre %s%stante van de%s graad (%d generaties)" % (inlaw,
step, _removed_level[removed], level)
elif level > len(_removed_level)-1:
return "verre %s%stante van de %s graad (%d generaties)" % (inlaw,
step, _ordinal_level[removed], level)
else:
return _aunt_level[level] % (inlaw, step) \
+ _removed_level[removed] + " graad"
if level > 4:
return "%s%s%stante (%d generaties)" % (inlaw, step, _removed_level[level], level) \
+ " " + _ordinal_level[removed] + " graad"
else:
return "%s%s%stante" % (inlaw, step, _removed_level[level]) \
+ " " + _ordinal_level[removed] + " graad"
def _get_uncle(self, level, removed, step='', inlaw=''):
def _get_uncle(self, level, removed, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if removed == 1 and level < len(_uncle_level):
return _uncle_level[level] % (inlaw, step)
if removed == 1 and level < len(_removed_level):
if level > 4:
return "%s%s%soom (%d generaties)" % (inlaw, step, _removed_level[level], level)
else:
return "%s%s%soom" % (inlaw, step, _removed_level[level])
elif removed == 1:
return "verre %s%soom (%d generaties)" % (inlaw, step, level)
elif level > len(_uncle_level)-1 and removed > len(_removed_level) -1:
elif level > len(_removed_level)-1 and removed > len(_ordinal_level)-1:
return "verre %s%soom (%d generaties, %d graden)" % (inlaw, step,
level, removed)
elif level > len(_uncle_level)-1:
return "verre %s%soom van de%s graad (%d generaties)" % (inlaw,
step, _removed_level[removed], level)
elif level > len(_removed_level)-1:
return "verre %s%soom van de %s graad (%d generaties)" % (inlaw,
step, _ordinal_level[removed], level)
else:
return _uncle_level[level] % (inlaw, step) \
+ _removed_level[removed] + " graad"
if level > 4:
return "%s%s%soom (%d generaties)" % (inlaw, step, _removed_level[level], level) \
+ " " + _ordinal_level[removed] + " graad"
else:
return "%s%s%soom" % (inlaw, step, _removed_level[level]) \
+ " " + _ordinal_level[removed] + " graad"
def _get_sibling(self, level, step='', inlaw=''):
def _get_sibling(self, level, step="", inlaw=""):
"""overwrite of English method to return unknown gender sibling
"""
assert(level == 1)
return self._get_male_cousin(0, step=step, inlaw=inlaw) + ' of ' \
return self._get_male_cousin(0, step=step, inlaw=inlaw) + " of " \
+ self._get_female_cousin(0, step=step, inlaw=inlaw)
def _get_nephew(self, level, removed=1, step='', inlaw=''):
def _get_nephew(self, level, removed=1, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if removed == 1 and level < len(_nephew_level):
return _nephew_level[level] % (inlaw, step)
if removed == 1 and level < len(_nibling_level):
return "%s%s%sneef" % (inlaw, step, _nibling_level[level])
elif removed == 1:
return "verre %s%sneef (%d generaties)" % (inlaw, step, level)
elif level > len(_nephew_level)-1 and removed > len(_removed_level) -1:
elif level > len(_nibling_level)-1 and removed > len(_ordinal_level) -1:
return "verre %s%sneef (%d generaties, %d graden)" % (inlaw, step,
level, removed)
elif level > len(_nephew_level)-1:
return "verre %s%sneef van de%s graad (%d generaties)" % (inlaw, step,
_removed_level[removed], level)
elif level > len(_nibling_level)-1:
return "verre %s%sneef van de %s graad (%d generaties)" % (inlaw, step,
_ordinal_level[removed], level)
else:
return _nephew_level[level] % (inlaw, step) \
+ _removed_level[removed] + " graad"
return "%s%s%sneef" % (inlaw, step, _nibling_level[level]) \
+ " " + _ordinal_level[removed] + " graad"
def _get_niece(self, level, removed=1, step='', inlaw=''):
def _get_niece(self, level, removed=1, step="", inlaw=""):
"""Internal Dutch method to create relation string
"""
if removed == 1 and level < len(_niece_level):
return _niece_level[level] % (inlaw, step)
if removed == 1 and level < len(_nibling_level):
return "%s%s%snicht" % (inlaw, step, _nibling_level[level])
elif removed == 1:
return "verre %s%snicht (%d generaties)" % (inlaw, step, level)
elif level > len(_niece_level)-1 and removed > len(_removed_level) -1:
elif level > len(_nibling_level)-1 and removed > len(_ordinal_level) -1:
return "verre %s%snicht (%d generaties, %d graden)" % (inlaw, step,
level, removed)
elif level > len(_niece_level)-1:
return "verre %s%snicht van de%s graad (%d generaties)"% (inlaw,
step, _removed_level[removed], level)
elif level > len(_nibling_level)-1:
return "verre %s%snicht van de %s graad (%d generaties)" % (inlaw, step,
_ordinal_level[removed], level)
else:
return _niece_level[level] % (inlaw, step) \
+ _removed_level[removed] + " graad"
return "%s%s%snicht" % (inlaw, step, _nibling_level[level]) \
+ " " + _ordinal_level[removed] + " graad"
def _get_male_cousin(self, removed, step='', inlaw=''):
def _get_male_cousin(self, removed, step="", inlaw=""):
"""Specific Dutch thing, the nieces/nephews on same level are called
going sideways in a branch as the nieces/newphews going downward
from your brother/sisters. This used to be called "kozijn"
"""
removed -= 1
if removed > len(_removed_level)-1:
if removed > len(_ordinal_level)-1:
return "verre %s%sneef (kozijn, %d graden)" % (inlaw, step,
removed)
elif removed == 0:
return "%s%sbroer" % (inlaw, step)
else:
return "%s%sneef (kozijn)" % (inlaw, step) \
+_removed_level[removed] + " graad"
return "%s%sneef (kozijn)" % (inlaw, step) \
+ " " + _ordinal_level[removed] + " graad"
def _get_female_cousin(self, removed, step='', inlaw=''):
def _get_female_cousin(self, removed, step="", inlaw=""):
"""Specific Dutch thing, the nieces/nephews on same level are called
going sideways in a branch as the nieces/newphews going downward
from your brother/sisters. This used to be called "kozijn"
from your brother/sisters. This used to be called "kozijn"
"""
removed -= 1
if removed > len(_removed_level)-1:
if removed > len(_ordinal_level)-1:
return "verre %s%snicht (kozijn, %d graden)" % (inlaw, step,
removed)
elif removed == 0:
return "%s%szus" % (inlaw, step)
return "%s%szus" % (inlaw, step)
else:
return "%s%snicht (kozijn)" % (inlaw, step) \
+ _removed_level[removed] + " graad"
return "%s%snicht (kozijn)" % (inlaw, step) \
+ " " + _ordinal_level[removed] + " graad"
def get_single_relationship_string(self, Ga, Gb, gender_a, gender_b,
reltocommon_a, reltocommon_b,
@ -430,28 +283,28 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
see english method, eg b is father of a
"""
if only_birth:
step = ''
step = ""
else:
step = self.STEP
if in_law_a or in_law_b :
inlaw = self.INLAW
else:
inlaw = ''
inlaw = ""
rel_str = "verre %s%sfamilie" % (inlaw, step)
if Gb == 0:
#b is ancestor
if Ga == 0:
rel_str = 'zelfde persoon'
rel_str = "zelfde persoon"
elif Ga == 1 and inlaw and not step:
if gender_b == Person.MALE:
rel_str = 'schoonvader'
rel_str = "schoonvader"
elif gender_b == Person.FEMALE:
rel_str = 'schoonmoeder'
rel_str = "schoonmoeder"
else:
rel_str = 'schoonouder'
rel_str = "schoonouder"
elif gender_b == Person.MALE:
rel_str = self._get_father(Ga, step, inlaw)
elif gender_b == Person.FEMALE:
@ -462,19 +315,19 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
#a is descendant
if Gb == 1 and inlaw and not step:
if gender_b == Person.MALE:
rel_str = 'schoonzoon'
rel_str = "schoonzoon"
elif gender_b == Person.FEMALE:
rel_str = 'schoondochter'
rel_str = "schoondochter"
else:
rel_str = 'schoonzoon of -dochter'
rel_str = "schoonkind"
elif Gb == 1 and inlaw and step:
#inlaw stepchild
if gender_b == Person.MALE:
rel_str = 'aangetrouwde stiefzoon'
rel_str = "aangetrouwde stiefzoon"
elif gender_b == Person.FEMALE:
rel_str = 'aangetrouwde stiefdochter'
rel_str = "aangetrouwde stiefdochter"
else:
rel_str = 'aangetrouwde stiefzoon of dochter'
rel_str = "aangetrouwd stiefkind"
elif gender_b == Person.MALE:
rel_str = self._get_son(Gb, step, inlaw)
elif gender_b == Person.FEMALE:
@ -483,24 +336,33 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
rel_str = self._get_child_unknown(Gb, step, inlaw)
elif Ga > Gb:
#b is higher in the branch, in english uncle/aunt or
#cousin up, in dutch always 'oom/tante'
#cousin up, in Dutch always 'oom/tante'
if gender_b == Person.MALE:
rel_str = self._get_uncle(Ga - Gb, Gb, step, inlaw)
else:
elif gender_b == Person.FEMALE:
rel_str = self._get_aunt(Ga - Gb, Gb, step, inlaw)
else:
rel_str = self._get_uncle(Ga - Gb, Gb, step, inlaw) + " of " \
+ self._get_aunt(Ga - Gb, Gb, step, inlaw)
elif Ga < Gb:
#b is lower in the branch, in english niece/nephew or
#cousin down, in dutch always 'neef/nicht'
#cousin down, in Dutch always 'neef/nicht'
if gender_b == Person.MALE:
rel_str = self._get_nephew(Gb - Ga, Ga, step, inlaw)
else:
elif gender_b == Person.FEMALE:
rel_str = self._get_niece(Gb - Ga, Ga, step, inlaw)
else:
rel_str = self._get_nephew(Gb - Ga, Ga, step, inlaw) + " of " \
+ self._get_niece(Gb - Ga, Ga, step, inlaw)
else:
# people on the same level Ga == Gb
if gender_b == Person.MALE:
rel_str = self._get_male_cousin(Ga, step, inlaw)
else:
elif gender_b == Person.FEMALE:
rel_str = self._get_female_cousin(Ga, step, inlaw)
else:
rel_str = self._get_male_cousin(Ga, step, inlaw) + " of " \
+ self._get_female_cousin(Ga, step, inlaw)
return rel_str
@ -519,7 +381,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
get_sibling)
"""
if sib_type == self.NORM_SIB or sib_type == self.UNKNOWN_SIB:
typestr = ''
typestr = ""
elif sib_type == self.HALF_SIB_FATHER \
or sib_type == self.HALF_SIB_MOTHER:
typestr = self.HALF
@ -529,20 +391,23 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
if in_law_a or in_law_b :
inlaw = self.INLAW
else:
inlaw = ''
inlaw = ""
if inlaw and not typestr:
if gender_b == Person.MALE:
rel_str = 'schoonbroer'
rel_str = "schoonbroer"
elif gender_b == Person.FEMALE:
rel_str = 'schoonzus'
rel_str = "schoonzus"
else:
rel_str = 'schoonzus/broer'
rel_str = "schoonbroer of -zus"
else:
if gender_b == Person.MALE:
rel_str = self._get_male_cousin(1, typestr, inlaw)
else:
elif gender_b == Person.FEMALE:
rel_str = self._get_female_cousin(1, typestr, inlaw)
else:
rel_str = self._get_male_cousin(1, typestr, inlaw) + " of " \
+ self._get_female_cousin(1, typestr, inlaw)
return rel_str

View File

@ -484,7 +484,7 @@ class DetAncestorReport(Report):
if self.inc_attrs:
text = ""
attr_list = event.get_attribute_list()
attr_list = event.get_attribute_list()[:] # we don't want to modify cached original
attr_list.extend(event_ref.get_attribute_list())
for attr in attr_list:
if text:
@ -504,7 +504,7 @@ class DetAncestorReport(Report):
if self.includenotes:
# if the event or event reference has a note attached to it,
# get the text and format it correctly
notelist = event.get_note_list()
notelist = event.get_note_list()[:] # we don't want to modify cached original
notelist.extend(event_ref.get_note_list())
for notehandle in notelist:
note = self._db.get_note_from_handle(notehandle)

View File

@ -509,7 +509,7 @@ class DetDescendantReport(Report):
if self.inc_attrs:
text = ""
attr_list = event.get_attribute_list()
attr_list = event.get_attribute_list()[:] # we don't want to modify cached original
attr_list.extend(event_ref.get_attribute_list())
for attr in attr_list:
if text:
@ -529,7 +529,7 @@ class DetDescendantReport(Report):
if self.inc_notes:
# if the event or event reference has a note attached to it,
# get the text and format it correctly
notelist = event.get_note_list()
notelist = event.get_note_list()[:] # we don't want to modify cached original
notelist.extend(event_ref.get_note_list())
for notehandle in notelist:
note = self._db.get_note_from_handle(notehandle)

View File

@ -256,7 +256,7 @@ class IndivCompleteReport(Report):
def write_note(self):
""" write a note """
notelist = self.person.get_note_list()
notelist = self.person.get_note_list()[:] # we don't want to modify cached original
notelist += self.family_notes_list
if self.names_notes_list:
for note_handle in self.names_notes_list:

View File

@ -679,13 +679,13 @@ class BasePage: # pylint: disable=C1001
trow += Html("td", srcrefs, class_="ColumnSources", rowspan=2)
# get event notes
notelist = event.get_note_list()
notelist = event.get_note_list()[:] # we don't want to modify cached original
notelist.extend(event_ref.get_note_list())
htmllist = self.dump_notes(notelist)
# if the event or event reference has an attribute attached to it,
# get the text and format it correctly?
attrlist = event.get_attribute_list()
attrlist = event.get_attribute_list()[:] # we don't want to modify cached original
attrlist.extend(event_ref.get_attribute_list())
for attr in attrlist:
htmllist.extend(Html("p",

View File

@ -21,6 +21,7 @@
# Frederic Chateaux, 2007-2008.
# Jérôme Rapinat <romjerome@yahoo.fr>, 2005-2017.
# Mathieu MD <mathieu.md@gmail.com>, 2012.
# Christophe <khrys63@gmail.com>, 2018.
msgid ""
msgstr ""
"Project-Id-Version: 5.0.0\n"
@ -15416,7 +15417,7 @@ msgid ""
msgstr ""
"Interprète le contenu des champs comme des expressions rationnelles.\n"
"Un point décimal va correspondre à un caractère quelconque. Un point "
"d'intérogation va correspondre à une ou aucune valeur pour le précédent "
"d'interrogation va correspondre à une ou aucune valeur pour le précédent "
"caractère ou groupe. L'astérisque va correspondre à aucune ou plusieurs "
"occurences. Un signe + va correspondre à une valeur ou plus. Utilisez les "
"parenthèses pour grouper les expressions. Spécifiez les alternatives en "
@ -23185,7 +23186,7 @@ msgstr "L'exportation Gedcom a échoué"
#: ../gramps/plugins/export/exportgeneweb.py:96
msgid "No families matched by selected filter"
msgstr "Aucune famille ne correspondent au filtre sélectionné"
msgstr "Aucune famille ne correspond au filtre sélectionné"
#: ../gramps/plugins/export/exportpkg.py:185
#: ../gramps/plugins/export/exportxml.py:139
@ -33980,7 +33981,7 @@ msgstr "Analyse des événements"
#: ../gramps/plugins/tool/changetypes.py:134
msgid "No event record was modified."
msgstr "Aucun événement a été modifié."
msgstr "Aucun événement n'a été modifié."
# trunk
#. translators: leave all/any {...} untranslated
@ -34739,7 +34740,7 @@ msgstr "Modifications réalisées"
#: ../gramps/plugins/tool/eventnames.py:127
msgid "No event description has been added."
msgstr "Aucune description de l'événement a été ajoutée."
msgstr "Aucune description de l'événement n'a été ajoutée."
# trunk
# utilise correspondre pour to match, plus facile que être compatible ou concorder dans ce contexte