GEP 18: merge trunk changes in gep branch

svn: r22603
This commit is contained in:
Benny Malengier 2013-06-25 10:45:43 +00:00
commit 0d3aec7313
98 changed files with 2114 additions and 4814 deletions

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -8,7 +8,7 @@
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Doug Blank
# Copyright (C) 2012 Paul Franklin
# Copyright (C) 2012-2013 Paul Franklin
#
# 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
@ -286,23 +286,20 @@ class ArgHandler(object):
self.__error(_("WARNING: Output file already exists!\n"
"WARNING: It will be overwritten:\n %s") %
fullpath)
answer = None
while not answer:
try:
if sys.version_info[0] < 3:
ask = raw_input
else:
ask = input
ans = ask(_('OK to overwrite? (yes/no) '))
except EOFError:
print()
sys.exit(0)
if ans.upper() in ('Y', 'YES', _('YES').upper()):
self.__error(_("Will overwrite the existing file: %s")
% fullpath)
answer = "ok"
try:
if sys.version_info[0] < 3:
ask = raw_input
else:
sys.exit(0)
ask = input
answer = ask(_('OK to overwrite? (yes/no) '))
except EOFError:
print()
sys.exit(0)
if answer.upper() in ('Y', 'YES', _('YES').upper()):
self.__error(_("Will overwrite the existing file: %s")
% fullpath)
else:
sys.exit(0)
if family_tree_format is None:
# Guess the file format based on the file extension.

View File

@ -422,7 +422,7 @@ class CommandLineReport(object):
self.options_help[name].append(option.get_help())
else:
print(_("Unknown option: %s") % option, file=sys.stderr)
print(_(" Valid options are:"),
print(_(" Valid options are:") +
", ".join(list(self.options_dict.keys())),
file=sys.stderr)
print(_(" Use '%(donottranslate)s' to see description "

View File

@ -160,8 +160,6 @@ RULE_GLADE = os.path.join(GLADE_DIR, "rule.glade")
PLUGINS_DIR = os.path.join(ROOT_DIR, "plugins")
WEB_DIR = os.path.join(ROOT_DIR, 'webapp')
WEBSTUFF_DIR = os.path.join(PLUGINS_DIR, "webstuff")
WEBSTUFF_IMAGE_DIR = os.path.join(WEBSTUFF_DIR, "images")
USE_TIPS = False

View File

@ -58,6 +58,7 @@ from . import _date_sk
from . import _date_sl
from . import _date_sr
from . import _date_sv
from . import _date_uk
# Initialize global parser
try:

View File

@ -900,9 +900,9 @@ class RelationshipCalculator(object):
if depth > self.__max_depth:
self.__maxDepthReached = True
#print 'Maximum ancestor generations ('+str(depth)+') reached', \
#print('Maximum ancestor generations ('+str(depth)+') reached', \
# '(' + rel_str + ').',\
# 'Stopping relation algorithm.'
# 'Stopping relation algorithm.')
return
depth += 1
@ -1840,7 +1840,7 @@ def get_relationship_calculator(reinit=False, clocale=glocale):
#
#-------------------------------------------------------------------------
def _test(rc, onlybirth, inlawa, inlawb, printrelstr):
def _test(rc, onlybirth, inlawa, inlawb, printrelstr, testNum = None):
""" this is a generic test suite for the singular relationship
TRANSLATORS: do NOT translate, use __main__ !
"""
@ -1852,7 +1852,7 @@ def _test(rc, onlybirth, inlawa, inlawb, printrelstr):
return 'f'
else:
return 'm'
def _rand_relstr(len, endstr):
if len == 0:
return ''
@ -1861,295 +1861,337 @@ def _test(rc, onlybirth, inlawa, inlawb, printrelstr):
for i in range(len-1):
relstr += _rand_f_m()
return relstr + endstr
FMT = '%+50s'
MAX = 30
#rc = RelationshipCalculator()
print('\ntesting sons (Enter to start)\n')
sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(0, i,
MALE,
MALE,
'', relstr,
only_birth=onlybirth,
in_law_a=inlawa,
in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting daughters\n')
sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(0, i,
MALE,
FEMALE,
'', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting unknown children\n')
sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(0, i,
MALE,
UNKNOWN,
'', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting grandfathers\n')
sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 0,
FEMALE,
MALE,
relstr, '',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
if testNum == None:
print("""
Select a test:
0 - all tests
1 - testing sons
2 - testing daughters
3 - testing unknown children
4 - testing grandfathers
5 - testing grandmothers
6 - testing unknown parents
7 - testing nieces
8 - testing nephews
9 - testing unknown nephews/nieces
10 - testing uncles
11 - testing aunts
12 - testing unknown uncles/aunts
13 - testing male cousins same generation
14 - testing female cousins same generation
15 - testing unknown cousins same generation
16 - testing some cousins up
17 - testing some cousins down
Please enter a test number and press Enter for continue:
""")
testNum = sys.stdin.readline().strip()
testNum = int(testNum)
if testNum == 0 or testNum == 1:
print('\ntesting sons')
#sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(0, i,
MALE,
MALE,
'', relstr,
only_birth=onlybirth,
in_law_a=inlawa,
in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting grandmothers\n')
sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, 0,
FEMALE,
FEMALE,
relstr, '',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
else:
print(rel)
if testNum == 0 or testNum == 2:
print('\ntesting daughters\n')
#sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(0, i,
MALE,
FEMALE,
'', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting unknown parents\n')
sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 0,
FEMALE,
UNKNOWN,
relstr, '',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
else:
print(rel)
if testNum == 0 or testNum == 3:
print('\ntesting unknown children\n')
#sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(0, i,
MALE,
UNKNOWN,
'', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting nieces\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(1, i,
FEMALE,
FEMALE,
'm', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting nephews\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(1, i,
FEMALE,
MALE,
'f', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting unknown nephews/nieces\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(1, i,
FEMALE,
UNKNOWN,
'f', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting uncles\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 1,
FEMALE,
MALE,
relstr, 'f',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting aunts\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 1,
MALE,
FEMALE,
relstr, 'f',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting unknown uncles/aunts\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, 1,
MALE,
UNKNOWN,
relstr, 'm',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
print('\n\ntesting male cousins same generation\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstra = _rand_relstr(i,'f')
relstrb = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, i,
MALE,
MALE,
relstra,
relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
print('\n\ntesting female cousins same generation\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstra = _rand_relstr(i,'m')
relstrb = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, i,
MALE,
FEMALE,
relstra,
relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
print('\n\ntesting unknown cousins same generation\n')
sys.stdin.readline()
for i in range(1, MAX) :
relstra = _rand_relstr(i,'m')
relstrb = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, i,
MALE,
UNKNOWN,
relstra,
relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
print('\n\ntesting some cousins up\n')
sys.stdin.readline()
import random
random.seed()
for i in range(1, MAX) :
for j in range (i, MAX) :
rnd = random.randint(0, 100)
if rnd < 10 :
relstra = _rand_relstr(j,'f')
relstrb = _rand_relstr(i,'f')
if rnd < 5 :
rel = (FMT + ' |info: female, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(j, i,
MALE,
FEMALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), j, i )
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
if testNum == 0 or testNum == 4:
print('\ntesting grandfathers\n')
#sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 0,
FEMALE,
MALE,
relstr, '',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 5:
print('\ntesting grandmothers\n')
#sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, 0,
FEMALE,
FEMALE,
relstr, '',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 6:
print('\ntesting unknown parents\n')
#sys.stdin.readline()
for i in range(MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 0,
FEMALE,
UNKNOWN,
relstr, '',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 7:
print('\ntesting nieces\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(1, i,
FEMALE,
FEMALE,
'm', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 8:
print('\ntesting nephews\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(1, i,
FEMALE,
MALE,
'f', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 9:
print('\ntesting unknown nephews/nieces\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(1, i,
FEMALE,
UNKNOWN,
'f', relstr,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 10:
print('\ntesting uncles\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 1,
FEMALE,
MALE,
relstr, 'f',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 11:
print('\ntesting aunts\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, 1,
MALE,
FEMALE,
relstr, 'f',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 12:
print('\ntesting unknown uncles/aunts\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstr = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, 1,
MALE,
UNKNOWN,
relstr, 'm',
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
if testNum == 0 or testNum == 13:
print('\ntesting male cousins same generation\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstra = _rand_relstr(i,'f')
relstrb = _rand_relstr(i,'f')
rel = FMT % rc.get_single_relationship_string(i, i,
MALE,
MALE,
relstra,
relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
if testNum == 0 or testNum == 14:
print('\ntesting female cousins same generation\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstra = _rand_relstr(i,'m')
relstrb = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, i,
MALE,
FEMALE,
relstra,
relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
if testNum == 0 or testNum == 15:
print('\ntesting unknown cousins same generation\n')
#sys.stdin.readline()
for i in range(1, MAX) :
relstra = _rand_relstr(i,'m')
relstrb = _rand_relstr(i,'m')
rel = FMT % rc.get_single_relationship_string(i, i,
MALE,
UNKNOWN,
relstra,
relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
if testNum == 0 or testNum == 16:
print('\ntesting some cousins up\n')
#sys.stdin.readline()
import random
random.seed()
for i in range(1, MAX) :
for j in range (i, MAX) :
rnd = random.randint(0, 100)
if rnd < 10 :
relstra = _rand_relstr(j,'f')
relstrb = _rand_relstr(i,'f')
if rnd < 5 :
rel = (FMT + ' |info: female, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(j, i,
MALE,
FEMALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), j, i )
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
else:
print(rel)
else:
rel = (FMT + ' |info: male, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(j, i,
MALE,
MALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), j, i )
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
rel = (FMT + ' |info: male, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(j, i,
MALE,
MALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), j, i )
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
if testNum == 0 or testNum == 17:
print('\ntesting some cousins down\n')
#sys.stdin.readline()
for i in range(1, MAX) :
for j in range (i, MAX) :
rnd = random.randint(0, 100)
if rnd < 10 :
relstra = _rand_relstr(i,'f')
relstrb = _rand_relstr(j,'f')
if rnd < 5 :
rel = (FMT + ' |info: female, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(i, j,
MALE,
FEMALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), i, j)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
else:
print(rel)
print('\n\ntesting some cousins down\n')
sys.stdin.readline()
for i in range(1, MAX) :
for j in range (i, MAX) :
rnd = random.randint(0, 100)
if rnd < 10 :
relstra = _rand_relstr(i,'f')
relstrb = _rand_relstr(j,'f')
if rnd < 5 :
rel = (FMT + ' |info: female, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(i, j,
MALE,
FEMALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), i, j)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
else:
rel = (FMT + ' |info: male, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(i, j,
MALE,
MALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), i, j)
if printrelstr :
print(rel + ' |info:', relstr)
else:
print(rel)
rel = (FMT + ' |info: male, Ga=%2d, Gb=%2d') % (
rc.get_single_relationship_string(i, j,
MALE,
MALE,
relstra, relstrb,
only_birth=onlybirth,
in_law_a=inlawa, in_law_b=inlawb), i, j)
if printrelstr :
print(rel + ' |info:', relstra, relstrb)
else:
print(rel)
def _testsibling(rc):
vals = [(rc.NORM_SIB, 'sibling'),
@ -2186,35 +2228,57 @@ def _test_spouse(rc):
def test(rc, printrelstr):
""" this is a generic test suite for the singular relationship
TRANSLATORS: do NOT translate, call this from
TRANSLATORS: do NOT translate, call this from
__main__ in the rel_xx.py module.
"""
import sys
print('\nType y to do a test\n\n')
print('Test normal relations?')
data = sys.stdin.readline()
if data == 'y\n':
_test(rc, True, False, False, printrelstr)
print('\n\nTest step relations?')
data = sys.stdin.readline()
if data == 'y\n':
_test(rc, False, False, False, printrelstr)
print('\n\nTest in-law relations (first pers)?')
data = sys.stdin.readline()
if data == 'y\n':
_test(rc, True, True, False, printrelstr)
print('\n\nTest step and in-law relations?')
data = sys.stdin.readline()
if data == 'y\n':
_test(rc, False, True, False, printrelstr)
print('\n\nTest sibling types?')
data = sys.stdin.readline()
if data == 'y\n':
import argparse
parser = argparse.ArgumentParser(description='Test the Relationship Calculator')
parser.add_argument('-r', type=int, help = 'type of the relations test')
parser.add_argument('-s', type=int, help = 'type of the singular relationship test')
args = parser.parse_args()
testNum = args.r
if testNum == None:
print("""
Select a test:
0 - all tests
1 - Test normal relations
2 - Test step relations
3 - Test in-law relations (first pers)
4 - Test step and in-law relations
5 - Test sibling types
6 - Test partner types
Please enter a test number and press Enter for continue:
""")
testNum = sys.stdin.readline().strip()
testNum = int(testNum)
if testNum == 0 or testNum == 1:
print('\n\n=== Test normal relations ===')
_test(rc, True, False, False, printrelstr, args.s)
if testNum == 0 or testNum == 2:
print('\n\n=== Test step relations ===')
_test(rc, False, False, False, printrelstr, args.s)
if testNum == 0 or testNum == 3:
print('\n\n=== Test in-law relations (first pers) ===')
_test(rc, True, True, False, printrelstr, args.s)
if testNum == 0 or testNum == 4:
print('\n\n=== Test step and in-law relations ===')
_test(rc, False, True, False, printrelstr, args.s)
if testNum == 0 or testNum == 5:
print('\n\n=== Test sibling types ===')
_testsibling(rc)
print('\n\nTest partner types?')
data = sys.stdin.readline()
if data == 'y\n':
if testNum == 0 or testNum == 6:
print('\n\n=== Test partner types ===')
_test_spouse(rc)
if __name__ == "__main__":

View File

@ -601,6 +601,7 @@ class GrampsLocale(object):
_ = self.translation.gettext
if not self._lang_map:
self._lang_map = {
"ar" : _("Arabic"),
"bg" : _("Bulgarian"),
"ca" : _("Catalan"),
"cs" : _("Czech"),

87
gramps/gui/utilscairo.py Normal file
View File

@ -0,0 +1,87 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch
# Copyright (C) 2009 Douglas S. Blank
# Copyright (C) 2012 Benny Malengier
# Copyright (C) 2013 Vassilii Khachaturov
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
from __future__ import division
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
#from gi.repository import Pango
#from gi.repository import GObject
#from gi.repository import Gdk
#from gi.repository import Gtk
#from gi.repository import PangoCairo
import cairo
#import math
#import colorsys
#import sys
#if sys.version_info[0] < 3:
# import cPickle as pickle
#else:
# import pickle
#-------------------------------------------------------------------------
#
# Functions
#
#-------------------------------------------------------------------------
def warpPath(ctx, function):
"""Transform a path given a 2D transformation function.
ctx -- a cairo.Context, on which the path is set
function -- a 2D transform (x,y) |-> (x_new,y_new)
The transformed path replaces the original one on the context.
Taken from /usr/share/doc/python-cairo/examples/warpedtext.py
According to /usr/share/doc/python-cairo/copyright, licensed
under MOZILLA PUBLIC LICENSE 1.1, see that file for more detail.
"""
first = True
for type, points in ctx.copy_path():
if type == cairo.PATH_MOVE_TO:
if first:
ctx.new_path()
first = False
x, y = function(*points)
ctx.move_to(x, y)
elif type == cairo.PATH_LINE_TO:
x, y = function(*points)
ctx.line_to(x, y)
elif type == cairo.PATH_CURVE_TO:
x1, y1, x2, y2, x3, y3 = points
x1, y1 = function(x1, y1)
x2, y2 = function(x2, y2)
x3, y3 = function(x3, y3)
ctx.curve_to(x1, y1, x2, y2, x3, y3)
elif type == cairo.PATH_CLOSE_PATH:
ctx.close_path()

View File

@ -394,6 +394,29 @@ class CitationBookmarks(ListBookmarks) :
def make_label(self, handle):
return navigation_label(self.dbstate.db, 'Citation', handle)
# Override add from ListBookmarks, so that when self.bookmarks.add is called
# from ListView.add_bookmark, it will not add a Source bookmark to a
# Citation view.
def add(self, handle):
"""Append the citation to the bottom of the bookmarks."""
if self.dbstate.db.get_citation_from_handle(handle):
ListBookmarks.add(self, handle)
else:
# Probably trying to bookmark a source when the navigation type is
# citation. This can occur when in the Citation Tree View and we
# bookmark a source.
# FIXME: See http://www.gramps-project.org/bugs/view.php?id=6352 a
# more comprehensive solution is needed in the long term. See also
# change_active in CitatinTreeView
from gramps.gui.dialog import WarningDialog
WarningDialog(_("Cannot bookmark this reference"),
"Only Citations can be bookmarked in this view. "
"You are probably trying to bookmark a Source in the "
"Citation Tree View. In this view, only Citations "
"can be bookmarked. To bookmark a Source, switch to "
"the Source View")
def connect_signals(self):
self.dbstate.db.connect('citation-delete', self.remove_handles)

View File

@ -4,6 +4,7 @@
# Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch
# Copyright (C) 2009 Douglas S. Blank
# Copyright (C) 2012 Benny Malengier
# Copyright (C) 2013 Vassilii Khachaturov
#
# 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
@ -72,6 +73,7 @@ from gramps.gen.utils.db import (find_children, find_parents, find_witnessed_peo
get_age, get_timeperiod, preset_name)
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gui.utilscairo import warpPath
#-------------------------------------------------------------------------
#
@ -553,6 +555,22 @@ class FanChartBaseWidget(Gtk.DrawingArea):
cr.set_source_rgba(r/255., g/255., b/255., a)
cr.fill()
def wrap_truncate_layout(self, layout, font, width_pixels):
"""Uses the layout to wrap and truncate its text to given width
Returns: (w,h) as returned by layout.get_pixel_size()
"""
layout.set_font_description(font)
layout.set_width(Pango.SCALE * width_pixels)
# NOTE: one may not truncate the text to just the 1st line's text,
# because the truncation can create invalid Unicode.
if layout.get_line_count() > 1:
layout.set_text(layout.get_text(), layout.get_line(0).length)
return layout.get_pixel_size()
def draw_text(self, cr, text, radius, start, stop,
height=PIXELS_PER_GENERATION, radial=False,
fontcolor=(0, 0, 0), bold=False):
@ -566,29 +584,31 @@ class FanChartBaseWidget(Gtk.DrawingArea):
font.set_size(fontsize * Pango.SCALE)
if bold:
font.set_weight(Pango.Weight.BOLD)
cr.set_source_rgb(fontcolor[0], fontcolor[1], fontcolor[2])
cr.set_source_rgb(*fontcolor)
if radial and self.radialtext:
cr.save()
layout = self.create_pango_layout(text)
layout.set_font_description(font)
w, h = layout.get_size()
w = w / Pango.SCALE + 5 # 5 pixel padding
h = h / Pango.SCALE + 4 # 4 pixel padding
layout.set_wrap(Pango.WrapMode.CHAR)
# NOTE: for radial text, the sector radius height is the text width
w, h = self.wrap_truncate_layout(layout, font, height - 2*PAD_TEXT)
w = w + 5 # 5 pixel padding
h = h + 4 # 4 pixel padding
#first we check if height is ok
degneedheight = h / radius * (180 / math.pi)
degneedheight = math.degrees(h / radius)
degavailheight = stop-start
degoffsetheight = 0
if degneedheight > degavailheight:
#reduce height
fontsize = degavailheight / degneedheight * fontsize / 2
font.set_size(fontsize * Pango.SCALE)
layout = self.create_pango_layout(text)
layout.set_font_description(font)
w, h = layout.get_size()
w = w / Pango.SCALE + 5 # 5 pixel padding
h = h / Pango.SCALE + 4 # 4 pixel padding
w, h = self.wrap_truncate_layout(layout, font, height - 2*PAD_TEXT)
w = w + 5 # 5 pixel padding
h = h + 4 # 4 pixel padding
#first we check if height is ok
degneedheight = h / radius * (180 / math.pi)
degneedheight = math.degrees(h / radius)
degavailheight = stop-start
if degneedheight > degavailheight:
#we could not fix it, no text
@ -596,31 +616,13 @@ class FanChartBaseWidget(Gtk.DrawingArea):
if text:
#spread rest
degoffsetheight = (degavailheight - degneedheight) / 2
txlen = len(text)
if w > height - PAD_TEXT:
txlen = int(w/height * txlen)
cont = True
while cont:
layout = self.create_pango_layout(text[:txlen])
layout.set_font_description(font)
w, h = layout.get_size()
w = w / Pango.SCALE + 2*PAD_TEXT # padding before/after
h = h / Pango.SCALE + 4 # padding in height text
if w > height:
if txlen <= 1:
cont = False
txlen = 0
else:
txlen -= 1
else:
cont = False
# offset for cairo-font system is 90
rotval = self.rotate_value % 360 - 90
if (start + rotval) % 360 > 179:
pos = start + degoffsetheight + 90 - 90
else:
pos = stop - degoffsetheight + 180
cr.rotate(pos * math.pi / 180)
cr.rotate(math.radians(pos))
layout.context_changed()
if (start + rotval) % 360 > 179:
cr.move_to(radius + PAD_TEXT, 0)
@ -629,60 +631,90 @@ class FanChartBaseWidget(Gtk.DrawingArea):
PangoCairo.show_layout(cr, layout)
cr.restore()
else:
# center text:
# 1. determine degrees of the text we can draw
degpadding = PAD_TEXT / radius * (180 / math.pi) # degrees for padding
degneed = degpadding
maxlen = len(text)
hoffset = 0
for i in range(len(text)):
layout = self.create_pango_layout(text[i])
layout.set_font_description(font)
w, h = layout.get_size()
w = w / Pango.SCALE + 2 # 2 pixel padding after letter
h = h / Pango.SCALE + 2 # 2 pixel padding
if h/2 > hoffset:
hoffset = h/2
degneed += w / radius * (180 / math.pi)
if degneed > stop - start - degpadding:
#outside of the box
maxlen = i
break
# 2. determine degrees over we can distribute before and after
if degneed > stop - start - degpadding:
degover = 0
else:
degover = stop - start - degneed - degpadding
# 3. now draw this text, letter per letter
text = text[:maxlen]
# offset for cairo-font system is 90, padding used is 5:
pos = start + 90 + degpadding + degover / 2
# Create a PangoLayout, set the font and text
# Draw the layout N_WORDS times in a circle
for i in range(len(text)):
layout = self.create_pango_layout(text[i])
layout.set_font_description(font)
w, h = layout.get_size()
w = w / Pango.SCALE + 2 # 4 pixel padding after word
h = h / Pango.SCALE + 2 # 4 pixel padding
degneed = w / radius * (180 / math.pi)
if pos+degneed > stop + 90:
#failsafe, outside of the box, redo
break
cr.save()
cr.rotate(pos * math.pi / 180)
pos = pos + degneed
# Inform Pango to re-layout the text with the new transformation
layout.context_changed()
#width, height = layout.get_size()
#r.move_to(- (width / Pango.SCALE) / 2.0, - radius)
cr.move_to(0, - radius - hoffset)
PangoCairo.show_layout(cr, layout)
cr.restore()
self.draw_arc_text(cr, text, radius, start, stop, font)
cr.restore()
def draw_arc_text(self, cr, text, radius, start, stop, font):
"""
Display text at a particular radius, between start and stop
degrees, setting it up along the arc, center-justified.
Text not fitting a single line will be word-wrapped away.
"""
# 1. determine the spread of text we can draw, in radians
degpadding = math.degrees(PAD_TEXT / radius)
# offset for cairo-font system is 90, padding used is 5:
pos = start + 90 + degpadding/2
cr.save()
cr.rotate(math.radians(pos))
cr.new_path()
cr.move_to(0, -radius)
rad_spread = math.radians(stop - start - degpadding)
# 2. Use Pango.Layout to set up the text for us, and do
# the hard work in CTL text handling and line wrapping.
# Clip to the top line only so the text looks nice
# all around the circle at the same radius.
layout = self.create_pango_layout(text)
layout.set_wrap(Pango.WrapMode.WORD)
w, h = self.wrap_truncate_layout(layout, font, radius * rad_spread)
# 3. Use the layout to provide us the metrics of the text box
PangoCairo.layout_path(cr, layout)
#le = layout.get_line(0).get_pixel_extents()[0]
pe = cr.path_extents()
arc_used_ratio = w / (radius * rad_spread)
rad_mid = math.radians(pos) + rad_spread/2
# 4. The moment of truth: map the text box onto the sector, and render!
warpPath(cr, \
self.create_map_rect_to_sector(radius, pe, \
arc_used_ratio, rad_mid - rad_spread/2, rad_mid + rad_spread/2))
cr.fill()
cr.restore()
@staticmethod
def create_map_rect_to_sector(radius, rect, arc_used_ratio, start_rad, stop_rad):
"""Create a 2D-transform, mapping a rectangle onto a circle sector.
radius -- average radius of the target sector
rect -- (x1, y1, x2, y2)
arc_used_ratio -- From 0.0 to 1.0. Rather than stretching onto the
whole sector, only the middle arc_used_ratio part will be mapped onto.
start_rad -- start radial angle of the sector, in radians
stop_rad -- stop radial angle of the sector, in radians
Returns a lambda (x,y)|->(xNew,yNew) to feed to warpPath.
"""
x0, y0, w, h = rect[0], rect[1], rect[2]-rect[0], rect[3]-rect[1]
radiusin = radius - h/2
radiusout = radius + h/2
drho = h
dphi = (stop_rad - start_rad)
# There has to be a clearer way to express this transform,
# by stacking a set of transforms on cr around using this function
# and doing a mapping between unit squares of rectangular and polar
# coordinates.
def phi(x):
return (x - x0) * dphi * arc_used_ratio / w \
+ (1 - arc_used_ratio) * dphi / 2 \
- math.pi/2
def rho(y):
return (y - y0) * (radiusin - radiusout)/h + radiusout
# In (user coordinates units - pixels):
# x from x0 to x0 + w
# y from y0 to y0 + h
# Out:
# (x, y) within the arc_used_ratio of a box like drawn by draw_radbox
return lambda x, y: \
(rho(y) * math.cos(phi(x)), rho(y) * math.sin(phi(x)))
def draw_gradient(self, cr, widget, halfdist):
gradwidth = 10
gradheight = 10
@ -895,7 +927,7 @@ class FanChartBaseWidget(Gtk.DrawingArea):
end_angle = math.pi + (math.pi + end_angle)
# now look at change in angle:
diff_angle = (end_angle - start_angle) % (math.pi * 2.0)
self.rotate_value -= diff_angle * 180.0/ math.pi
self.rotate_value -= math.degrees(diff_angle)
self.last_x, self.last_y = event.x, event.y
self.queue_draw()
return True
@ -1227,7 +1259,7 @@ class FanChartWidget(FanChartBaseWidget):
cr.translate(self.center_x, self.center_y)
cr.save()
cr.rotate(self.rotate_value * math.pi/180)
cr.rotate(math.radians(self.rotate_value))
for generation in range(self.generations - 1, 0, -1):
for p in range(len(self.data[generation])):
(text, person, parents, child, userdata) = self.data[generation][p]
@ -1284,8 +1316,8 @@ class FanChartWidget(FanChartBaseWidget):
position in the chart
"""
cr.save()
start_rad = start * math.pi/180
stop_rad = stop * math.pi/180
start_rad = math.radians(start)
stop_rad = math.radians(stop)
r, g, b, a = self.background_box(person, generation, userdata)
radius = generation * PIXELS_PER_GENERATION + self.CENTER
# If max generation, and they have parents:
@ -1339,7 +1371,7 @@ class FanChartWidget(FanChartBaseWidget):
radial = False
radstart = radius - PIXELS_PER_GENERATION/2
if self.radialtext: ## and generation >= 6:
spacepolartext = radstart * (stop-start)*math.pi/180
spacepolartext = radstart * math.radians(stop-start)
if spacepolartext < PIXELS_PER_GENERATION * 1.1:
# more space to print it radial
radial = True

View File

@ -1272,6 +1272,9 @@ class GrampletPane(Gtk.ScrolledWindow):
mainframe = mframe.get_parent() # actually a vbox
rect = source.get_allocation()
sx, sy = rect.width, rect.height
# Convert to LTR co-ordinates when using RTL locale
if source.get_direction() == Gtk.TextDirection.RTL:
x = sx - x
# first, find column:
col = 0
for i in range(len(self.columns)):

View File

@ -48,7 +48,7 @@ import time
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.utils.image import resize_to_jpeg
from gramps.gen.const import DATA_DIR, WEBSTUFF_IMAGE_DIR, PROGRAM_NAME, URL_HOMEPAGE
from gramps.gen.const import DATA_DIR, IMAGE_DIR, PROGRAM_NAME, URL_HOMEPAGE
from gramps.version import VERSION
from gramps.gen.plug.docgen import BaseDoc, TextDoc, FONT_SANS_SERIF, URL_PATTERN
from gramps.plugins.lib.libhtmlbackend import HtmlBackend, process_spaces
@ -298,7 +298,7 @@ class HtmlDoc(BaseDoc, TextDoc):
if os.path.exists(fullpath):
self.copy_file(fullpath, _HTMLSCREEN)
#favicon
self.copy_file(os.path.join(WEBSTUFF_IMAGE_DIR, 'favicon.ico'),
self.copy_file(os.path.join(IMAGE_DIR, 'webstuff', 'favicon.ico'),
'favicon.ico')
def __reduce_list(self):

View File

@ -499,4 +499,41 @@
<date value="*/dec/25" type="national" offset="+2" name="Christmas Day Holiday" if="dow(y, m, d) > 5"/>
<date value="*/dec/26" type="national" offset="+2" name="Boxing Day Holiday" if="dow(y, m, d) > 5"/>
</country>
<country _name="Ukraine">
<date value="*/1/1" type="national" name="Новий Рік"/>
<date value="*/1/6" type="religious" name="Святий Вечір"/>
<date value="*/1/7" type="religious" name="Різдво"/>
<date value="*/1/13" type="religious" name="Маланка"/>
<date value="*/1/14" type="religious" name="Старий Новий рік, Щедрий вечір"/>
<date value="*/1/19" type="religious" name="Водохреща"/>
<date value="*/1/22" type="national" name="День Соборності України"/>
<date value="*/2/14" type="secular" name="День закоханих"/>
<date value="*/2/15" type="religious" name="Стрітення"/>
<date value="*/3/8" type="secular" name="Міжнародний жіночий день"/>
<date value="*/3/20" type="secular" name="Весняне Рівнодення"/>
<date value="*/4/1" type="secular" name="День сміху"/>
<date value="*/4/7" type="religious" name="Благовіщення"/>
<date value="2010/4/4" type="religious" name="Великдень"/>
<date value="2011/4/24" type="religious" name="Великдень"/>
<date value="2012/4/15" type="religious" name="Великдень"/>
<date value="2013/5/5" type="religious" name="Великдень"/>
<date value="2014/4/20" type="religious" name="Великдень"/>
<date value="2015/4/12" type="religious" name="Великдень"/>
<date value="2016/5/1" type="religious" name="Великдень"/>
<date value="2017/4/16" type="religious" name="Великдень"/>
<date value="2018/4/8" type="religious" name="Великдень"/>
<date value="2019/4/28" type="religious" name="Великдень"/>
<date value="2020/4/19" type="religious" name="Великдень"/>
<date value="*/5/1" type="national" name="День Праці"/>
<date value="*/6/21" type="secular" name="Весняне Сонцестояння"/>
<date value="*/6/28" type="national" name="День Конституції України"/>
<date value="*/7/7" type="religious" name="Івана Купала"/>
<date value="*/8/19" type="religious" name="Спаса"/>
<date value="*/8/24" type="national" name="День Незалежності України"/>
<date value="*/9/22" type="secular" name="Осіннє Рівнодення"/>
<date value="*/10/14" type="religious" name="Покрова, День Українського козацтва"/>
<date value="*/12/13" type="religious" name="Андрія"/>
<date value="*/12/19" type="religious" name="Миколая"/>
<date value="*/12/21" type="secular" name="Осіннє Сонцестояння"/>
</country>
</calendar>

View File

@ -0,0 +1,911 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2005 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2013 Oleh Petriv <olehsbox[at]yahoo.com>
# Copyright (C) 2013 Fedir Zinchuk <fedikw[at]gmail.com>
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# gramps/plugins/rel/rel_uk.py
# $Id$
#
# UA: Пояснення щодо родинних відносин див. relationship.py
# EN: Ukrainian relationship calculator. For more information see relationship.py
"""
Ukrainian-specific definitions of relationships
"""
from __future__ import unicode_literals
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from gramps.gen.lib import Person
import gramps.gen.relationship
#-------------------------------------------------------------------------
# Relationship levels
_level_name = [
"",
"рідний(-на)", "двоюрідний(-на)", "троюрідний(-на)",
"чотириюрідний(-на)", "п'ятиюрідний(-на)", "шестиюрідний(-на)",
"семиюрідний(-на)", "восьмиюрідний(-на)", "дев'ятиюрідний(-на)",
"десятиюрідний(-на)", "одинадцятиюрідний(-на)",
"дванадцятиюрідний(-на)", "тринадцятиюрідний(-на)",
"чотирнадцятиюрідний(-на)", "п'ятнадцятиюрідний(-на)",
"шістнадцятиюрідний(-на)", "сімнадцятиюрідний(-на)",
"вісімнадцятиюрідний(-на)", "дев'ятнадцятиюрідний(-на)",
"двадцятиюрідний(-на)"
]
_level_name_male = [
"",
"рідний", "двоюрідний", "троюрідний",
"чотириюрідний", "п'ятиюрідний", "шестиюрідний",
"семиюрідний", "восьмиюрідний", "дев'ятиюрідний",
"десятиюрідний", "одинадцятиюрідний", "дванадцятиюрідний",
"тринадцятиюрідний", "чотирнадцятиюрідний", "п'ятнадцятиюрідний",
"шістнадцятиюрідний", "сімнадцятиюрідний", "вісімнадцятиюрідний",
"дев'ятнадцятиюрідний", "двадцятиюрідний"
]
_level_name_female = [
"",
"рідна", "двоюрідна", "троюрідна",
"чотириюріднa", "п'ятиюрідна", "шестиюрідна",
"семиюрідна", "восьмиюрідна", "дев'ятиюрідна",
"десятиюрідна", "одинадцятиюрідна", "дванадцятиюрідна",
"тринадцятиюрідна", "чотирнадцятиюрідна", "п'ятнадцятиюрідна",
"шістнадцятиюрідна", "сімнадцятиюрідна", "вісімнадцятиюрідна",
"дев'ятнадцятиюрідна", "двадцятиюрідна"
]
_son_level = [
"",
"син",
"внук",
"правнук",
"праправнук",
]
_daughter_level = [
"",
"дочка",
"онука",
"правнучка",
"праправнучка",
]
_father_level = [
"",
"батько",
"дід",
"прадід",
"прапрадід",
]
_mother_level = [
"",
"мати",
"баба",
"прабаба",
"прапрабаба",
]
_uncle_level = [
"",
"брат", # not used, just for keep count
"дядько",
"дід",
"прадід",
"прапрадід",
]
_aunt_level = [
"",
"сестра", # not used, just for keep count
"тітка",
"баба",
"прабаба",
"прапрабаба",
]
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
"""
RelationshipCalculator Class
"""
def __init__(self):
gramps.gen.relationship.RelationshipCalculator.__init__(self)
def get_sword_distaff(self, level, reltocommon, gender = Person.UNKNOWN):
"""
Generate relationships 'by male line' or 'by female line',
specific for Ukraine
"""
if level <= 1:
return ""
# test the relation line
by_line = ''
for g in reltocommon:
if(by_line and by_line != g):
by_line = ''
break
by_line = g
if by_line == self.REL_FATHER and gender == Person.MALE:
# by male line
return " по чоловічій лінії"
elif by_line == self.REL_MOTHER and gender == Person.FEMALE:
# by male line
return " по жіночій лінії"
elif reltocommon[0] == self.REL_FATHER:
# From father's side
return " по батькові"
elif reltocommon[0] == self.REL_MOTHER:
# From mother's side
return " по матері"
else:
return ""
def get_son(self, level, inlaw=''):
"""
Provides information how much male descendant is related to this person
"""
# Define if the person is natural relative or in law
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий "
if level >= 0 and level < len(_son_level):
return t_inlaw +_son_level[level]
else:
return t_inlaw + "пра(пра)внук у %d поколінні" % (level + 1)
def get_daughter(self, level, inlaw=''):
"""
Provides information how much female descendant is related to this person
"""
# Define if the person is natural relative or in law
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названа "
if level >= 0 and level < len(_daughter_level):
return t_inlaw + _daughter_level[level]
else:
return t_inlaw + "пра(пра)внучка у %d поколінні" % (level + 1)
def get_child_unknown(self, level, inlaw=''):
"""
Provides information how much descendant of unknown gender is related to this person
"""
# Define if the person is natural relative or in law
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий(на) "
if level == 1:
return t_inlaw + "внук(а)"
else:
return t_inlaw + "пра(пра)внук(а) у %d поколінні" % (level + 1)
def get_father(self, level, reltocommon, inlaw=''):
"""
Provides information how much male ancestor (for example father)
is related to the given person
"""
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий "
if level >= 0 and level < len(_father_level):
# If you know exact name of relationship - use it
if level == 1:
# Father
return t_inlaw + _father_level[level]
else:
# Grandfather, Greatgrandfather, Greatgreatgrandfather
return t_inlaw + _father_level[level] \
+ self.get_sword_distaff(level, reltocommon, Person.MALE)
else:
# For deep generations
return t_inlaw + "пра(пра)дід у %d поколінні" % (level + 1) \
+ self.get_sword_distaff(level, reltocommon, Person.MALE)
def get_mother(self, level, reltocommon, inlaw=''):
"""
Provides information how much female ancestor (for example mother)
is related to the given person
"""
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названа "
if level >= 0 and level < len(_mother_level):
# If you know exact name of relationship - use it
if level == 1:
# Mother
return t_inlaw + _mother_level[level]
else:
# Grandmother, Greatgrandmother, Greatgreatgrandmother
return t_inlaw + _mother_level[level] \
+ self.get_sword_distaff(level, reltocommon, Person.FEMALE)
else:
# For deep generations
return t_inlaw + "пра(пра)баба у %d поколінні" % (level + 1) \
+ self.get_sword_distaff(level, reltocommon, Person.FEMALE)
def get_parent_unknown(self, level, reltocommon, inlaw=''):
"""
Provides information how much an ancestor of unknown gender
is related to the given person (unknown sex)
"""
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий "
if level == 1:
return t_inlaw + "батько/мати"
else:
return t_inlaw + "пра(пра)- дід/баба у %d поколінні" % (level + 1) \
+ self.get_sword_distaff(level, reltocommon)
def get_uncle(self, level, reltocommon, inlaw = ''):
"""
Return ancle generation name
"""
if reltocommon[0] == self.REL_FATHER:
# from Father
if level < len(_uncle_level):
if level == 2:
return _uncle_level[level] + " (стрийко)"
else:
return "двоюрідний " + _uncle_level[level] \
+ " по батькові"
else:
return "двоюрідний пра(пра)дід в %d поколінні по батькові" % (level)
elif reltocommon[0] == self.REL_MOTHER:
# from Mother
if level < len(_uncle_level):
if level == 2:
return _uncle_level[level] + " (вуйко)"
else:
return "двоюрідний " + _uncle_level[level] \
+ " по матері"
else:
return "двоюрідний пра(пра)дід в %d поколінні по матері" % (level)
else:
if level == 2:
return "дядько (стрийко/вуйко)"
else:
return "двоюрідний пра(пра)дід в %d поколінні" % (level)
def get_aunt(self, level, reltocommon, inlaw = ''):
"""
Return aunt generation name
"""
if reltocommon[0] == self.REL_FATHER:
# from Father
if level < len(_aunt_level):
if level == 2:
return _aunt_level[level] + " (стрийна)"
else:
return "двоюрідна " + _aunt_level[level] \
+ " по батькові"
else:
return "двоюрідна пра(пра)баба в %d поколінні по батькові" \
% (level)
elif reltocommon[0] == self.REL_MOTHER:
# from Mother
if level < len(_aunt_level):
if level == 2:
return _aunt_level[level] + " (вуйна)"
else:
return "двоюрідна " + _aunt_level[level] \
+ " по матері"
else:
return "двоюрідна пра(пра)баба в %d поколінні по матері" \
% (level)
else:
if level == 2:
return "тітка (стрийна/вуйна)"
else:
return "двоюрідна пра(пра)баба в %d поколінні" % (level)
def get_uncle_aunt_unknown(self, level, reltocommon, inlaw = ''):
"""
Return uncle/aunt generation name when gender unknown
"""
if reltocommon[0] == self.REL_FATHER:
# from Father
if level == 2:
return "дядько/тітка (стрийко)"
else:
return "двоюрідний дід/баба в %d поколінні по батькові" \
% (level)
elif reltocommon[0] == self.REL_MOTHER:
# from Mother
if level == 2:
return "дядько/тітка (вуйко)"
else:
return "двоюрідний дід/баба в %d поколінні по матері" \
% (level)
else:
if level == 2:
return "дядько/тітка"
else:
return "двоюрідний дід/баба в %d поколінні" % (level)
def get_nephew(self, level, reltocommon, inlaw = ''):
"""
Return nephew generation name
"""
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий "
if level == 2:
if reltocommon[0] == self.REL_FATHER :
# Brother's son
return t_inlaw + "небіж (братанець)"
elif reltocommon[0] == self.REL_MOTHER :
# Sister's son
return t_inlaw + "небіж (сестринець)"
else:
return t_inlaw + "небіж (братанець/сестринець)"
elif level >= 2 and level <=6:
if reltocommon[level-2] == self.REL_FATHER :
# Brother's son generation
if reltocommon[level-3] == self.REL_FATHER :
# Son of brother son
return self.get_son((level - 2), inlaw) \
+ " небожа по брату"
elif reltocommon[level-3] == self.REL_MOTHER :
# Son of brother daughter
return self.get_son((level - 2), inlaw) \
+ " небоги по брату"
else:
return self.get_son((level - 2), inlaw) \
+ " небожа/небоги по брату"
elif reltocommon[level-2] == self.REL_MOTHER :
# Sister's son generation
if reltocommon[level-3] == self.REL_FATHER :
# Son of sister son
return self.get_son((level - 2), inlaw) \
+ " небожа по сестрі"
elif reltocommon[level-3] == self.REL_MOTHER :
# Son of sister daughter
return self.get_son((level - 2), inlaw) \
+ " небоги по сестрі"
else:
return self.get_son((level - 2), inlaw) \
+ " небожа/небоги по сестрі"
else:
return self.get_son((level - 2), inlaw) + " небожа/небоги"
else:
if reltocommon[level-2] == self.REL_FATHER :
# Brother's son generation
return t_inlaw + "чоловічий нащадок у %d поколінні брата" \
% (level)
elif reltocommon[level-2] == self.REL_MOTHER :
# Sister's son generation
return t_inlaw + "чоловічий нащадок у %d поколінні сестри" \
% (level)
else:
return t_inlaw + "чоловічий нащадок у %d поколінні брата/сестри" \
% (level)
def get_niece(self, level, reltocommon, inlaw = ''):
"""
Return niece generation name
"""
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий "
if level == 2:
if reltocommon[0] == self.REL_FATHER :
# Brother's daughter
return t_inlaw + "небога (братанка)"
elif reltocommon[0] == self.REL_MOTHER :
# Sister's daughter
return t_inlaw + "небога (сестрениця)"
else:
return t_inlaw + "небога (братанка/сестрениця)"
elif level >= 2 and level <=6:
if reltocommon[level-2] == self.REL_FATHER :
# Brother's daughter generation
if reltocommon[level-3] == self.REL_FATHER :
# daughter of brother son
return self.get_daughter((level - 2), inlaw) \
+ " небожа по брату"
elif reltocommon[level-3] == self.REL_MOTHER :
# daughter of brother daughter
return self.get_daughter((level - 2), inlaw) \
+ " небоги по брату"
else:
return self.get_daughter((level - 2), inlaw) \
+ " небожа/небоги по брату"
elif reltocommon[level-2] == self.REL_MOTHER :
# Sister's daughter generation
if reltocommon[level-3] == self.REL_FATHER :
# daughter of sister son
return self.get_daughter((level - 2), inlaw) \
+ " небожа по сестрі"
elif reltocommon[level-3] == self.REL_MOTHER :
# daughter of sister daughter
return self.get_daughter((level - 2), inlaw) \
+ " небоги по сестрі"
else:
return self.get_daughter((level - 2), inlaw) \
+ " небожа/небоги по сестрі"
else:
return self.get_daughter(level, inlaw) + " небожа/небоги"
else:
if reltocommon[level-2] == self.REL_FATHER :
# Brother's daughter generation
return t_inlaw + "жіночий нащадок у %d поколінні брата" \
% (level)
elif reltocommon[level-2] == self.REL_MOTHER :
# Sister's daughter generation
return t_inlaw + "жіночий нащадок у %d поколінні сестри" \
% (level)
else:
return t_inlaw + "жіночий нащадок у %d поколінні брата/сестри" \
% (level)
def get_nephew_niece_unknown (self, level, reltocommon, inlaw = ''):
"""
Return nephew/niece generation name when gender unknown
"""
if inlaw == '':
t_inlaw = ""
else:
t_inlaw = "названий "
if reltocommon[level-2] == self.REL_FATHER:
# Brother's descendant
return t_inlaw + "нащадок в %d поколінні брата" % (level)
elif (reltocommon[level-2] == self.REL_MOTHER):
# Sister's descendant
return t_inlaw + "нащадок в %d поколінні сестри" % (level)
else :
return t_inlaw + "нащадок в %d поколінні брата aбо сестри" \
% (level)
def get_level(self, level, gender):
"""
Return level name depend of gender
"""
if (gender == Person.MALE):
if level < len(_level_name_male):
return _level_name_male[level]
else:
return "%d-юрідний" % level
elif (gender == Person.FEMALE):
if level < len(_level_name_female):
return _level_name_female[level]
else:
return "%d-юрідна" % level
else:
if level < len(_level_name):
return _level_name[level]
else:
return "%d-юрідний(на)" % level
def get_single_relationship_string(self, Ga, Gb, gender_a, gender_b,
reltocommon_a, reltocommon_b,
only_birth=True,
in_law_a=False, in_law_b=False):
"""
Provide a string that describes the relationsip between a person, and
another person. E.g. "grandparent" or "child".
Ga: The number of generations between the main person and the
common ancestor. (кількість поколінь між прямими родичами особи:
сини, батьки, бабусі...)
Gb: The number of generations between the other person and the
common ancestor. (кількість поколінь між іншою особою
і спільним предком)
gender_a : gender of person a
gender_b : gender of person b
reltocommon_a : relation path to common ancestor or common
Family for person a.
Note that length = Ga
reltocommon_b : relation path to common ancestor or common
Family for person b.
Note that length = Gb
in_law_a : True if path to common ancestors is via the partner
of person a
in_law_b : True if path to common ancestors is via the partner
of person b
only_birth : True if relation between a and b is by birth only
False otherwise
more see in relationship.py get_single_relationship_string()
"""
if only_birth:
step = ''
else:
step = self.STEP
if in_law_a or in_law_b :
inlaw = self.INLAW
else:
inlaw = ''
t_inlaw = ""
# b is the same person as a
if Ga == Gb == 0:
rel_str = 'та сама особа'
elif Ga == 0:
# b is son/descendant of a
if gender_b == Person.MALE:
if inlaw and Gb == 1 and not step:
rel_str = "зять"
else:
rel_str = self.get_son(Gb, inlaw)
elif gender_b == Person.FEMALE:
if inlaw and Gb == 1 and not step:
rel_str = "невістка"
else:
rel_str = self.get_daughter(Gb, inlaw)
else:
rel_str = self.get_child_unknown(Gb, inlaw)
elif Gb == 0:
# b is parent/grand parent of a
if gender_b == Person.MALE:
if inlaw and Gb == 1 and not step:
rel_str = "тесть"
else:
rel_str = self.get_father(Ga, reltocommon_a, inlaw)
elif gender_b == Person.FEMALE:
if inlaw and Gb == 1 and not step:
rel_str = "теща"
else:
rel_str = self.get_mother(Ga, reltocommon_a, inlaw)
else:
rel_str = self.get_parent_unknown(Ga, reltocommon_a, inlaw)
elif Ga == Gb == 1:
# Family, brother/sister
# not used, leave it just in case
# because should be handled
# by get_sibling_relationship_string
# that called in parent RelationshipCalculator
# see Relationship.py
if gender_b == Person.MALE:
if inlaw and not step:
rel_str = "рідний брат"
else:
rel_str = "напів рідний брат"
elif gender_b == Person.FEMALE:
if inlaw and not step:
rel_str = "рідна сестра"
else:
rel_str = "напів рідна сестра"
else:
rel_str = "брат/сестра"
elif Gb == 1 and Ga > 1:
# b is aunt/uncle of a
if (gender_b == Person.MALE):
rel_str = self.get_uncle(Ga, reltocommon_a, inlaw)
elif (gender_b == Person.FEMALE):
rel_str = self.get_aunt(Ga, reltocommon_a, inlaw)
else:
rel_str = self.get_uncle_aunt_unknown(Ga, reltocommon_a, inlaw)
elif Ga == 1 and Gb > 1:
# b is niece/nephew of a
if (gender_b == Person.MALE):
rel_str = self.get_nephew(Gb, reltocommon_b, inlaw)
elif (gender_b == Person.FEMALE):
rel_str = self.get_niece(Gb, reltocommon_b, inlaw)
else:
rel_str = self.get_nephew_niece_unknown(Gb, reltocommon_b, inlaw)
elif Ga > 1 and Gb > 1:
# b is (cousin/far aunt/far uncle/far niece/far nephew) of a
if Ga > Gb:
# b is far aunt/far uncle of a
level = Ga - Gb + 1
if level >= 3:#it is right or???
level_name = self.get_level(Gb + 1, gender_b)
else:
level_name = self.get_level(Gb, gender_b)
if (gender_b == Person.MALE):
# b is far uncle
if inlaw != '':
t_inlaw = "названий "
if level < len(_uncle_level):
rel_str = t_inlaw + "%s %s" \
% (level_name, _uncle_level[level])
else:
rel_str = t_inlaw + "%s пра(пра)дід в %d поколінні" \
% (level_name, (level))
elif (gender_b == Person.FEMALE):
# b is far aunt
if inlaw != '':
t_inlaw = "названа "
if level < len(_aunt_level):
rel_str = t_inlaw + "%s %s" \
% (level_name, _aunt_level[level])
else:
rel_str = t_inlaw + "%s пра(пра)баба в %d поколінні" \
% (level_name, (level))
else:
if inlaw != '':
t_inlaw = "названий(на) "
if level == 2:
rel_str = t_inlaw + "%s дядько/тітка" % level_name
else:
rel_str = t_inlaw + "%s пра(пра)- дід/баба в %d поколінні" \
% (level_name, (level))
elif Ga < Gb:
# b is far niece/far nephew of a
level_name = self.get_level(Ga, gender_b)
level = Gb - Ga + 1
if (gender_b == Person.MALE):
# b is far nephew
if level == 2:
rel_str = "%s небіж" % level_name
else:
rel_str = "%s пра(пра)внук у %d поколінні" \
% (level_name, level)
#rel_str = "%s %s" % (level_name, self.get_nephew(level, reltocommon_b, inlaw))
elif (gender_b == Person.FEMALE):
# b is far niece
if level == 2:
rel_str = "%s небога" % level_name
else:
rel_str = "%s пра(пра)внучка у %d поколінні" \
% (level_name, level)
#rel_str = "%s %s" % (level_name, self.get_niece(level, reltocommon_b, inlaw))
else:
rel_str = "%s пра(пра)внук(а) у %d поколінні" % level
#rel_str = "%s %s" % (level_name, self.get_nephew_niece_unknown(level, reltocommon_b, inlaw))
else: #Gb == Ga
# b is cousin of a
level_name = self.get_level(Ga, gender_b)
if (gender_b == Person.MALE):
if inlaw != '':
t_inlaw = "названий "
rel_str = t_inlaw + "%s брат" % level_name
elif (gender_b == Person.FEMALE):
if inlaw != '':
t_inlaw = "названа "
rel_str = t_inlaw + "%s сестра" % level_name
else:
if inlaw != '':
t_inlaw = "названий(на) "
rel_str = t_inlaw + "%s брат/сестра" % level_name
else:
# A program should never goes there, but...
rel_str = "невизначений ступінь спорідненості"
return rel_str
def get_plural_relationship_string(self, Ga, Gb,
reltocommon_a='', reltocommon_b='',
only_birth=True,
in_law_a=False, in_law_b=False):
"""
Generate a text with information, how far away is a group of persons
from a main person
"""
if Ga == Gb == 0:
return 'та сама особа'
if 0 == Ga:
# These are descendants
if 1 == Gb:
return 'діти'
if 2 == Gb:
return 'внуки'
if 3 == Gb:
return 'правнуки'
if 4 == Gb:
return 'праправнуки'
return 'прапрапра(n)внуки'
if 0 == Gb:
# These are parents/grand parents
if 1 == Ga:
return 'батьки'
if 2 == Ga:
return 'діди/баби'
if 3 == Ga:
return 'прадіди/прабаби'
if 4 == Ga:
return 'прапращури'
return 'прапрапра(n)щури'
if 1 == Ga == Gb:
return 'батьки'
if 1 == Gb and Ga > 1:
return 'дядьки (вуйки, стрийки) і тітки'
if 1 < Gb and 1 == Ga:
return 'небожі по братові і сестрі'
if 1 < Ga and 1 < Gb:
return 'дальня родина'
return 'відносини невідомі'
def get_sibling_relationship_string(self, sib_type, gender_a, gender_b,
in_law_a=False, in_law_b=False):
if in_law_a or in_law_b :
inlaw = self.INLAW
else:
inlaw = ''
if sib_type == self.NORM_SIB:
if not inlaw:
if gender_b == Person.MALE:
rel_str = 'рідний брат'
elif gender_b == Person.FEMALE:
rel_str = 'рідна сестра'
else:
rel_str = 'рідний(а) брат або сестра'
else:
if gender_b == Person.MALE:
rel_str = "названий брат"
elif gender_b == Person.FEMALE:
rel_str = "названа сестра"
else:
rel_str = "названий(а) брат або сестра"
elif sib_type == self.UNKNOWN_SIB:
if not inlaw:
if gender_b == Person.MALE:
rel_str = 'брат'
elif gender_b == Person.FEMALE:
rel_str = 'сестра'
else:
rel_str = 'брат або сестра'
else:
if gender_b == Person.MALE:
rel_str = "швагро"
elif gender_b == Person.FEMALE:
rel_str = "братова"
else:
rel_str = "швагро або братова"
elif sib_type == self.HALF_SIB_FATHER:
if gender_b == Person.MALE:
rel_str = "єдинокровний(напіврідний) брат"
elif gender_b == Person.FEMALE:
rel_str = "єдинокровна(напіврідна) сестра"
else:
rel_str = "напіврідний(а) брат/сестра"
elif sib_type == self.HALF_SIB_MOTHER:
if gender_b == Person.MALE:
rel_str = "єдинокровний(напіврідний) брат"
elif gender_b == Person.FEMALE:
rel_str = "єдинокровна(напіврідна) сестра"
else:
rel_str = "напіврідний(а) брат/сестра"
elif sib_type == self.STEP_SIB:
if gender_b == Person.MALE:
rel_str = "зведений брат"
elif gender_b == Person.FEMALE:
rel_str = "зведена сестра"
else:
rel_str = "зведений брат або сестра"
else:
rel_str = "невизначена ступінь родинних відносин"
return rel_str
if __name__ == "__main__":
# Test function. Call it as follows from the command line (so as to find
# imported modules):
# export PYTHONPATH=/path/to/gramps/src
# python src/plugins/rel/rel_pl.py
"""
TRANSLATORS, copy this if statement at the bottom of your
rel_xx.py module, and test your work with:
python src/plugins/rel/rel_xx.py
"""
from gramps.gen.relationship import test
import signal
import sys
# If someone go out
def goodby(signal, frame):
print 'No more Drink!'
sys.exit(0)
signal.signal(signal.SIGINT, goodby)
# Run test
RC = RelationshipCalculator()
test(RC, True)

View File

@ -295,3 +295,19 @@ plg.relcalcclass = 'RelationshipCalculator'
plg.lang_list = ["sv", "SV", "sv_SE", "swedish", "Swedish", "sv_SE.UTF8",
"sv_SE@euro", "sv_SE.UTF8@euro", "svenska", "Svenska",
"sv_SE.UTF-8", "sv_SE.utf-8", "sv_SE.utf8", "Swedish_Sweden"]
# uk
plg = newplugin()
plg.id = 'relcalc_uk'
plg.name = _("Ukrainian Relationship Calculator")
plg.description = _("Calculates relationships between people")
plg.version = '1.0'
plg.gramps_target_version = '4.1'
plg.status = STABLE
plg.fname = 'rel_uk.py'
plg.ptype = RELCALC
plg.relcalcclass = 'RelationshipCalculator'
plg.lang_list = ["uk", "UA", "uk_UA", "ukrainian",
"Ukrainian", "uk_UA.utf8",
"uk_UA.UTF8", "uk_UA.utf-8", "uk_UA.UTF-8", "uk_UA.iso88595",
"uk_UA.iso8859-5", "uk_UA.iso-8859-5", "koi8u", "uk_koi8u",
"uk_UA.koi8u","uk_UA.KOI8-U",]

View File

@ -95,7 +95,7 @@ class RelCalc(tool.Tool, ManagedWindow):
self.colord.append((0, col, size))
self.dbstate = dbstate
self.relationship = get_relationship_calculator()
self.relationship = get_relationship_calculator(glocale)
self.relationship.connect_db_signals(dbstate)
self.glade = Glade()

View File

@ -156,6 +156,17 @@ class CitationTreeView(ListView):
self.additional_uis.append(self.additional_ui())
# Override change_active from NavigationView, so that only Citations can be
# put in the history list for the CitationTreeView
def change_active(self, handle):
if self.dbstate.db.get_citation_from_handle(handle):
super(CitationTreeView, self).change_active(handle)
else:
# FIXME: See http://www.gramps-project.org/bugs/view.php?id=6352 a
# more comprehensive solution is needed in the long term. See also
# add in Bookmarks.CitationBookmarks
pass
def setup_filter(self):
"""
Override the setup of the default Search Bar in listview, so that only

View File

@ -606,6 +606,11 @@ class PedigreeView(NavigationView):
self.scrolledwindow.add_with_viewport(event_box)
self.table = Gtk.Grid()
# force LTR layout of the tree, even though the text might be RTL!
# this way the horizontal scroll preferences will be correct always
if self.table.get_direction() == Gtk.TextDirection.RTL:
self.table.set_direction(Gtk.TextDirection.LTR)
self.table.set_halign(Gtk.Align.END)
event_box.add(self.table)
event_box.get_parent().set_shadow_type(Gtk.ShadowType.NONE)
self.table.set_row_spacing(1)
@ -1101,6 +1106,10 @@ class PedigreeView(NavigationView):
elif self.tree_direction == 3:
child_arrow = Gtk.ArrowType.RIGHT
parent_arrow = Gtk.ArrowType.LEFT
# GTK will reverse the icons for RTL locales, but we force LTR layout of the table,
# so reverse the arrows back...
if self.tree_direction in [2,3] and self.scrolledwindow.get_direction() == Gtk.TextDirection.RTL:
child_arrow, parent_arrow = parent_arrow, child_arrow
button = Gtk.Button()
button.add(Gtk.Arrow.new(child_arrow, Gtk.ShadowType.IN))
@ -1324,7 +1333,7 @@ class PedigreeView(NavigationView):
or call option menu.
"""
if event.button == 1 and event.type == Gdk.EventType.BUTTON_PRESS:
widget.get_root_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.FLEUR))
widget.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.FLEUR))
self._last_x = event.x
self._last_y = event.y
self._in_move = True
@ -1338,7 +1347,7 @@ class PedigreeView(NavigationView):
"""Exit from scroll mode when button release."""
if event.button == 1 and event.type == Gdk.EventType.BUTTON_RELEASE:
self.cb_bg_motion_notify_event(widget, event)
widget.get_root_window().set_cursor(None)
widget.get_window().set_cursor(None)
self._in_move = False
return True
return False

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -1,177 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg3906"
version="1.1"
inkscape:version="0.47pre0 r21549"
sodipodi:docname="gramps-geo-altmap.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<title
id="title2916">gramps-geo-altmap</title>
<defs
id="defs3908">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective3914" />
<inkscape:perspective
id="perspective3891"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3668"
id="linearGradient6262"
gradientUnits="userSpaceOnUse"
x1="288.36801"
y1="423.65311"
x2="359.15457"
y2="423.65311" />
<linearGradient
inkscape:collect="always"
id="linearGradient3668">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3670" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3672" />
</linearGradient>
<inkscape:perspective
id="perspective4035"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3668-1"
id="linearGradient2933"
gradientUnits="userSpaceOnUse"
x1="288.36801"
y1="423.65311"
x2="359.15457"
y2="423.65311" />
<linearGradient
inkscape:collect="always"
id="linearGradient3668-1">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3670-0" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3672-6" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7"
inkscape:cx="32.471316"
inkscape:cy="23.449345"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1078"
inkscape:window-height="707"
inkscape:window-x="260"
inkscape:window-y="117"
inkscape:window-maximized="0" />
<metadata
id="metadata3911">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>gramps-geo-altmap</dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:date>2009-09-07</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Serge Noiraud</dc:title>
</cc:Agent>
</dc:creator>
<dc:description>used to select the proprietary map.</dc:description>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
d="m 20.680283,39.12631 c 10.271495,2.159013 8.307555,-3.123848 8.307555,-3.123848 l 5.071932,-3.401433 c 0,0 2.637138,0.21373 4.387829,0.09533 0.999233,-0.06758 2.680145,-1.046411 2.357227,-2.201648 -1.218455,-4.359011 -7.427195,-6.950657 -11.550556,-7.138293 -2.033311,-0.09253 -2.952564,0.696822 -2.952564,0.696822 -1.539345,0.969216 0.08748,3.894222 0.08748,3.894222 l -4.049411,4.019562 c -9.725562,-0.791858 -4.950964,4.931448 -4.950964,4.931448 l -9.8557157,9.159757 c 0,0 -0.087216,1.528401 2.7064097,-0.01094 l 10.440776,-6.920977 0,-6e-6 z"
id="path2453-3"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.17199267px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="cccssscccccccc" />
<g
id="g2893-2"
style="fill:#ef2929;fill-opacity:1"
transform="matrix(0.17199268,0,0,0.17199268,-43.009698,-36.289865)">
<path
sodipodi:nodetypes="ccccc"
style="fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3225-0"
d="M 319.44354,366.56878 292.72208,469.6616 c -2.1317,22.81794 12.07963,3.30695 12.07963,3.30695 l 50.2167,-93.83671 -35.57487,-12.56306 z" />
</g>
<path
d="m 26.452623,25.877284 c -0.54896,1.377469 -2.093603,2.400406 -4.197855,2.780016 -2.10425,0.37961 -4.742193,0.111221 -7.169094,-0.729399 C 12.658773,27.087284 10.472803,25.68479 9.1448974,24.116365 7.8169918,22.547941 7.3635056,20.832901 7.912465,19.455432 c 0.5489593,-1.37747 2.496221,-2.014627 4.624013,-2.098162 2.502928,-0.09826 4.54825,0.12749 6.413449,0.75797 1.865198,0.630481 3.550276,1.665691 5.332716,3.186344 1.562225,1.33278 2.718939,3.198232 2.16998,4.5757 z"
id="path3227-6"
style="fill:#ef2929;fill-opacity:1;stroke:#000000;stroke-width:1.03195608000000005;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:nodetypes="csssssssc" />
<path
d="m 14.977112,10.44911 -3.106086,10.037413 c 0.969617,3.707123 8.377748,6.060349 10.998278,3.660376 l 3.733123,-8.867937"
id="path3233-1"
style="fill:#ef2929;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.04616748999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:nodetypes="cccc" />
<path
d="M 14.235182,3.0499825 12.793997,6.865199 c 0.1135,5.058298 13.043976,10.582035 18.529149,7.01257 l 1.653369,-3.9908943"
id="path3231-5"
style="fill:#ef2929;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.03195608000000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:nodetypes="cccc" />
<path
d="M 32.671194,10.721426 C 32.017559,11.57151 30.3835,12.0047 28.23049,11.898659 26.077481,11.792617 23.432054,11.148649 21.041311,10.148622 18.650568,9.1485944 16.543969,7.8048294 15.316445,6.4968233 14.08892,5.1888156 13.585133,4.0179161 14.240144,3.1684081 14.893779,2.3183239 16.698302,1.7999036 18.851311,1.905944 c 2.15301,0.1060421 4.798436,0.7500102 7.189179,1.7500375 2.390743,1.0000274 4.497342,2.3437933 5.724866,3.6517994 1.227526,1.3080077 1.560849,2.5641373 0.905838,3.4136451 z"
id="path3229-5"
style="fill:#ef2929;fill-opacity:1;stroke:#000000;stroke-width:1.03195608000000005;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:nodetypes="cssscsssc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.0 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 46 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@ -1,162 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48px"
height="48px"
id="svg2885"
version="1.1"
inkscape:version="0.47pre0 r21549"
sodipodi:docname="gramps-geo-mainmap.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<title
id="title2826">gramps-geo-mainmap</title>
<defs
id="defs2887">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective2893" />
<inkscape:perspective
id="perspective2870"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3668"
id="linearGradient3678"
x1="288.36801"
y1="423.65311"
x2="359.15457"
y2="423.65311"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient3668">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3670" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3672" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3668"
id="linearGradient2933"
gradientUnits="userSpaceOnUse"
x1="288.36801"
y1="423.65311"
x2="359.15457"
y2="423.65311" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7"
inkscape:cx="24"
inkscape:cy="35.428571"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1078"
inkscape:window-height="778"
inkscape:window-x="49"
inkscape:window-y="0"
inkscape:window-maximized="0" />
<metadata
id="metadata2890">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>gramps-geo-mainmap</dc:title>
<dc:date>2009-09-07</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Serge Noiraud</dc:title>
</cc:Agent>
</dc:creator>
<dc:description>used to select the openstreetmap map.</dc:description>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g2924"
transform="matrix(0.17199268,0,0,0.17199268,22.498415,21.978915)">
<path
sodipodi:nodetypes="cccssscccccccc"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path2453"
d="M -7.3280437,99.688239 C 52.392489,112.24117 40.973749,81.525559 40.973749,81.525559 l 29.48923,-19.77662 c 0,0 15.33285,1.24267 25.51172,0.55428 5.809741,-0.39292 15.582901,-6.08404 13.705391,-12.80082 C 102.59575,24.158229 66.496889,9.0898787 42.522839,7.9989287 c -11.82208,-0.53797 -17.1668,4.0514603 -17.1668,4.0514603 -8.95006,5.63522 0.50864,22.64179 0.50864,22.64179 L 2.3205863,58.062719 c -56.5463703,-4.60402 -28.7859003,28.67243 -28.7859003,28.67243 l -57.30311,53.256671 c 0,0 -0.50709,8.88643 15.73561,-0.0636 l 60.7047703,-40.239951 0,-3e-5 z" />
<g
transform="translate(-377.63439,-338.79656)"
style="fill:url(#linearGradient2933);fill-opacity:1"
id="g2893">
<path
d="M 319.44354,366.56878 292.72208,469.6616 c -2.1317,22.81794 12.07963,3.30695 12.07963,3.30695 l 50.2167,-93.83671 -35.57487,-12.56306 z"
id="path3225"
style="fill:#8ae234;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:nodetypes="ccccc" />
</g>
<path
sodipodi:nodetypes="csssssssc"
style="fill:#8ae234;fill-opacity:1;stroke:#000000;stroke-width:6;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path3227"
d="m 26.233499,22.655739 c -3.19176,8.00888 -12.17263,13.95644 -24.4071727,16.16357 -12.2345303,2.20713 -27.5720603,0.64666 -41.6825503,-4.24087 -14.11049,-4.88752 -26.82016,-13.0419 -34.54087,-22.16104 -7.72071,-9.1191303 -10.35737,-19.0907203 -7.16561,-27.0996 3.19176,-8.008884 14.51353,-11.713444 26.88494,-12.199134 14.55253,-0.57132 26.44444,0.74125 37.28908,4.40699 10.8446403,3.665744 20.6420203,9.684664 31.005483,18.5260437 9.08309,7.74905 15.80846,18.5951603 12.6167,26.6040403 z" />
<path
sodipodi:nodetypes="cccc"
style="fill:#8ae234;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.08262777;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3233"
d="m -40.487424,-67.046765 -18.05941,58.3595337 C -52.909284,12.866729 -9.8369237,26.548859 5.3993663,12.594929 L 27.104489,-38.965035" />
<path
sodipodi:nodetypes="cccc"
style="fill:#8ae234;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3231"
d="m -44.801154,-110.06678 -8.37934,22.182435 c 0.65991,29.40996 75.840293,61.52608 107.732193,40.77249 l 9.61302,-23.20386" />
<path
sodipodi:nodetypes="cssscsssc"
style="fill:#8ae234;fill-opacity:1;stroke:#000000;stroke-width:6;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path3229"
d="m 62.389519,-65.463465 c -3.80036,4.94256 -13.30111,7.46121 -25.81914,6.84467 -12.51803,-0.61655 -27.8990727,-4.36071 -41.7993327,-10.17507 -13.9002603,-5.81436 -26.1484503,-13.62728 -33.2855203,-21.23229 -7.13708,-7.60502 -10.0662,-14.412865 -6.25783,-19.352075 3.80036,-4.94256 14.29222,-7.95676 26.81025,-7.34022 12.5180303,0.61655 27.8990703,4.36071 41.799333,10.17507 13.90026,5.81436 26.14845,13.627285 33.28552,21.232295 7.13708,7.60502 9.07509,14.90841 5.26672,19.84762 z" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.5 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@ -25,7 +25,7 @@
# python modules
#------------------------------------------------
import os
from gramps.gen.const import VERSION_DIR
from gramps.gen.const import VERSION_DIR, IMAGE_DIR, DATA_DIR
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.sgettext
@ -47,11 +47,10 @@ def load_on_reg(dbstate, uistate, plugin):
"""
Runs when plugin is registered.
"""
dir, fname = os.path.split(__file__)
from functools import partial
path_css = partial(os.path.join, dir, "css")
path_img = partial(os.path.join, dir, "images")
path_js = partial(os.path.join, dir, "js")
path_css = partial(os.path.join, DATA_DIR, "css")
path_img = partial(os.path.join, IMAGE_DIR, "webstuff")
path_js = partial(os.path.join, DATA_DIR, "javascript")
CSS_FILES = [
# id, user selectable?, translated_name, option name, fullpath,
@ -160,7 +159,7 @@ def load_on_reg(dbstate, uistate, plugin):
# Document image
["Document", 0, "Document",
path_img("document.png"), None, [], [] ],
os.path.join(IMAGE_DIR, "document.png"), None, [], [] ],
# blank
["Blank", 0, "Blank",

View File

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 457 B

View File

Before

Width:  |  Height:  |  Size: 454 B

After

Width:  |  Height:  |  Size: 454 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 338 KiB

After

Width:  |  Height:  |  Size: 338 KiB

View File

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

View File

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 193 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 654 B

After

Width:  |  Height:  |  Size: 654 B

View File

Before

Width:  |  Height:  |  Size: 969 B

After

Width:  |  Height:  |  Size: 969 B

View File

Before

Width:  |  Height:  |  Size: 957 B

After

Width:  |  Height:  |  Size: 957 B

View File

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 678 B

View File

Before

Width:  |  Height:  |  Size: 951 B

After

Width:  |  Height:  |  Size: 951 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -72,10 +72,6 @@
${prefix}/lib/enchant
</binary>
<binary>
${prefix}/lib/libgettextpo.0.dylib
</binary>
<binary>
${prefix}/lib/libosmgpsmap.3.dylib
</binary>

View File

@ -3880,11 +3880,11 @@ msgstr "Âge"
#: ../gramps/gen/lib/attrtype.py:75
msgid "Father's Age"
msgstr "Âge du père"
msgstr "Âge du mari / compagnon"
#: ../gramps/gen/lib/attrtype.py:76
msgid "Mother's Age"
msgstr "Âge de la mère"
msgstr "Âge de la femme / compagne"
#: ../gramps/gen/lib/attrtype.py:77
#: ../gramps/gen/lib/eventroletype.py:66
@ -31137,7 +31137,7 @@ msgstr "<b>Organisation des vues</b><br/>Quelques vues peuvent représenter vos
#: ../gramps/data/tips.xml.in.h:23
msgid "<b>Navigating Back and Forward</b><br/>Gramps maintains a list of previous active objects such as People, Events and . You can move forward and backward through the list using &quot;Go &gt; Forward&quot; and &quot;Go &gt; Back&quot; or the arrow buttons."
msgstr "<b>Navigation Précédent et Suivant</b><br/>Gramps conserve une liste des objets actifs tels que les individus, événements lorsque vous naviguez dans votre base de données. Vous pouvez avancer et reculer dans la liste à l'aide de « Aller à &gt; Suivant&quot; et &quot;Aller à &gt; Précédent »."
msgstr "<b>Navigation Précédent et Suivant</b><br/>Gramps conserve une liste des objets actifs tels que les individus, événements lorsque vous naviguez dans votre base de données. Vous pouvez avancer et reculer dans la liste à l'aide de « Aller à &gt; Suivant&quot; et &quot;Aller à &gt; Précédent »."
#: ../gramps/data/tips.xml.in.h:24
msgid "<b>Keyboard Shortcuts</b><br/>Tired of having to take your hand off the keyboard to use the mouse? Many functions in Gramps have keyboard shortcuts. If one exists for a function it is displayed on the right side of the menu."

439
po/ru.po

File diff suppressed because it is too large Load Diff

View File

@ -49,8 +49,8 @@ from stat import ST_MODE
import io
from gramps.version import VERSION
ALL_LINGUAS = ('bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es', 'fi', 'fr', 'he',
'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR',
ALL_LINGUAS = ('ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'es', 'fi', 'fr',
'he', 'hr', 'hu', 'it', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR',
'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sv', 'uk', 'vi', 'zh_CN')
INTLTOOL_FILES = ('data/tips.xml', 'gramps/plugins/lib/holidays.xml')
@ -358,13 +358,6 @@ for (dirpath, dirnames, filenames) in os.walk(basedir):
#we add to data_list so glade , xml, files are found, we don't need the gramps/ part
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.glade')
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.xml')
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.png')
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.svg')
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.css')
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.html')
package_data_core.append(dirpath[7:] + '/' + dirname + '/*.js')
package_data_core.append('plugins/webstuff/images/*.gif')
package_data_core.append('plugins/webstuff/images/*.ico')
package_data_core.append('gen/utils/resource-path')
package_data_gui = ['gui/glade/*.glade']
@ -387,9 +380,20 @@ DOC_FILES = ['AUTHORS', 'COPYING', 'FAQ', 'INSTALL', 'LICENSE', 'NEWS',
'README', 'TODO']
GEDCOM_FILES = glob.glob(os.path.join('example', 'gedcom', '*.*'))
GRAMPS_FILES = glob.glob(os.path.join('example', 'gramps', '*.*'))
IMAGE_WEB = glob.glob(os.path.join('images', 'webstuff', '*.png'))
IMAGE_WEB.extend(glob.glob(os.path.join('images', 'webstuff','*.ico')))
IMAGE_WEB.extend(glob.glob(os.path.join('images', 'webstuff', '*.gif')))
JS_FILES = glob.glob(os.path.join('data', 'javascript', '*.js'))
CSS_FILES = glob.glob(os.path.join('data', 'css', '*.css'))
SWANKY_PURSE = glob.glob(os.path.join('data', 'css', 'swanky-purse', '*.css'))
SWANKY_IMG = glob.glob(os.path.join('data', 'css', 'swanky-purse', 'images', '*.png'))
data_files_core.append(('share/doc/gramps', DOC_FILES))
data_files_core.append(('share/doc/gramps/example/gedcom', GEDCOM_FILES))
data_files_core.append(('share/doc/gramps/example/gramps', GRAMPS_FILES))
data_files_core.append(('share/doc/gramps/example/gramps', GRAMPS_FILES))
data_files_core.append(('share/gramps/images/webstuff', IMAGE_WEB))
data_files_core.append(('share/gramps/css', CSS_FILES))
data_files_core.append(('share/gramps/css/swanky-purse', SWANKY_PURSE))
data_files_core.append(('share/gramps/css/swanky-purse/images', SWANKY_IMG))
PNG_FILES = glob.glob(os.path.join('data', '*.png'))
SVG_FILES = glob.glob(os.path.join('data', '*.svg'))

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/GrampsDb/Cursor_Test.py
# $Id$
import unittest
import logging
import os

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/GrampsDb/GrampsDbBase_Test.py
# $Id$
import unittest
import logging
import os

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/GrampsDb/GrampsDbTestBase.py
# $Id$
import unittest
import logging
import os

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/GrampsLogger/ErrorReportAssistant_Test.py
# $Id$
import unittest
import logging
import sys

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/GrampsLogger/GtkHandler_Test.py
# $Id$
import unittest
import logging
import sys

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/GrampsLogger/RotateLogger_Test.py
# $Id$
import unittest
import logging
import sys

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/LosHawlos_bsddbtest.py
# $Id$
from bsddb import dbshelve, db
import os
import sys

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/LosHawlos_dbtest.py
# $Id$
import os
import tempfile
import shutil

View File

@ -1,3 +1,26 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# test/RelLib/RelLib_Test.py
# $Id$
import unittest
import logging
import os

View File

@ -3,7 +3,7 @@
# Date Handler test for GRAMPS:
# o Run date_test.py for every available locale.
# $Id: dates.sh,v 1.1.2.2 2006/04/15 20:21:03 loshawlos Exp $
# $Id$
TOP_DIR=`dirname $PWD`
SRC_DIR=$TOP_DIR/src