Merge in changes from Gramps50
This commit is contained in:
commit
263a082afe
@ -330,6 +330,10 @@ table.IndividualList td.ColumnSurname {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
----------------------------------------------------- */
|
||||
#GalleryNav {
|
||||
|
@ -489,7 +489,7 @@ table.eventlist tbody tr td.ColumnNotes {
|
||||
width: 20%;
|
||||
}
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 17%;
|
||||
width: 5%;
|
||||
}
|
||||
table.eventlist tbody tr td.ColumnPerson {
|
||||
width: 35%;
|
||||
|
@ -373,6 +373,10 @@ table.IndividualList td.ColumnSurname {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
----------------------------------------------------- */
|
||||
#GalleryNav {
|
||||
|
@ -366,6 +366,10 @@ table.IndividualList td.ColumnSurname {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
----------------------------------------------------- */
|
||||
#GalleryNav {
|
||||
|
@ -366,6 +366,10 @@ table.IndividualList td.ColumnSurname {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
----------------------------------------------------- */
|
||||
#GalleryNav {
|
||||
|
@ -366,6 +366,10 @@ table.IndividualList td.ColumnSurname {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
----------------------------------------------------- */
|
||||
#GalleryNav {
|
||||
|
@ -32,7 +32,6 @@ body {
|
||||
background-color: #00029D;
|
||||
color: #00029D;
|
||||
width: 100%;
|
||||
padding: 0px 14px;
|
||||
}
|
||||
|
||||
/* Navigation Menus
|
||||
|
@ -312,6 +312,10 @@ table#SortByCount thead th.ColumnQuantity a:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
-----------------------------------------------------------------*/
|
||||
#GalleryNav {
|
||||
|
@ -576,6 +576,10 @@ table.relationships tbody tr td.ColumnPartner a:hover {
|
||||
content: "";
|
||||
}
|
||||
|
||||
table.eventlist tbody tr td.ColumnSources {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
/* Gallery
|
||||
----------------------------------------------------- */
|
||||
#Gallery { }
|
||||
|
@ -328,7 +328,7 @@ if not os.path.exists(CONFIGMAN.filename):
|
||||
# check previous version of gramps:
|
||||
fullpath, filename = os.path.split(CONFIGMAN.filename)
|
||||
fullpath, previous = os.path.split(fullpath)
|
||||
match = re.match('gramps(\d*)', previous)
|
||||
match = re.match(r'gramps(\d*)', previous)
|
||||
if match:
|
||||
# cycle back looking for previous versions of gramps
|
||||
for i in range(1, 20): # check back 2 gramps versions
|
||||
|
@ -124,12 +124,12 @@ class DateParserAR(DateParser):
|
||||
_span_2 = ['إلى']
|
||||
_range_1 = ['بين']
|
||||
_range_2 = ['و']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -166,12 +166,12 @@ class DateParserBG(DateParser):
|
||||
_span_2 = ['до']
|
||||
_range_1 = ['между']
|
||||
_range_2 = ['и']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -98,14 +98,14 @@ class DateParserCA(DateParser):
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = ['des de']
|
||||
_span_2 = ['fins a']
|
||||
_range_1 = ['entre', 'ent\.', 'ent']
|
||||
_range_1 = ['entre', r'ent\.', 'ent']
|
||||
_range_2 = ['i']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -89,10 +89,11 @@ class DateParserDa(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
self._span = re.compile("(fra)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(mellem)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(fra)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(mellem)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -248,14 +248,16 @@ class DateParserDE(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
self._span = re.compile("(von|vom)\s+(?P<start>.+)\s+(bis)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("zwischen\s+(?P<start>.+)\s+und\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(von|vom)\s+(?P<start>.+)\s+(bis)\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"zwischen\s+(?P<start>.+)\s+und\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
self._text2 = re.compile(
|
||||
r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile(
|
||||
r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -116,14 +116,14 @@ class DateParserEL(DateParser):
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = ['από']
|
||||
_span_2 = ['έως']
|
||||
_range_1 = ['μετ', 'μετ\.', 'μεταξύ']
|
||||
_range_1 = ['μετ', r'μετ\.', 'μεταξύ']
|
||||
_range_2 = ['και']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -97,14 +97,14 @@ class DateParserES(DateParser):
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = ['de']
|
||||
_span_2 = ['a']
|
||||
_range_1 = ['entre', 'ent\.', 'ent']
|
||||
_range_1 = ['entre', r'ent\.', 'ent']
|
||||
_range_2 = ['y']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -98,12 +98,12 @@ class DateParserFI(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
self._text2 = re.compile('(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._span = re.compile("(?P<start>.+)\s+(-)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile(r'(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._span = re.compile(r"(?P<start>.+)\s+(-)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
"(vuosien\s*)?(?P<start>.+)\s+ja\s+(?P<stop>.+)\s+välillä",
|
||||
r"(vuosien\s*)?(?P<start>.+)\s+ja\s+(?P<stop>.+)\s+välillä",
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -79,15 +79,27 @@ class DateParserHR(DateParser):
|
||||
#~ 'персидский' : Date.CAL_PERSIAN,
|
||||
#~ 'п' : Date.CAL_PERSIAN,
|
||||
#~ })
|
||||
|
||||
# match 'Day. MONTH year.' format with or without dots
|
||||
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
|
||||
# match Day.Month.Year.
|
||||
self._numeric = re.compile(
|
||||
r"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
|
||||
|
||||
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
|
||||
_span_1 = ['od']
|
||||
_span_2 = ['do']
|
||||
_range_1 = ['između']
|
||||
_range_2 = ['i']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -105,11 +117,35 @@ class DateDisplayHR(DateDisplay):
|
||||
|
||||
display = DateDisplay.display_formatted
|
||||
|
||||
def format_short_month_year(self, month, year, inflect, short_months):
|
||||
""" Allow a subclass to modify the year, e.g. add a period """
|
||||
if not hasattr(short_months[1], 'f'): # not a Lexeme: no inflection
|
||||
return "{short_month} {year}.".format(
|
||||
short_month = short_months[month], year = year)
|
||||
return self.FORMATS_short_month_year[inflect].format(
|
||||
short_month = short_months[month], year = year)
|
||||
|
||||
def _get_localized_year(self, year):
|
||||
""" Allow a subclass to modify the year, e.g. add a period """
|
||||
return year + '.'
|
||||
|
||||
# FIXME probably there should be a Croatian-specific "formats" (and this
|
||||
# ("American comma") format (and dd_dformat03 too) should be eliminated)
|
||||
def dd_dformat02(self, date_val, inflect, long_months):
|
||||
""" month_name day, year """
|
||||
return DateDisplay.dd_dformat02(
|
||||
self, date_val, inflect, long_months).replace(' .', '')
|
||||
|
||||
def dd_dformat04(self, date_val, inflect, long_months):
|
||||
""" day month_name year """
|
||||
return DateDisplay.dd_dformat04(
|
||||
self, date_val, inflect, long_months).replace(' .', '')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(
|
||||
('hr_HR', 'hr', 'HR', 'croatian', 'Croatian', 'hrvatski', ('%d.%m.%Y',)),
|
||||
('hr_HR', 'hr', 'HR', 'croatian', 'Croatian', 'hrvatski', ('%d.%m.%Y.',)),
|
||||
DateParserHR, DateDisplayHR)
|
||||
|
@ -228,19 +228,19 @@ class DateParserHU(DateParser):
|
||||
DateParser.init_strings(self)
|
||||
|
||||
self._numeric = re.compile(
|
||||
"((\d+)[/\.])?\s*((\d+)[/\.])?\s*(\d+)[/\. ]?$")
|
||||
r"((\d+)[/\.])?\s*((\d+)[/\.])?\s*(\d+)[/\. ]?$")
|
||||
# this next RE has the (possibly-slashed) year at the string's start
|
||||
self._text2 = re.compile('((\d+)(/\d+)?\.)?\s+?%s\.?\s*(\d+\.)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
_span_1 = ['-tó\(ő\)l', '-tól', '-től']
|
||||
self._text2 = re.compile(r'((\d+)(/\d+)?\.)?\s+?%s\.?\s*(\d+\.)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
_span_1 = [r'-tó\(ő\)l', '-tól', '-től']
|
||||
_span_2 = ['-ig']
|
||||
_range_1 = ['és']
|
||||
_range_2 = ['között']
|
||||
self._span = re.compile("(?P<start>.+)(%s)\s+(?P<stop>.+)(%s)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(?P<start>.+)\s+(%s)\s+(?P<stop>.+)\s+(%s)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(?P<start>.+)(%s)\s+(?P<stop>.+)(%s)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(?P<start>.+)\s+(%s)\s+(?P<stop>.+)\s+(%s)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
|
||||
|
@ -90,22 +90,23 @@ class DateParserIs(DateParser):
|
||||
}
|
||||
|
||||
def dhformat_changed(self):
|
||||
self._dhformat_parse = re.compile(".*%(\S).*%(\S).*%(\S).*%(\S).*")
|
||||
self._dhformat_parse = re.compile(r".*%(\S).*%(\S).*%(\S).*%(\S).*")
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
|
||||
# match 'day. month year' format
|
||||
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
# match 'short-day day.month year' format
|
||||
short_day_str = '(' + '|'.join(self._ds.short_days[1:]) + ')'
|
||||
self._numeric = re.compile("%s\s*((\d+)[\.]\s*)?((\d+)\s*)?(\d+)\s*$"
|
||||
self._numeric = re.compile(r"%s\s*((\d+)[\.]\s*)?((\d+)\s*)?(\d+)\s*$"
|
||||
% short_day_str, re.IGNORECASE)
|
||||
self._span = re.compile("(frá)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(milli)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(frá)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(milli)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -185,7 +186,8 @@ class DateDisplayIs(DateDisplay):
|
||||
text, scal)
|
||||
|
||||
def _get_weekday(self, date_val):
|
||||
if date_val[0] == 0 or date_val[1] == 0: # no day or no month or both
|
||||
if (date_val[0] == 0 or date_val[1] == 0 # no day or no month or both
|
||||
or date_val[2] > datetime.MAXYEAR): # bug 10815
|
||||
return ''
|
||||
w_day = datetime.date(date_val[2], date_val[1], date_val[0]) # y, m, d
|
||||
return self.short_days[((w_day.weekday() + 1) % 7) + 1]
|
||||
|
@ -96,12 +96,12 @@ class DateParserIT(DateParser):
|
||||
_span_2 = ['al', 'a']
|
||||
_range_1 = ['tra', 'fra']
|
||||
_range_2 = ['e']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -166,13 +166,13 @@ class DateParserJA(DateParser):
|
||||
_span_2 = ['まで', '']
|
||||
_range_1 = ['から', 'と', '~', '〜']
|
||||
_range_2 = ['までの間', 'の間']
|
||||
self._span = re.compile("(?P<start>.+)(%s)(?P<stop>\d+)(%s)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(?P<start>.+)(%s)(?P<stop>.+)(%s)" %
|
||||
self._span = re.compile(r"(?P<start>.+)(%s)(?P<stop>\d+)(%s)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(?P<start>.+)(%s)(?P<stop>.+)(%s)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile("((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
|
||||
self._numeric = re.compile(r"((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -131,18 +131,19 @@ class DateParserLT(DateParser):
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
# this next RE has the (possibly-slashed) year at the string's start
|
||||
self._text2 = re.compile('((\d+)(/\d+)?)?\s+?m\.\s+%s\s*(\d+)?\s*d?\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._text2 = re.compile(
|
||||
r'((\d+)(/\d+)?)?\s+?m\.\s+%s\s*(\d+)?\s*d?\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
_span_1 = ['nuo']
|
||||
_span_2 = ['iki']
|
||||
_range_1 = ['tarp']
|
||||
_range_2 = ['ir']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -58,6 +58,7 @@ class DateParserNb(DateParser):
|
||||
'innen' : Date.MOD_BEFORE,
|
||||
'etter' : Date.MOD_AFTER,
|
||||
'omkring' : Date.MOD_ABOUT,
|
||||
'omtrent' : Date.MOD_ABOUT,
|
||||
'ca' : Date.MOD_ABOUT
|
||||
}
|
||||
|
||||
@ -89,12 +90,13 @@ class DateParserNb(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
# match day. month year
|
||||
self._numeric = re.compile("((\d+)[\.])?\s*((\d+))?\s*(\d+)$")
|
||||
self._span = re.compile("(fra)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(mellom)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile(
|
||||
r"((\d+)[/\.\s]\s*)?((\d+)[/\.\-\s]\s*)?(\d+)\s*$")
|
||||
self._span = re.compile(
|
||||
r"(fra)?\s*(?P<start>.+)\s*(til|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(mellom)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -173,6 +175,10 @@ class DateDisplayNb(DateDisplay):
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod],
|
||||
text, scal)
|
||||
|
||||
def dd_dformat01(self, date_val):
|
||||
""" numerical -- for Norwegian dates """
|
||||
return DateDisplay.dd_dformat01(self, date_val).lstrip()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
|
@ -119,16 +119,14 @@ class DateParserNL(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
self._span = re.compile("(van)\s+(?P<start>.+)\s+(tot)\s+(?P<stop>.+)",
|
||||
self._span = re.compile(
|
||||
r"(van)\s+(?P<start>.+)\s+(tot)\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
self._range = re.compile(r"tussen\s+(?P<start>.+)\s+en\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("tussen\s+(?P<start>.+)\s+en\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -156,13 +156,16 @@ class DateParserPL(DateParser):
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
self._span = re.compile("(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
# Also handle a common mistakes
|
||||
self._range = re.compile("((?:po)?mi(?:ę|e)dzy)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"((?:po)?mi(?:ę|e)dzy)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -102,13 +102,13 @@ class DateParserPT(DateParser):
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = ['de']
|
||||
_span_2 = ['a']
|
||||
_range_1 = ['entre','ent\.','ent']
|
||||
_range_1 = ['entre', r'ent\.', 'ent']
|
||||
_range_2 = ['e']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -94,13 +94,13 @@ class DateParserRU(DateParser):
|
||||
_span_1 = ['с', 'от']
|
||||
#_span_2 = ['по', 'до'] # <-- clashes with bce parsing :-(
|
||||
_span_2 = ['по']
|
||||
_range_1 = ['между', 'меж\.', 'меж']
|
||||
_range_1 = ['между', r'меж\.', 'меж']
|
||||
_range_2 = ['и']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -86,11 +86,11 @@ class DateParserSK(DateParser):
|
||||
_span_2 = ['do']
|
||||
_range_1 = ['medzi']
|
||||
_range_2 = ['a']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -88,18 +88,18 @@ class DateParserSL(DateParser):
|
||||
|
||||
DateParser.init_strings(self)
|
||||
# match 'Day. MONTH year.' format with or without dots
|
||||
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
# match Day.Month.Year.
|
||||
self._numeric = re.compile("((\d+)[/\.-])?\s*((\d+)[/\.-])?\s*(\d+)\.?$")
|
||||
self._numeric = re.compile(
|
||||
r"((\d+)[/\.-])?\s*((\d+)[/\.-])?\s*(\d+)\.?$")
|
||||
|
||||
self._span = re.compile("od\s+(?P<start>.+)\s+do\s+(?P<stop>.+)",
|
||||
self._span = re.compile(r"od\s+(?P<start>.+)\s+do\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
"med\s+(?P<start>.+)\s+in\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'\
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
r"med\s+(?P<start>.+)\s+in\s+(?P<stop>.+)", re.IGNORECASE)
|
||||
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -208,21 +208,22 @@ class DateParserSR(DateParser):
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
# match 'Day. MONTH year.' format with or without dots
|
||||
self._text2 = re.compile('(\d+)?\.?\s*?%s\s*((\d+)(/\d+)?)?\.?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\s*((\d+)(/\d+)?)?\.?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
|
||||
# match Day.Month.Year.
|
||||
self._numeric = re.compile("((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
|
||||
self._numeric = re.compile(
|
||||
r"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
|
||||
|
||||
_span_1 = ['od', 'од']
|
||||
_span_2 = ['do', 'до']
|
||||
_range_1 = ['između', 'између']
|
||||
_range_2 = ['i', 'и']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -95,14 +95,16 @@ class DateParserSv(DateParser):
|
||||
def init_strings(self):
|
||||
""" Define, in Swedish, span and range regular expressions"""
|
||||
DateParser.init_strings(self)
|
||||
self._numeric = re.compile("((\d+)/)?\s*((\d+)/)?\s*(\d+)[/ ]?$")
|
||||
self._numeric = re.compile(r"((\d+)/)?\s*((\d+)/)?\s*(\d+)[/ ]?$")
|
||||
# this next RE has the (possibly-slashed) year at the string's start
|
||||
self._text2 = re.compile('((\d+)(/\d+)?)?\s+?%s\s*(\d+)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._span = re.compile("(från)?\s*(?P<start>.+)\s*(till|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(mellan)\s+(?P<start>.+)\s+och\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile(r'((\d+)(/\d+)?)?\s+?%s\s*(\d+)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._span = re.compile(
|
||||
r"(från)?\s*(?P<start>.+)\s*(till|--|–)\s*(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(mellan)\s+(?P<start>.+)\s+och\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -108,14 +108,14 @@ class DateParserUK(DateParser):
|
||||
|
||||
_span_1 = ['з', 'від']
|
||||
# b.c.e. pattern also have "до" so skip "до н."
|
||||
_span_2 = ['по', 'до(?!\s+н)']
|
||||
_span_2 = ['по', r'до(?!\s+н)']
|
||||
_range_1 = ['між']
|
||||
_range_2 = ['і', 'та']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
|
||||
% ('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -124,13 +124,13 @@ class DateParserZH_CN(DateParser):
|
||||
_span_2 = ['至']
|
||||
_range_1 = ['介于']
|
||||
_range_2 = ['与']
|
||||
self._span = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
self._span = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile("((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
|
||||
self._numeric = re.compile(r"((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -124,13 +124,13 @@ class DateParserZH_TW(DateParser):
|
||||
_span_2 = ['至']
|
||||
_range_1 = ['介於']
|
||||
_range_2 = ['與']
|
||||
self._span = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
self._span = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile("((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
|
||||
self._numeric = re.compile(r"((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||
# Copyright (C) 2013 Vassilii Khachaturov
|
||||
# Copyright (C) 2014-2017 Paul Franklin
|
||||
# Copyright (C) 2014-2018 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
|
||||
@ -570,6 +570,7 @@ class DateDisplay:
|
||||
def _get_short_weekday(self, date_val):
|
||||
if (date_val[0] == 0 or date_val[1] == 0 # no day or no month or both
|
||||
or date_val[1] == 13 # Hebrew has 13 months
|
||||
or date_val[2] > datetime.MAXYEAR # bug 10815
|
||||
or date_val[2] < 0): # B.C.E. date
|
||||
return ''
|
||||
w_day = datetime.date(date_val[2], date_val[1], date_val[0]) # y, m, d
|
||||
@ -578,11 +579,16 @@ class DateDisplay:
|
||||
def _get_long_weekday(self, date_val):
|
||||
if (date_val[0] == 0 or date_val[1] == 0 # no day or no month or both
|
||||
or date_val[1] == 13 # Hebrew has 13 months
|
||||
or date_val[2] > datetime.MAXYEAR # bug 10815
|
||||
or date_val[2] < 0): # B.C.E. date
|
||||
return ''
|
||||
w_day = datetime.date(date_val[2], date_val[1], date_val[0]) # y, m, d
|
||||
return self.long_days[((w_day.weekday() + 1) % 7) + 1]
|
||||
|
||||
def _get_localized_year(self, year):
|
||||
""" Allow a subclass to modify the year, e.g. add a period """
|
||||
return year
|
||||
|
||||
def dd_dformat01(self, date_val):
|
||||
"""
|
||||
numerical
|
||||
@ -594,19 +600,23 @@ class DateDisplay:
|
||||
return self.display_iso(date_val)
|
||||
else:
|
||||
if date_val[0] == date_val[1] == 0:
|
||||
return str(date_val[2])
|
||||
return self._get_localized_year(str(date_val[2]))
|
||||
else:
|
||||
value = self.dhformat.replace('%m', str(date_val[1]))
|
||||
# some locales have %b for the month, e.g. ar_EG, is_IS, nb_NO
|
||||
# so it would be "Jan" but as it's "numeric" I'll make it "1"
|
||||
value = value.replace('%b', str(date_val[1]))
|
||||
# some locales have %B for the month, e.g. ta_IN
|
||||
# so it would be "January" but as it's "numeric" I'll make it 1
|
||||
value = value.replace('%B', str(date_val[1]))
|
||||
# some locales have %a for the abbreviated day, e.g. is_IS
|
||||
value = value.replace('%a', self._get_short_weekday(date_val))
|
||||
# some locales have %A for the long/full day, e.g. ta_IN
|
||||
value = value.replace('%A', self._get_long_weekday(date_val))
|
||||
if '%b' in value or '%B' in value:
|
||||
# some locales have %b for the month (ar_EG, is_IS, nb_NO)
|
||||
# so it would be "Jan" but as it's "numeric" make it "1"
|
||||
value = value.replace('%b', str(date_val[1]))
|
||||
# some locales have %B for the month, e.g. ta_IN
|
||||
# so it would be "January" but as it's "numeric" make it 1
|
||||
value = value.replace('%B', str(date_val[1]))
|
||||
if '%a' in value or '%A' in value:
|
||||
# some locales have %a for the abbreviated day, e.g. is_IS
|
||||
value = value.replace('%a',
|
||||
self._get_short_weekday(date_val))
|
||||
# some locales have %A for the long/full day, e.g. ta_IN
|
||||
value = value.replace('%A',
|
||||
self._get_long_weekday(date_val))
|
||||
if date_val[0] == 0: # ignore the zero day and its delimiter
|
||||
i_day = value.find('%d')
|
||||
if len(value) == i_day + 2: # delimiter is left of the day
|
||||
@ -628,7 +638,7 @@ class DateDisplay:
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
return year
|
||||
return self._get_localized_year(year)
|
||||
else:
|
||||
return self.format_long_month_year(date_val[1], year,
|
||||
inflect, long_months)
|
||||
@ -654,7 +664,7 @@ class DateDisplay:
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
return year
|
||||
return self._get_localized_year(year)
|
||||
else:
|
||||
return self.format_short_month_year(date_val[1], year,
|
||||
inflect, short_months)
|
||||
@ -680,7 +690,7 @@ class DateDisplay:
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
return year
|
||||
return self._get_localized_year(year)
|
||||
else:
|
||||
return self.format_long_month_year(date_val[1], year,
|
||||
inflect, long_months)
|
||||
@ -706,7 +716,7 @@ class DateDisplay:
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
return year
|
||||
return self._get_localized_year(year)
|
||||
else:
|
||||
return self.format_short_month_year(date_val[1], year,
|
||||
inflect, short_months)
|
||||
|
@ -193,7 +193,7 @@ class DateParser:
|
||||
converted, the text string is assigned.
|
||||
"""
|
||||
|
||||
_dhformat_parse = re.compile(".*%(\S).*%(\S).*%(\S).*")
|
||||
_dhformat_parse = re.compile(r".*%(\S).*%(\S).*%(\S).*")
|
||||
|
||||
# RFC-2822 only uses capitalized English abbreviated names, no locales.
|
||||
_rfc_days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')
|
||||
@ -423,63 +423,69 @@ class DateParser:
|
||||
# bce, calendar type and quality may be either at the end or at
|
||||
# the beginning of the given date string, therefore they will
|
||||
# be parsed from the middle and will be in match.group(2).
|
||||
self._bce_re = re.compile("(.*)\s+%s( ?.*)" % self._bce_str)
|
||||
self._bce_re = re.compile(r"(.*)\s+%s( ?.*)" % self._bce_str)
|
||||
|
||||
self._cal = re.compile("(.*)\s+\(%s\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
self._calny = re.compile("(.*)\s+\(%s,\s*%s\)( ?.*)" % (self._cal_str,
|
||||
self._ny_str),
|
||||
re.IGNORECASE)
|
||||
self._calny_iso = re.compile("(.*)\s+\(%s,\s*(\d{1,2}-\d{1,2})\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
self._cal = re.compile(r"(.*)\s+\(%s\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
self._calny = re.compile(r"(.*)\s+\(%s,\s*%s\)( ?.*)" %
|
||||
(self._cal_str, self._ny_str), re.IGNORECASE)
|
||||
self._calny_iso = re.compile(
|
||||
r"(.*)\s+\(%s,\s*(\d{1,2}-\d{1,2})\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
|
||||
self._ny = re.compile("(.*)\s+\(%s\)( ?.*)" % self._ny_str,
|
||||
re.IGNORECASE)
|
||||
self._ny_iso = re.compile("(.*)\s+\((\d{1,2}-\d{1,2})\)( ?.*)")
|
||||
self._ny = re.compile(r"(.*)\s+\(%s\)( ?.*)" % self._ny_str,
|
||||
re.IGNORECASE)
|
||||
self._ny_iso = re.compile(r"(.*)\s+\((\d{1,2}-\d{1,2})\)( ?.*)")
|
||||
|
||||
self._qual = re.compile("(.* ?)%s\s+(.+)" % self._qual_str,
|
||||
re.IGNORECASE)
|
||||
self._qual = re.compile(r"(.* ?)%s\s+(.+)" % self._qual_str,
|
||||
re.IGNORECASE)
|
||||
|
||||
self._span = re.compile("(from)\s+(?P<start>.+)\s+to\s+(?P<stop>.+)",
|
||||
self._span = re.compile(r"(from)\s+(?P<start>.+)\s+to\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
r"(bet|bet.|between)\s+(?P<start>.+)\s+and\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._modifier = re.compile(r'%s\s+(.*)' % self._mod_str,
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(bet|bet.|between)\s+(?P<start>.+)\s+and\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._modifier = re.compile('%s\s+(.*)' % self._mod_str,
|
||||
re.IGNORECASE)
|
||||
self._modifier_after = re.compile('(.*)\s+%s' % self._mod_after_str,
|
||||
self._modifier_after = re.compile(r'(.*)\s+%s' % self._mod_after_str,
|
||||
re.IGNORECASE)
|
||||
self._abt2 = re.compile('<(.*)>', re.IGNORECASE)
|
||||
self._text = re.compile('%s\.?(\s+\d+)?\s*,?\s+((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._abt2 = re.compile('<(.*)>', re.IGNORECASE)
|
||||
self._text = re.compile(r'%s\.?(\s+\d+)?\s*,?\s+((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
# this next RE has the (possibly-slashed) year at the string's end
|
||||
self._text2 = re.compile('(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$' % self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ftext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._fmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ftext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._fmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ptext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._pmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ptext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._pmon_str,
|
||||
re.IGNORECASE)
|
||||
self._itext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
|
||||
re.IGNORECASE)
|
||||
self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
|
||||
re.IGNORECASE)
|
||||
self._stext = re.compile('%s\.?\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._smon_str,
|
||||
re.IGNORECASE)
|
||||
self._stext2 = re.compile('(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$' % self._smon_str,
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile("((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$")
|
||||
self._iso = re.compile("(\d+)(/(\d+))?-(\d+)-(\d+)\s*$")
|
||||
self._isotimestamp = re.compile("^\s*?(\d{4})([01]\d)([0123]\d)(?:(?:[012]\d[0-5]\d[0-5]\d)|(?:\s+[012]\d:[0-5]\d(?::[0-5]\d)?))?\s*?$")
|
||||
self._rfc = re.compile("(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+(\+|-)\d\d\d\d"
|
||||
% (self._rfc_day_str, self._rfc_mon_str))
|
||||
self._today = re.compile("^\s*%s\s*$" % self._today_str, re.IGNORECASE)
|
||||
self._text2 = re.compile(r'(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
self._jtext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
self._jtext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
self._ftext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._fmon_str, re.IGNORECASE)
|
||||
self._ftext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._fmon_str, re.IGNORECASE)
|
||||
self._ptext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._pmon_str, re.IGNORECASE)
|
||||
self._ptext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._pmon_str, re.IGNORECASE)
|
||||
self._itext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._imon_str, re.IGNORECASE)
|
||||
self._itext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._imon_str, re.IGNORECASE)
|
||||
self._stext = re.compile(r'%s\.?\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._smon_str, re.IGNORECASE)
|
||||
self._stext2 = re.compile(r'(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
|
||||
% self._smon_str, re.IGNORECASE)
|
||||
self._numeric = re.compile(
|
||||
r"((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$")
|
||||
self._iso = re.compile(r"(\d+)(/(\d+))?-(\d+)-(\d+)\s*$")
|
||||
self._isotimestamp = re.compile(
|
||||
r"^\s*?(\d{4})([01]\d)([0123]\d)(?:(?:[012]\d[0-5]\d[0-5]\d)|"
|
||||
r"(?:\s+[012]\d:[0-5]\d(?::[0-5]\d)?))?\s*?$")
|
||||
self._rfc = re.compile(
|
||||
r"(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+"
|
||||
r"(\+|-)\d\d\d\d" % (self._rfc_day_str, self._rfc_mon_str))
|
||||
self._today = re.compile(r"^\s*%s\s*$" % self._today_str,
|
||||
re.IGNORECASE)
|
||||
|
||||
def _get_int(self, val):
|
||||
"""
|
||||
|
@ -1059,13 +1059,13 @@ class NameDisplay:
|
||||
format_str = format_str[1:]
|
||||
else:
|
||||
patterns = [
|
||||
",\W*\"%(" + ("|".join(codes)) + ")\"", # ,\W*"%s"
|
||||
",\W*\(%(" + ("|".join(codes)) + ")\)", # ,\W*(%s)
|
||||
",\W*%(" + ("|".join(codes)) + ")", # ,\W*%s
|
||||
"\"%(" + ("|".join(codes)) + ")\"", # "%s"
|
||||
"_%(" + ("|".join(codes)) + ")_", # _%s_
|
||||
"\(%(" + ("|".join(codes)) + ")\)", # (%s)
|
||||
"%(" + ("|".join(codes)) + ")", # %s
|
||||
",\\W*\"%(" + ("|".join(codes)) + ")\"", # ,\W*"%s"
|
||||
",\\W*\\(%(" + ("|".join(codes)) + ")\\)", # ,\W*(%s)
|
||||
",\\W*%(" + ("|".join(codes)) + ")", # ,\W*%s
|
||||
"\"%(" + ("|".join(codes)) + ")\"", # "%s"
|
||||
"_%(" + ("|".join(codes)) + ")_", # _%s_
|
||||
"\\(%(" + ("|".join(codes)) + ")\\)", # (%s)
|
||||
"%(" + ("|".join(codes)) + ")", # %s
|
||||
]
|
||||
new_fmt = format_str
|
||||
|
||||
|
@ -35,7 +35,8 @@ import xml.dom.minidom
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..const import PLACE_FORMATS
|
||||
from ..const import PLACE_FORMATS, GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from ..config import config
|
||||
from ..utils.location import get_location_list
|
||||
from ..lib import PlaceType
|
||||
@ -72,7 +73,7 @@ class PlaceDisplay:
|
||||
if os.path.exists(PLACE_FORMATS):
|
||||
self.load_formats()
|
||||
else:
|
||||
pf = PlaceFormat('Full', ':', '', 0, False)
|
||||
pf = PlaceFormat(_('Full'), ':', '', 0, False)
|
||||
self.place_formats.append(pf)
|
||||
|
||||
def display_event(self, db, event, fmt=-1):
|
||||
|
@ -56,17 +56,17 @@ class ChangedSinceBase(Rule):
|
||||
category = _('General filters')
|
||||
|
||||
def add_time(self, date):
|
||||
if re.search("\d.*\s+\d{1,2}:\d{2}:\d{2}", date):
|
||||
if re.search(r"\d.*\s+\d{1,2}:\d{2}:\d{2}", date):
|
||||
return date
|
||||
elif re.search("\d.*\s+\d{1,2}:\d{2}", date):
|
||||
elif re.search(r"\d.*\s+\d{1,2}:\d{2}", date):
|
||||
return date + ":00"
|
||||
elif re.search("\d.*\s+\d{1,2}", date):
|
||||
elif re.search(r"\d.*\s+\d{1,2}", date):
|
||||
return date + ":00:00"
|
||||
elif re.search("\d{4}-\d{1,2}-\d{1,2}", date):
|
||||
elif re.search(r"\d{4}-\d{1,2}-\d{1,2}", date):
|
||||
return date + " 00:00:00"
|
||||
elif re.search("\d{4}-\d{1,2}", date):
|
||||
elif re.search(r"\d{4}-\d{1,2}", date):
|
||||
return date + "-01 00:00:00"
|
||||
elif re.search("\d{4}", date):
|
||||
elif re.search(r"\d{4}", date):
|
||||
return date + "-01-01 00:00:00"
|
||||
else:
|
||||
return date
|
||||
|
@ -520,11 +520,11 @@ class Place(CitationBase, NoteBase, MediaBase, UrlBase, PrimaryObject):
|
||||
Return a list of alternate :class:`~.location.Location` objects the
|
||||
present alternate information about the current Place.
|
||||
|
||||
A Place can have more than one :class:`~.location.Location`, since names
|
||||
and jurisdictions can change over time for the same place.
|
||||
A Place can have more than one :class:`~.location.Location`, since
|
||||
names and jurisdictions can change over time for the same place.
|
||||
|
||||
:returns: Returns the alternate :class:`~.location.Location`\ s for the
|
||||
Place
|
||||
:returns: Returns the alternate :class:`~.location.Location` objects
|
||||
for the Place
|
||||
:rtype: list of :class:`~.location.Location` objects
|
||||
"""
|
||||
return self.alt_loc
|
||||
|
@ -164,8 +164,16 @@ class MergeFamilyQuery:
|
||||
self.phoenix = self.database.get_family_from_handle(new_handle)
|
||||
self.titanic = self.database.get_family_from_handle(old_handle)
|
||||
|
||||
phoenix_father = self.database.get_person_from_handle(self.phoenix_fh)
|
||||
phoenix_mother = self.database.get_person_from_handle(self.phoenix_mh)
|
||||
if self.phoenix_fh:
|
||||
phoenix_father = self.database.get_person_from_handle(
|
||||
self.phoenix_fh)
|
||||
else:
|
||||
phoenix_father = None
|
||||
if self.phoenix_mh:
|
||||
phoenix_mother = self.database.get_person_from_handle(
|
||||
self.phoenix_mh)
|
||||
else:
|
||||
phoenix_mother = None
|
||||
self.phoenix = self.database.get_family_from_handle(new_handle)
|
||||
self.titanic = self.database.get_family_from_handle(old_handle)
|
||||
self.phoenix.merge(self.titanic)
|
||||
|
@ -85,7 +85,7 @@ def _get_extension(mime_type):
|
||||
extension = None
|
||||
try:
|
||||
hcr = ConnectRegistry(None, HKEY_CLASSES_ROOT)
|
||||
subkey = OpenKey(hcr, "MIME\DataBase\Content Type")
|
||||
subkey = OpenKey(hcr, r"MIME\DataBase\Content Type")
|
||||
mimekey = OpenKey(subkey, mime_type)
|
||||
extension, value_type = QueryValueEx(mimekey, "Extension")
|
||||
CloseKey(mimekey)
|
||||
|
@ -340,3 +340,4 @@ def add_place_format_option(menu, category):
|
||||
place_format.add_item(number, fmt.name)
|
||||
place_format.set_help(_("Select the format to display places"))
|
||||
menu.add_option(category, "place_format", place_format)
|
||||
return place_format
|
||||
|
@ -34,7 +34,7 @@ import unicodedata
|
||||
# constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
IGNORE = "HW~!@#$%^&*()_+=-`[]\|;:'/?.,<>\" \t\f\v"
|
||||
IGNORE = "HW~!@#$%^&*()_+=-`[]\\|;:'/?.,<>\" \t\f\v"
|
||||
TABLE = bytes.maketrans(b'ABCDEFGIJKLMNOPQRSTUVXYZ',
|
||||
b'012301202245501262301202')
|
||||
|
||||
|
@ -256,7 +256,7 @@ def get_participant_from_event(db, event_handle, all_=False):
|
||||
Obtain the first primary or family participant to an event we find in the
|
||||
database. Note that an event can have more than one primary or
|
||||
family participant, only one is returned, adding ellipses if there are
|
||||
more. If the all\_ parameter is true a comma-space separated string with
|
||||
more. If the all_ parameter is true a comma-space separated string with
|
||||
the names of all primary participants is returned and no ellipses is used.
|
||||
"""
|
||||
participant = ""
|
||||
|
@ -251,11 +251,17 @@ def create_checksum(full_path):
|
||||
Create a md5 hash for the given file.
|
||||
"""
|
||||
full_path = os.path.normpath(full_path)
|
||||
md5 = hashlib.md5()
|
||||
try:
|
||||
with open(full_path, 'rb') as media_file:
|
||||
md5sum = hashlib.md5(media_file.read()).hexdigest()
|
||||
while True:
|
||||
buf = media_file.read(65536)
|
||||
if not buf:
|
||||
break
|
||||
md5.update(buf)
|
||||
md5sum = md5.hexdigest()
|
||||
except IOError:
|
||||
md5sum = ''
|
||||
md5sum = ''
|
||||
except UnicodeEncodeError:
|
||||
md5sum = ''
|
||||
md5sum = ''
|
||||
return md5sum
|
||||
|
@ -143,8 +143,10 @@ class ColumnOrder(Gtk.Box):
|
||||
index = 0
|
||||
for val, size in zip(self.oldorder, self.oldsize):
|
||||
if val in self.oldvis:
|
||||
size = widths[index]
|
||||
index += 1
|
||||
if val != self.oldvis[-1]:
|
||||
# don't use last col width, its wrong
|
||||
size = widths[index]
|
||||
index += 1
|
||||
colord.append((1, val, size))
|
||||
else:
|
||||
colord.append((0, val, size))
|
||||
|
@ -1048,8 +1048,8 @@ def find_revisions(name):
|
||||
"""
|
||||
import re
|
||||
|
||||
rev = re.compile("\s*revision\s+([\d\.]+)")
|
||||
date = re.compile("date:\s+(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)[-+]\d\d;")
|
||||
rev = re.compile(r"\s*revision\s+([\d\.]+)")
|
||||
date = re.compile(r"date:\s+(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)[-+]\d\d;")
|
||||
|
||||
if not os.path.isfile(name) or not _RCS_FOUND:
|
||||
return []
|
||||
|
@ -142,7 +142,7 @@ class EditLink(ManagedWindow):
|
||||
def update_ui(self, widget):
|
||||
url = self.url_link.get_text()
|
||||
# text needs to have 3 or more chars://and at least one char
|
||||
match = re.match("\w{3,}://\w+", url)
|
||||
match = re.match(r"\w{3,}://\w+", url)
|
||||
if match:
|
||||
self.ok_button.set_sensitive(True)
|
||||
else:
|
||||
|
@ -179,8 +179,8 @@ class EditPlaceRef(EditReference):
|
||||
self.latitude.set_text(value[:coma])
|
||||
self.top.get_object("lat_entry").validate(force=True)
|
||||
self.top.get_object("lon_entry").validate(force=True)
|
||||
self.obj.set_latitude(self.latitude.get_value())
|
||||
self.obj.set_longitude(self.longitude.get_value())
|
||||
self.source.set_latitude(self.latitude.get_value())
|
||||
self.source.set_longitude(self.longitude.get_value())
|
||||
except:
|
||||
pass
|
||||
|
||||
|
@ -38,7 +38,6 @@ import os
|
||||
import time
|
||||
import datetime
|
||||
from io import StringIO
|
||||
import posixpath
|
||||
import gc
|
||||
import html
|
||||
|
||||
@ -1644,7 +1643,7 @@ class QuickBackup(ManagedWindow): # TODO move this class into its own module
|
||||
for media in self.dbstate.db.iter_media():
|
||||
fullname = media_path_full(self.dbstate.db, media.get_path())
|
||||
try:
|
||||
fbytes += posixpath.getsize(fullname)
|
||||
fbytes += os.path.getsize(fullname)
|
||||
length = len(str(fbytes))
|
||||
if fbytes <= 999999:
|
||||
mbytes = "< 1"
|
||||
|
@ -56,6 +56,7 @@ from ..uimanager import ActionGroup
|
||||
from gramps.gen.utils.db import navigation_label
|
||||
from gramps.gen.const import URL_MANUAL_PAGE
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
from gramps.gen.errors import HandleError
|
||||
_ = glocale.translation.sgettext
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -159,6 +160,7 @@ class Bookmarks(metaclass=ABCMeta):
|
||||
|
||||
actions = []
|
||||
count = 0
|
||||
bad_bookmarks = [] # list of bad bookmarks
|
||||
|
||||
if self.dbstate.is_open() and len(self.bookmarks.get()) > 0:
|
||||
text.write('<section id="GoToBook">\n')
|
||||
@ -172,6 +174,9 @@ class Bookmarks(metaclass=ABCMeta):
|
||||
count += 1
|
||||
except AttributeError:
|
||||
pass
|
||||
except HandleError:
|
||||
# if bookmark contains handle to something missing now
|
||||
bad_bookmarks.append(item)
|
||||
text.write('</section>\n')
|
||||
|
||||
self.action_group.add_actions(actions)
|
||||
@ -181,6 +186,10 @@ class Bookmarks(metaclass=ABCMeta):
|
||||
if update_menu:
|
||||
self.uistate.uimanager.update_menu()
|
||||
text.close()
|
||||
# Clean up any bad bookmarks (can happen if Gramps crashes;
|
||||
# modified bookmarks set is saved only on normal Gramps close)
|
||||
for handle in bad_bookmarks:
|
||||
self.bookmarks.remove(handle)
|
||||
|
||||
@abstractmethod
|
||||
def make_label(self, handle):
|
||||
|
@ -223,7 +223,13 @@ class ListView(NavigationView):
|
||||
('PRIMARY-J', self.jump, '<PRIMARY>J'),
|
||||
('FilterEdit', self.filter_editor)])
|
||||
|
||||
def build_columns(self):
|
||||
def build_columns(self, preserve_col=True):
|
||||
"""
|
||||
build the columns
|
||||
"""
|
||||
# Preserve the column widths if rebuilding the view.
|
||||
if self.columns and preserve_col:
|
||||
self.save_column_info()
|
||||
list(map(self.list.remove_column, self.columns))
|
||||
|
||||
self.columns = []
|
||||
@ -301,7 +307,7 @@ class ListView(NavigationView):
|
||||
NavigationView.set_inactive(self)
|
||||
self.uistate.viewmanager.tags.tag_disable()
|
||||
|
||||
def build_tree(self, force_sidebar=False):
|
||||
def build_tree(self, force_sidebar=False, preserve_col=True):
|
||||
if self.active:
|
||||
cput0 = time.clock()
|
||||
if not self.search_bar.is_visible():
|
||||
@ -330,7 +336,7 @@ class ListView(NavigationView):
|
||||
parent=self.uistate.window)
|
||||
|
||||
cput1 = time.clock()
|
||||
self.build_columns()
|
||||
self.build_columns(preserve_col)
|
||||
cput2 = time.clock()
|
||||
self.list.set_model(self.model)
|
||||
cput3 = time.clock()
|
||||
@ -507,7 +513,7 @@ class ListView(NavigationView):
|
||||
self.sort_col = 0
|
||||
self.sort_order = Gtk.SortType.ASCENDING
|
||||
self.setup_filter()
|
||||
self.build_tree()
|
||||
self.build_tree(preserve_col=False)
|
||||
|
||||
def column_order(self):
|
||||
"""
|
||||
@ -1020,19 +1026,26 @@ class ListView(NavigationView):
|
||||
"""
|
||||
Save the column widths when the view is shutdown.
|
||||
"""
|
||||
self.save_column_info()
|
||||
PageView.on_delete(self)
|
||||
|
||||
def save_column_info(self):
|
||||
"""
|
||||
Save the column widths, order, and view settings
|
||||
"""
|
||||
widths = self.get_column_widths()
|
||||
order = self._config.get('columns.rank')
|
||||
size = self._config.get('columns.size')
|
||||
vis = self._config.get('columns.visible')
|
||||
vis = self._config.get('columns.visible')
|
||||
newsize = []
|
||||
index = 0
|
||||
for val, size in zip(order, size):
|
||||
if val in vis:
|
||||
size = widths[index]
|
||||
if val in vis[:-1]: # don't use last column size, it's wrong
|
||||
if widths[index]:
|
||||
size = widths[index]
|
||||
index += 1
|
||||
newsize.append(size)
|
||||
self._config.set('columns.size', newsize)
|
||||
PageView.on_delete(self)
|
||||
|
||||
####################################################################
|
||||
# Export data
|
||||
|
@ -276,7 +276,7 @@ class PageView(DbGUIElement, metaclass=ABCMeta):
|
||||
def get_data(self):
|
||||
return self.data
|
||||
class Context:
|
||||
targets = [drag_type]
|
||||
targets = [drag_type.name()]
|
||||
action = 1
|
||||
def list_targets(self):
|
||||
return Context.targets
|
||||
|
@ -129,9 +129,12 @@ def find_fullname(key, data):
|
||||
# surname primary,
|
||||
# surname origin type,
|
||||
# surname connector)]
|
||||
fullname_data = [(data[3][5][0][0] + ' ' + data[3][4], # surname givenname
|
||||
data[3][5][0][1], data[3][5][0][2],
|
||||
data[3][5][0][3], data[3][5][0][4])]
|
||||
if data[3][5]: # if Surname available
|
||||
fullname_data = [(data[3][5][0][0] + ' ' + data[3][4], # combined
|
||||
data[3][5][0][1], data[3][5][0][2],
|
||||
data[3][5][0][3], data[3][5][0][4])]
|
||||
else: # Some importers don't add any Surname at all
|
||||
fullname_data = [(' ' + data[3][4], '', True, (1, ''), '')]
|
||||
# ignore if origin type is PATRONYMIC or MATRONYMIC
|
||||
return __index_surname(fullname_data)
|
||||
|
||||
|
@ -579,7 +579,7 @@ class LaTeXBackend(DocBackend):
|
||||
LaTeXBackend.ESCAPE_FUNC = lambda x: latexescapeverbatim
|
||||
|
||||
def _create_xmltag(self, type, value):
|
||||
"""
|
||||
r"""
|
||||
overwrites the method in DocBackend.
|
||||
creates the latex tags needed for non bool style types we support:
|
||||
FONTSIZE : use different \large denomination based
|
||||
@ -1267,7 +1267,8 @@ class LaTeXDoc(BaseDoc, TextDoc):
|
||||
text = re.sub(URL_PATTERN, _CLICKABLE, text)
|
||||
|
||||
#hard coded replace of the underline used for missing names/data
|
||||
text = text.replace('\\_'*13, '\\underline{\hspace{3\\grbaseindent}}')
|
||||
text = text.replace('\\_' * 13,
|
||||
'\\underline{\\hspace{3\\grbaseindent}}')
|
||||
self.emit(text + ' ')
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ class RTFDoc(BaseDoc, TextDoc):
|
||||
'{\\fonttbl\n'
|
||||
'{\\f0\\froman\\fcharset0\\fprq0 Times New Roman;}\n'
|
||||
'{\\f1\\fswiss\\fcharset0\\fprq0 Arial;}}\n'
|
||||
'{\colortbl\n'
|
||||
'{\\colortbl\n'
|
||||
)
|
||||
|
||||
self.color_map = {}
|
||||
@ -442,7 +442,7 @@ class RTFDoc(BaseDoc, TextDoc):
|
||||
act_height = size[1]
|
||||
|
||||
if self.in_table:
|
||||
self.text += '{\*\shppict{\\pict\\jpegblip'
|
||||
self.text += '{\\*\\shppict{\\pict\\jpegblip'
|
||||
self.text += '\\picwgoal%d\\pichgoal%d\n' % (act_width, act_height)
|
||||
index = 1
|
||||
for i in buf:
|
||||
@ -452,7 +452,7 @@ class RTFDoc(BaseDoc, TextDoc):
|
||||
index = index+1
|
||||
self.text += '}}\\par\n'
|
||||
else:
|
||||
self.file.write('{\*\shppict{\\pict\\jpegblip')
|
||||
self.file.write('{\\*\\shppict{\\pict\\jpegblip')
|
||||
self.file.write('\\picwgoal%d\\pichgoal%d\n' % (act_width, act_height))
|
||||
index = 1
|
||||
for i in buf:
|
||||
|
@ -227,13 +227,9 @@ class Calendar(Report):
|
||||
self.doc.draw_box("CAL-Title", "", 0, 0, width, header, mark)
|
||||
self.doc.draw_line("CAL-Border", 0, header, width, header)
|
||||
year = self.year
|
||||
# TRANSLATORS: see
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection for your language.
|
||||
title = self._("{long_month} {year}").format(
|
||||
long_month = self._ldd.long_months[month],
|
||||
year = year
|
||||
).capitalize()
|
||||
# assume every calendar header in the world is "<month-name> <year>"
|
||||
title = "%s %s" % (self._ldd.long_months[month].capitalize(),
|
||||
self._get_date(Date(self.year))) # localized year
|
||||
mark = IndexMark(title, INDEX_TYPE_TOC, 2)
|
||||
font_height = pt2cm(ptitle.get_font().get_size())
|
||||
self.doc.center_text("CAL-Title", title,
|
||||
|
@ -770,16 +770,19 @@ class MakeFamilyTree(RecurseDown):
|
||||
father1 = self.database.get_person_from_handle(father1_h)
|
||||
if self.do_parents: #b3 - remove grandparents?
|
||||
family2_h = father1.get_main_parents_family_handle()
|
||||
family2 = self.database.get_family_from_handle(family2_h)
|
||||
if family2_h:
|
||||
family2 = self.database.get_family_from_handle(family2_h)
|
||||
if mother1_h:
|
||||
mother1 = self.database.get_person_from_handle(mother1_h)
|
||||
|
||||
mother2_h = father2_h = None
|
||||
mother2_h = father2_h = father2 = mother2 = None
|
||||
if family2: #family2 = fathers parents
|
||||
mother2_h = family2.get_mother_handle()
|
||||
mother2 = self.database.get_person_from_handle(mother2_h)
|
||||
if mother2_h:
|
||||
mother2 = self.database.get_person_from_handle(mother2_h)
|
||||
father2_h = family2.get_father_handle()
|
||||
father2 = self.database.get_person_from_handle(father2_h)
|
||||
if father2_h:
|
||||
father2 = self.database.get_person_from_handle(father2_h)
|
||||
|
||||
#Helper variables. Assigned in one section, used in another.
|
||||
father2_id = family2_id = None
|
||||
@ -878,14 +881,17 @@ class MakeFamilyTree(RecurseDown):
|
||||
mother1 = self.database.get_person_from_handle(mother1_h)
|
||||
if self.do_parents: #b3 - remove grandparents?
|
||||
family2_h = mother1.get_main_parents_family_handle()
|
||||
family2 = self.database.get_family_from_handle(family2_h)
|
||||
if family2_h:
|
||||
family2 = self.database.get_family_from_handle(family2_h)
|
||||
|
||||
mother2_h = father2_h = None
|
||||
mother2_h = father2_h = mother2 = father2 = None
|
||||
if family2:
|
||||
mother2_h = family2.get_mother_handle()
|
||||
mother2 = self.database.get_person_from_handle(mother2_h)
|
||||
if mother2_h:
|
||||
mother2 = self.database.get_person_from_handle(mother2_h)
|
||||
father2_h = family2.get_father_handle()
|
||||
father2 = self.database.get_person_from_handle(father2_h)
|
||||
if father2_h:
|
||||
father2 = self.database.get_person_from_handle(father2_h)
|
||||
|
||||
#######################
|
||||
#don't do my parents family.
|
||||
|
@ -57,7 +57,7 @@ from gramps.gen.plug.report import MenuReportOptions
|
||||
from gramps.gen.plug.report import stdoptions
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback
|
||||
from gramps.gen.lib import EventType
|
||||
from gramps.gen.lib import EventType, Date
|
||||
from gramps.gen.proxy import CacheProxyDb
|
||||
from gramps.gen.display.name import displayer as _nd
|
||||
|
||||
@ -329,7 +329,8 @@ class FanChart(Report):
|
||||
bth = ""
|
||||
if birth:
|
||||
bth = birth.get_date_object()
|
||||
bth = str(bth.to_calendar(self.calendar).get_year())
|
||||
bth = self._get_date(
|
||||
Date(bth.to_calendar(self.calendar).get_year())) # localized
|
||||
if bth == 0:
|
||||
bth = ""
|
||||
elif birth.get_type() != EventType.BIRTH:
|
||||
@ -339,7 +340,8 @@ class FanChart(Report):
|
||||
dth = ""
|
||||
if death:
|
||||
dth = death.get_date_object()
|
||||
dth = str(dth.to_calendar(self.calendar).get_year())
|
||||
dth = self._get_date(
|
||||
Date(dth.to_calendar(self.calendar).get_year())) # localized
|
||||
if dth == 0:
|
||||
dth = ""
|
||||
elif death.get_type() != EventType.DEATH:
|
||||
|
@ -45,6 +45,7 @@ from gramps.gen.sort import Sort
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback
|
||||
from gramps.gen.proxy import CacheProxyDb
|
||||
from gramps.gen.lib import Date
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -297,7 +298,7 @@ class TimeLine(Report):
|
||||
delta = (stop_pos - start_pos) / 5
|
||||
for val in range(0, 6):
|
||||
xpos = start_pos + (val * delta)
|
||||
year_str = str(int(year_low + (incr * val)))
|
||||
year_str = self._get_date(Date(year_low + int(incr * val)))
|
||||
self.doc.center_text('TLG-label', year_str, xpos, label_y)
|
||||
|
||||
def draw_no_date_heading(self):
|
||||
|
@ -170,7 +170,7 @@ class VCardCheck(unittest.TestCase):
|
||||
|
||||
def test_write_name_honsuffix(self):
|
||||
ET.SubElement(self.name, "suffix").text = "Jr."
|
||||
self.expect[3] = "FN:Lastname\, Jr."
|
||||
self.expect[3] = "FN:Lastname\\, Jr."
|
||||
self.expect[4] = "N:Lastname;;;;Jr."
|
||||
self.expect[5] = "SORT-STRING:" + "Lastname".ljust(55)+ "Jr."
|
||||
self.do_case(self.database, self.expect)
|
||||
|
@ -49,7 +49,8 @@ class QuickViewGramplet(Gramplet):
|
||||
def active_changed(self, handle):
|
||||
self.update()
|
||||
|
||||
def post_init(self):
|
||||
def db_changed(self):
|
||||
self.connect_signal('Person', self._active_changed)
|
||||
self.connect_signal('Family', self._active_changed)
|
||||
self.connect_signal('Event', self._active_changed)
|
||||
self.connect_signal('Place', self._active_changed)
|
||||
|
@ -21,7 +21,7 @@
|
||||
# Python modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import posixpath
|
||||
import os
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -48,14 +48,16 @@ _YIELD_INTERVAL = 200
|
||||
# StatsGramplet class
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
|
||||
class StatsGramplet(Gramplet):
|
||||
""" Display some statistics about the tree, with links to filtered quick
|
||||
reports
|
||||
"""
|
||||
def init(self):
|
||||
self.set_text(_("No Family Tree loaded."))
|
||||
self.set_tooltip(_("Double-click item to see matches"))
|
||||
|
||||
def active_changed(self, handle):
|
||||
self.update()
|
||||
|
||||
def db_changed(self):
|
||||
self.connect(self.dbstate.db, 'person-add', self.update)
|
||||
self.connect(self.dbstate.db, 'person-update', self.update)
|
||||
@ -68,12 +70,17 @@ class StatsGramplet(Gramplet):
|
||||
def main(self):
|
||||
self.set_text(_("Processing..."))
|
||||
database = self.dbstate.db
|
||||
personList = database.iter_people()
|
||||
|
||||
with_media = 0
|
||||
total_media = 0
|
||||
incomp_names = 0
|
||||
disconnected = 0
|
||||
missing_bday = 0
|
||||
males = 0
|
||||
females = 0
|
||||
unknowns = 0
|
||||
bytes = 0
|
||||
bytes_cnt = 0
|
||||
notfound = []
|
||||
|
||||
mobjects = database.get_number_of_media()
|
||||
@ -81,20 +88,54 @@ class StatsGramplet(Gramplet):
|
||||
for media in database.iter_media():
|
||||
fullname = media_path_full(database, media.get_path())
|
||||
try:
|
||||
bytes += posixpath.getsize(fullname)
|
||||
length = len(str(bytes))
|
||||
if bytes <= 999999:
|
||||
bytes_cnt += os.path.getsize(fullname)
|
||||
length = len(str(bytes_cnt))
|
||||
if bytes_cnt <= 999999:
|
||||
mbytes = _("less than 1")
|
||||
else:
|
||||
mbytes = str(bytes)[:(length-6)]
|
||||
mbytes = str(bytes_cnt)[:(length - 6)]
|
||||
except OSError:
|
||||
notfound.append(media.get_path())
|
||||
|
||||
if hasattr(database, 'genderStats'):
|
||||
males = sum([v[0] for v in database.genderStats.stats.values()])
|
||||
females = sum([v[1] for v in database.genderStats.stats.values()])
|
||||
unknowns = sum([v[2] for v in database.genderStats.stats.values()])
|
||||
for cnt, person in enumerate(personList):
|
||||
length = len(person.get_media_list())
|
||||
if length > 0:
|
||||
with_media += 1
|
||||
total_media += length
|
||||
|
||||
for name in ([person.get_primary_name()] +
|
||||
person.get_alternate_names()):
|
||||
|
||||
if name.get_first_name().strip() == "":
|
||||
incomp_names += 1
|
||||
else:
|
||||
if name.get_surname_list():
|
||||
for surname in name.get_surname_list():
|
||||
if surname.get_surname().strip() == "":
|
||||
incomp_names += 1
|
||||
else:
|
||||
incomp_names += 1
|
||||
|
||||
if (not person.get_main_parents_family_handle() and
|
||||
not person.get_family_handle_list()):
|
||||
disconnected += 1
|
||||
|
||||
birth_ref = person.get_birth_ref()
|
||||
if birth_ref:
|
||||
birth = database.get_event_from_handle(birth_ref.ref)
|
||||
if not get_date(birth):
|
||||
missing_bday += 1
|
||||
else:
|
||||
missing_bday += 1
|
||||
|
||||
if person.get_gender() == Person.FEMALE:
|
||||
females += 1
|
||||
elif person.get_gender() == Person.MALE:
|
||||
males += 1
|
||||
else:
|
||||
unknowns += 1
|
||||
if not cnt % _YIELD_INTERVAL:
|
||||
yield True
|
||||
self.clear_text()
|
||||
self.append_text(_("Individuals") + "\n")
|
||||
self.append_text("----------------------------\n")
|
||||
@ -112,6 +153,18 @@ class StatsGramplet(Gramplet):
|
||||
'Filter', 'people with unknown gender')
|
||||
self.append_text(" %s" % unknowns)
|
||||
self.append_text("\n")
|
||||
self.link(_("%s:") % _("Incomplete names"),
|
||||
'Filter', 'incomplete names')
|
||||
self.append_text(" %s" % incomp_names)
|
||||
self.append_text("\n")
|
||||
self.link(_("%s:") % _("Individuals missing birth dates"),
|
||||
'Filter', 'people with missing birth dates')
|
||||
self.append_text(" %s" % missing_bday)
|
||||
self.append_text("\n")
|
||||
self.link(_("%s:") % _("Disconnected individuals"),
|
||||
'Filter', 'disconnected people')
|
||||
self.append_text(" %s" % disconnected)
|
||||
self.append_text("\n")
|
||||
self.append_text("\n%s\n" % _("Family Information"))
|
||||
self.append_text("----------------------------\n")
|
||||
self.link(_("%s:") % _("Number of families"),
|
||||
@ -125,6 +178,10 @@ class StatsGramplet(Gramplet):
|
||||
self.append_text("\n")
|
||||
self.append_text("\n%s\n" % _("Media Objects"))
|
||||
self.append_text("----------------------------\n")
|
||||
self.link(_("%s:") % _("Individuals with media objects"),
|
||||
'Filter', 'people with media')
|
||||
self.append_text(" %s" % with_media)
|
||||
self.append_text("\n")
|
||||
self.link(_("%s:") % _("Total number of media object references"),
|
||||
'Filter', 'media references')
|
||||
self.append_text(" %s" % total_media)
|
||||
|
@ -93,12 +93,13 @@ class WhatNextGramplet(Gramplet):
|
||||
self.opts[3].add_item('', '')
|
||||
self.opts[4].add_item('', '')
|
||||
self.opts[5].add_item('', '')
|
||||
for tag_handle in self.dbstate.db.get_tag_handles(sort_handles=True):
|
||||
tag = self.dbstate.db.get_tag_from_handle(tag_handle)
|
||||
tag_name = tag.get_name()
|
||||
self.opts[3].add_item(tag_name, tag_name)
|
||||
self.opts[4].add_item(tag_name, tag_name)
|
||||
self.opts[5].add_item(tag_name, tag_name)
|
||||
if self.dbstate.db.is_open():
|
||||
for tag_handle in self.dbstate.db.get_tag_handles(sort_handles=True):
|
||||
tag = self.dbstate.db.get_tag_from_handle(tag_handle)
|
||||
tag_name = tag.get_name()
|
||||
self.opts[3].add_item(tag_name, tag_name)
|
||||
self.opts[4].add_item(tag_name, tag_name)
|
||||
self.opts[5].add_item(tag_name, tag_name)
|
||||
|
||||
list(map(self.add_option, self.opts))
|
||||
|
||||
|
@ -49,7 +49,7 @@ LOG = logging.getLogger(".FamilyLines")
|
||||
#------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from gramps.gen.lib import EventRoleType, EventType, Person, PlaceType
|
||||
from gramps.gen.lib import EventRoleType, EventType, Person, PlaceType, Date
|
||||
from gramps.gen.utils.file import media_path_full
|
||||
from gramps.gen.utils.thumbnails import (get_thumbnail_path, SIZE_NORMAL,
|
||||
SIZE_LARGE)
|
||||
@ -818,7 +818,8 @@ class FamilyLinesReport(Report):
|
||||
if bth_event and self._incdates:
|
||||
date = bth_event.get_date_object()
|
||||
if self._just_years and date.get_year_valid():
|
||||
birth_str = '%i' % date.get_year()
|
||||
birth_str = self._get_date( # localized year
|
||||
Date(date.get_year()))
|
||||
else:
|
||||
birth_str = self._get_date(date)
|
||||
|
||||
@ -833,7 +834,8 @@ class FamilyLinesReport(Report):
|
||||
if dth_event and self._incdates:
|
||||
date = dth_event.get_date_object()
|
||||
if self._just_years and date.get_year_valid():
|
||||
death_str = '%i' % date.get_year()
|
||||
death_str = self._get_date( # localized year
|
||||
Date(date.get_year()))
|
||||
else:
|
||||
death_str = self._get_date(date)
|
||||
|
||||
@ -962,7 +964,8 @@ class FamilyLinesReport(Report):
|
||||
if self._incdates:
|
||||
date = event.get_date_object()
|
||||
if self._just_years and date.get_year_valid():
|
||||
wedding_date = '%i' % date.get_year()
|
||||
wedding_date = self._get_date( # localized year
|
||||
Date(date.get_year()))
|
||||
else:
|
||||
wedding_date = self._get_date(date)
|
||||
# get the wedding location
|
||||
|
@ -54,7 +54,7 @@ from gramps.gen.plug.report import Report
|
||||
from gramps.gen.plug.report import utils
|
||||
from gramps.gen.plug.report import MenuReportOptions
|
||||
from gramps.gen.plug.report import stdoptions
|
||||
from gramps.gen.lib import ChildRefType, EventRoleType, EventType
|
||||
from gramps.gen.lib import ChildRefType, EventRoleType, EventType, Date
|
||||
from gramps.gen.utils.file import media_path_full, find_file
|
||||
from gramps.gen.utils.thumbnails import get_thumbnail_path
|
||||
from gramps.gen.relationship import get_relationship_calculator
|
||||
@ -724,7 +724,8 @@ class RelGraphReport(Report):
|
||||
event_date = event.get_date_object()
|
||||
if event_date.get_year_valid():
|
||||
if self.event_choice in [4, 5]:
|
||||
return '%i' % event_date.get_year()
|
||||
return self._get_date( # localized year
|
||||
Date(event_date.get_year()))
|
||||
elif self.event_choice in [1, 2, 3, 7]:
|
||||
return self._get_date(event_date)
|
||||
return ''
|
||||
|
@ -55,8 +55,9 @@ from gramps.gen.lib import (Attribute, AttributeType, ChildRef, Citation,
|
||||
from gramps.gen.db import DbTxn
|
||||
from html.entities import name2codepoint
|
||||
|
||||
_date_parse = re.compile('([kmes~?<>]+)?([0-9/]+)([J|H|F])?(\.\.)?([0-9/]+)?([J|H|F])?')
|
||||
_text_parse = re.compile('0\((.*)\)')
|
||||
_date_parse = re.compile(
|
||||
r'([kmes~?<>]+)?([0-9/]+)([J|H|F])?(\.\.)?([0-9/]+)?([J|H|F])?')
|
||||
_text_parse = re.compile(r'0\((.*)\)')
|
||||
|
||||
_mod_map = {
|
||||
'>' : Date.MOD_AFTER,
|
||||
@ -312,7 +313,7 @@ class GeneWebParser:
|
||||
return None
|
||||
|
||||
def read_relationship_person(self,line,fields):
|
||||
LOG.debug("\Relationships:")
|
||||
LOG.debug(r"\Relationships:")
|
||||
(idx,person) = self.parse_person(fields,1,Person.UNKNOWN,None)
|
||||
if person:
|
||||
self.current_relationship_person_handle = person.get_handle()
|
||||
@ -607,7 +608,7 @@ class GeneWebParser:
|
||||
firstname = self.decode(fields[idx])
|
||||
idx += 1
|
||||
if idx < len(fields) and father_surname:
|
||||
noSurnameRe = re.compile("^[({\[~><?0-9#].*$")
|
||||
noSurnameRe = re.compile(r"^[({\[~><?0-9#].*$")
|
||||
if not noSurnameRe.match(fields[idx]):
|
||||
surname = self.decode(fields[idx])
|
||||
idx += 1
|
||||
@ -623,7 +624,7 @@ class GeneWebParser:
|
||||
if person.get_gender() == Person.UNKNOWN and gender is not None:
|
||||
person.set_gender(gender)
|
||||
self.db.commit_person(person,self.trans)
|
||||
personDataRe = re.compile("^[kmes0-9<>~#\[({!].*$")
|
||||
personDataRe = re.compile(r"^[kmes0-9<>~#\[({!].*$")
|
||||
dateRe = re.compile("^[kmes0-9~<>?]+.*$")
|
||||
|
||||
source = None
|
||||
|
@ -708,7 +708,7 @@ class GrampsParser(UpdateCallback):
|
||||
"rname": (None, self.stop_rname),
|
||||
}
|
||||
self.grampsuri = re.compile(r"^gramps://(?P<object_class>[A-Z][a-z]+)/"
|
||||
"handle/(?P<handle>\w+)$")
|
||||
r"handle/(?P<handle>\w+)$")
|
||||
|
||||
def inaugurate(self, handle, target, prim_obj):
|
||||
"""
|
||||
|
@ -144,11 +144,12 @@ class VCardCheck(unittest.TestCase):
|
||||
"TEL:012\\345,67;89")
|
||||
|
||||
def test_unesc_list(self):
|
||||
self.assertEqual(VCardParser.unesc(["Last\,name", "First\;name"]),
|
||||
self.assertEqual(VCardParser.unesc([r"Last\,name", r"First\;name"]),
|
||||
["Last,name", "First;name"])
|
||||
|
||||
def test_unesc_tuple(self):
|
||||
self.assertRaises(TypeError, VCardParser.unesc, ("Last\,name", "First\;name"))
|
||||
self.assertRaises(TypeError, VCardParser.unesc,
|
||||
(r"Last\,name", r"First\;name"))
|
||||
|
||||
def test_count_escapes_null(self):
|
||||
self.assertEqual(VCardParser.count_escapes("Lastname"), 0)
|
||||
@ -371,7 +372,7 @@ class VCardCheck(unittest.TestCase):
|
||||
self.do_case("\r\n".join(self.vcard), self.gramps)
|
||||
|
||||
def test_add_nicknames_multiple(self):
|
||||
self.vcard.insert(4, "NICKNAME:A,B\,C")
|
||||
self.vcard.insert(4, r"NICKNAME:A,B\,C")
|
||||
attribs = {"alt": "1", "type": "Birth Name"}
|
||||
name = ET.SubElement(self.person, 'name', attribs)
|
||||
ET.SubElement(name, 'nick').text = "A"
|
||||
@ -391,7 +392,7 @@ class VCardCheck(unittest.TestCase):
|
||||
self.do_case("\r\n".join(self.vcard), self.gramps)
|
||||
|
||||
def test_add_address_too_many(self):
|
||||
self.vcard.insert(4, "ADR:;;Broadway 11; New\,York; ;; USA; Earth")
|
||||
self.vcard.insert(4, r"ADR:;;Broadway 11; New\,York; ;; USA; Earth")
|
||||
address = ET.SubElement(self.person, 'address')
|
||||
ET.SubElement(address, 'street').text = 'Broadway 11'
|
||||
ET.SubElement(address, 'city').text = 'New,York'
|
||||
|
@ -1351,7 +1351,7 @@ class Narrator:
|
||||
|
||||
def __init__(self, dbase, verbose=True,
|
||||
use_call_name=False, use_fulldate=False,
|
||||
empty_date="", empty_place="",
|
||||
empty_date="", empty_place="", place_format=-1,
|
||||
nlocale=glocale,
|
||||
get_endnote_numbers=_get_empty_endnote_numbers):
|
||||
"""
|
||||
@ -1380,6 +1380,8 @@ class Narrator:
|
||||
callable( :class:`~gen.lib.CitationBase` )
|
||||
:param nlocale: allow deferred translation of dates and strings
|
||||
:type nlocale: a GrampsLocale instance
|
||||
:param place_format: allow display of places in any place format
|
||||
:type place_format: int
|
||||
"""
|
||||
self.__db = dbase
|
||||
self.__verbose = verbose
|
||||
@ -1395,6 +1397,7 @@ class Narrator:
|
||||
self.__translate_text = nlocale.translation.gettext
|
||||
self.__get_date = nlocale.get_date
|
||||
self._locale = nlocale
|
||||
self._place_format = place_format
|
||||
|
||||
def set_subject(self, person):
|
||||
"""
|
||||
@ -1453,7 +1456,8 @@ class Narrator:
|
||||
bplace_handle = birth_event.get_place_handle()
|
||||
if bplace_handle:
|
||||
place = self.__db.get_place_from_handle(bplace_handle)
|
||||
bplace = _pd.display_event(self.__db, birth_event)
|
||||
bplace = _pd.display_event(self.__db, birth_event,
|
||||
fmt=self._place_format)
|
||||
bdate_obj = birth_event.get_date_object()
|
||||
bdate_full = bdate_obj and bdate_obj.get_day_valid()
|
||||
bdate_mod = bdate_obj and \
|
||||
@ -1562,7 +1566,8 @@ class Narrator:
|
||||
dplace_handle = death_event.get_place_handle()
|
||||
if dplace_handle:
|
||||
place = self.__db.get_place_from_handle(dplace_handle)
|
||||
dplace = _pd.display_event(self.__db, death_event)
|
||||
dplace = _pd.display_event(self.__db, death_event,
|
||||
fmt=self._place_format)
|
||||
ddate_obj = death_event.get_date_object()
|
||||
ddate_full = ddate_obj and ddate_obj.get_day_valid()
|
||||
ddate_mod = ddate_obj and \
|
||||
@ -1681,7 +1686,8 @@ class Narrator:
|
||||
bplace_handle = burial.get_place_handle()
|
||||
if bplace_handle:
|
||||
place = self.__db.get_place_from_handle(bplace_handle)
|
||||
bplace = _pd.display_event(self.__db, burial)
|
||||
bplace = _pd.display_event(self.__db, burial,
|
||||
fmt=self._place_format)
|
||||
bdate_obj = burial.get_date_object()
|
||||
bdate_full = bdate_obj and bdate_obj.get_day_valid()
|
||||
bdate_mod = bdate_obj and bdate_obj.get_modifier() != Date.MOD_NONE
|
||||
@ -1791,7 +1797,8 @@ class Narrator:
|
||||
bplace_handle = baptism.get_place_handle()
|
||||
if bplace_handle:
|
||||
place = self.__db.get_place_from_handle(bplace_handle)
|
||||
bplace = _pd.display_event(self.__db, baptism)
|
||||
bplace = _pd.display_event(self.__db, baptism,
|
||||
fmt=self._place_format)
|
||||
bdate_obj = baptism.get_date_object()
|
||||
bdate_full = bdate_obj and bdate_obj.get_day_valid()
|
||||
bdate_mod = bdate_obj and bdate_obj.get_modifier() != Date.MOD_NONE
|
||||
@ -1901,7 +1908,8 @@ class Narrator:
|
||||
cplace_handle = christening.get_place_handle()
|
||||
if cplace_handle:
|
||||
place = self.__db.get_place_from_handle(cplace_handle)
|
||||
cplace = _pd.display_event(self.__db, christening)
|
||||
cplace = _pd.display_event(self.__db, christening,
|
||||
fmt=self._place_format)
|
||||
cdate_obj = christening.get_date_object()
|
||||
cdate_full = cdate_obj and cdate_obj.get_day_valid()
|
||||
cdate_mod = cdate_obj and cdate_obj.get_modifier() != Date.MOD_NONE
|
||||
@ -2014,7 +2022,8 @@ class Narrator:
|
||||
place_handle = event.get_place_handle()
|
||||
if place_handle:
|
||||
place_obj = self.__db.get_place_from_handle(place_handle)
|
||||
place = _pd.display_event(self.__db, event)
|
||||
place = _pd.display_event(self.__db, event,
|
||||
fmt=self._place_format)
|
||||
relationship = family.get_relationship()
|
||||
|
||||
value_map = {
|
||||
|
@ -32,7 +32,7 @@ from gramps.gui.plug.quick import run_quick_report_by_name_direct
|
||||
from gramps.gen.lib import Person
|
||||
from gramps.gen.datehandler import get_date
|
||||
|
||||
import posixpath
|
||||
import os
|
||||
from collections import defaultdict
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
@ -389,7 +389,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
for photo in database.iter_media():
|
||||
fullname = media_path_full(database, photo.get_path())
|
||||
try:
|
||||
posixpath.getsize(fullname)
|
||||
os.path.getsize(fullname)
|
||||
except:
|
||||
stab.row(fullname)
|
||||
matches += 1
|
||||
@ -399,7 +399,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
for photo in database.iter_media():
|
||||
fullname = media_path_full(database, photo.get_path())
|
||||
try:
|
||||
bytes = posixpath.getsize(fullname)
|
||||
bytes = os.path.getsize(fullname)
|
||||
stab.row(fullname, str(bytes))
|
||||
matches += 1
|
||||
except:
|
||||
|
@ -145,8 +145,8 @@ class ToolControl(unittest.TestCase):
|
||||
"1 invalid birth event name was fixed",
|
||||
"1 invalid death event name was fixed",
|
||||
"2 places were referenced, but not found",
|
||||
"2 citations were referenced, but not found",
|
||||
"5 sources were referenced, but not found",
|
||||
"15 citations were referenced, but not found",
|
||||
"18 sources were referenced, but not found",
|
||||
"9 Duplicated Gramps IDs fixed",
|
||||
"7 empty objects removed",
|
||||
"1 person objects",
|
||||
|
@ -184,10 +184,13 @@ class BirthdayReport(Report):
|
||||
# generate the report:
|
||||
self.doc.start_paragraph('BIR-Title')
|
||||
if self.titletext == _(_TITLE0):
|
||||
title = self._(_TITLE0) + ": " + str(self.year)
|
||||
title = self._("%(str1)s: %(str2)s") % {
|
||||
'str1' : self._(_TITLE0),
|
||||
'str2' : self._get_date(Date(self.year))} # localized year
|
||||
else:
|
||||
title = str(self.titletext) + ": " + str(self.year)
|
||||
# FIXME those concatenated strings won't work for RTL languages
|
||||
title = self._("%(str1)s: %(str2)s") % {
|
||||
'str1' : str(self.titletext),
|
||||
'str2' : self._get_date(Date(self.year))}
|
||||
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
|
||||
self.doc.write_text(title, mark)
|
||||
self.doc.end_paragraph()
|
||||
|
@ -186,6 +186,7 @@ class DetAncestorReport(Report):
|
||||
self.__narrator = Narrator(self._db, self.verbose, use_call,
|
||||
use_fulldate, empty_date, empty_place,
|
||||
nlocale=self._locale,
|
||||
place_format=self.place_format,
|
||||
get_endnote_numbers=self.endnotes)
|
||||
|
||||
self.bibli = Bibliography(Bibliography.MODE_DATE|Bibliography.MODE_PAGE)
|
||||
|
@ -207,6 +207,7 @@ class DetDescendantReport(Report):
|
||||
use_call, use_fulldate,
|
||||
empty_date, empty_place,
|
||||
nlocale=self._locale,
|
||||
place_format=self.place_format,
|
||||
get_endnote_numbers=self.endnotes)
|
||||
|
||||
self.bibli = Bibliography(Bibliography.MODE_DATE|Bibliography.MODE_PAGE)
|
||||
|
@ -840,6 +840,7 @@ class IndivCompleteReport(Report):
|
||||
if self.person is None:
|
||||
continue
|
||||
self.family_notes_list = []
|
||||
self.names_notes_list = []
|
||||
self.write_person(count)
|
||||
if self._user:
|
||||
self._user.end_progress()
|
||||
|
@ -413,6 +413,7 @@ class PlaceOptions(MenuReportOptions):
|
||||
self.__db = dbase
|
||||
self.__filter = None
|
||||
self.__places = None
|
||||
self.__pf = None
|
||||
MenuReportOptions.__init__(self, name, dbase)
|
||||
|
||||
def get_subject(self):
|
||||
@ -428,7 +429,7 @@ class PlaceOptions(MenuReportOptions):
|
||||
subject += " + "
|
||||
place = self.__db.get_place_from_gramps_id(place_id)
|
||||
subject += _pd.display(self.__db, place, None,
|
||||
self.place_format)
|
||||
self.__pf.get_value())
|
||||
return subject
|
||||
|
||||
def add_menu_options(self, menu):
|
||||
@ -462,7 +463,7 @@ class PlaceOptions(MenuReportOptions):
|
||||
|
||||
stdoptions.add_name_format_option(menu, category_name)
|
||||
|
||||
stdoptions.add_place_format_option(menu, category_name)
|
||||
self.__pf = stdoptions.add_place_format_option(menu, category_name)
|
||||
|
||||
stdoptions.add_private_data_option(menu, category_name)
|
||||
|
||||
|
@ -30,7 +30,7 @@ Reports/Text Reports/Database Summary Report.
|
||||
# standard python modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import posixpath
|
||||
import os
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -233,7 +233,7 @@ class SummaryReport(Report):
|
||||
for media_id in self.__db.get_media_handles():
|
||||
media = self.__db.get_media_from_handle(media_id)
|
||||
try:
|
||||
size_in_bytes += posixpath.getsize(
|
||||
size_in_bytes += os.path.getsize(
|
||||
media_path_full(self.__db, media.get_path()))
|
||||
length = len(str(size_in_bytes))
|
||||
if size_in_bytes <= 999999:
|
||||
|
@ -1078,7 +1078,7 @@ class CheckIntegrity:
|
||||
none_handle = False
|
||||
if birth_ref:
|
||||
newref = birth_ref
|
||||
if birth_ref.ref is None:
|
||||
if not birth_ref.ref:
|
||||
none_handle = True
|
||||
birth_ref.ref = create_id()
|
||||
birth_handle = birth_ref.ref
|
||||
@ -1117,7 +1117,7 @@ class CheckIntegrity:
|
||||
death_ref = person.get_death_ref()
|
||||
if death_ref:
|
||||
newref = death_ref
|
||||
if death_ref.ref is None:
|
||||
if not death_ref.ref:
|
||||
none_handle = True
|
||||
death_ref.ref = create_id()
|
||||
death_handle = death_ref.ref
|
||||
@ -1158,7 +1158,7 @@ class CheckIntegrity:
|
||||
if person.get_event_ref_list():
|
||||
for event_ref in person.get_event_ref_list():
|
||||
newlist.append(event_ref)
|
||||
if event_ref.ref is None:
|
||||
if not event_ref.ref:
|
||||
none_handle = True
|
||||
event_ref.ref = create_id()
|
||||
event_handle = event_ref.ref
|
||||
@ -1199,7 +1199,7 @@ class CheckIntegrity:
|
||||
newlist = []
|
||||
for event_ref in family.get_event_ref_list():
|
||||
newlist.append(event_ref)
|
||||
if event_ref.ref is None:
|
||||
if not event_ref.ref:
|
||||
none_handle = True
|
||||
event_ref.ref = create_id()
|
||||
event_handle = event_ref.ref
|
||||
@ -1237,52 +1237,87 @@ class CheckIntegrity:
|
||||
|
||||
total = self.db.get_total()
|
||||
|
||||
self.progress.set_pass(_('Looking for backlink reference problems'),
|
||||
total)
|
||||
self.progress.set_pass(_('Looking for backlink reference problems') +
|
||||
' (1)', total)
|
||||
logging.info('Looking for backlink reference problems')
|
||||
|
||||
# dict of object handles indexed by forward link created here
|
||||
my_blinks = defaultdict(list)
|
||||
my_items = 0 # count of my backlinks for progress meter
|
||||
# dict of object handles indexed by forward link from db
|
||||
db_blinks = {}
|
||||
db_items = 0 # count of db backlinks for progress meter
|
||||
|
||||
# first we assemble our own backlinks table, and while we have the
|
||||
# handle, gather up a second table with the db's backlinks
|
||||
for obj_class in CLASS_TO_KEY_MAP.keys():
|
||||
obj_type = obj_class.lower()
|
||||
for handle in getattr(self.db, "iter_%s_handles" % obj_type)():
|
||||
for handle in self.db.method("iter_%s_handles", obj_class)():
|
||||
self.progress.step()
|
||||
pri_obj = getattr(self.db, "get_%s_from_handle"
|
||||
% obj_type)(handle)
|
||||
blinks = list(self.db.find_backlink_handles(handle))
|
||||
db_blinks[(obj_class, handle)] = blinks
|
||||
db_items += len(blinks)
|
||||
pri_obj = self.db.method('get_%s_from_handle',
|
||||
obj_class)(handle)
|
||||
handle_list = pri_obj.get_referenced_handles_recursively()
|
||||
# check that each reference has a backlink
|
||||
my_items += len(handle_list)
|
||||
|
||||
for item in handle_list:
|
||||
bl_list = list(self.db.find_backlink_handles(item[1]))
|
||||
if (obj_class, handle) not in bl_list:
|
||||
# Object has reference with no cooresponding backlink
|
||||
self.bad_backlinks += 1
|
||||
logging.warning(' FAIL: the "%(cls)s" [%(gid)s] '
|
||||
'has a "%(cls2)s" reference'
|
||||
' with no corresponding backlink.',
|
||||
{'gid': pri_obj.gramps_id,
|
||||
'cls': obj_class, 'cls2': item[0]})
|
||||
# Check for backlinks that don't have a reference
|
||||
bl_list = self.db.find_backlink_handles(handle)
|
||||
for item in bl_list:
|
||||
if not getattr(self.db, "has_%s_handle"
|
||||
% item[0].lower())(item[1]):
|
||||
# backlink to object entirely missing
|
||||
self.bad_backlinks += 1
|
||||
logging.warning(' FAIL: the "%(cls)s" [%(gid)s] '
|
||||
'has a backlink to a missing'
|
||||
' "%(cls2)s".',
|
||||
{'gid': pri_obj.gramps_id,
|
||||
'cls': obj_class, 'cls2': item[0]})
|
||||
continue
|
||||
obj = getattr(self.db, "get_%s_from_handle"
|
||||
% item[0].lower())(item[1])
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
if (obj_class, handle) not in handle_list:
|
||||
# backlink to object which doesn't have reference
|
||||
self.bad_backlinks += 1
|
||||
logging.warning(' FAIL: the "%(cls)s" [%(gid)s] '
|
||||
'has a backlink to a "%(cls2)s"'
|
||||
' with no corresponding reference.',
|
||||
{'gid': pri_obj.gramps_id,
|
||||
'cls': obj_class, 'cls2': item[0]})
|
||||
my_blinks[item].append((obj_class, handle))
|
||||
|
||||
# Now we go through our backlinks and the dbs table comparing them
|
||||
# check that each real reference has a backlink in the db table
|
||||
self.progress.set_pass(_('Looking for backlink reference problems') +
|
||||
' (2)', my_items)
|
||||
for key, blinks in my_blinks.items():
|
||||
for item in blinks:
|
||||
self.progress.step()
|
||||
if key not in db_blinks:
|
||||
# object has reference to something not in db;
|
||||
# should have been found in previous checks
|
||||
logging.warning(' Fail: reference to an object %(obj)s'
|
||||
' not in the db by %(ref)s!',
|
||||
{'obj': key, 'ref': item})
|
||||
continue
|
||||
if item not in db_blinks[key]:
|
||||
# Object has reference with no cooresponding backlink
|
||||
self.bad_backlinks += 1
|
||||
pri_obj = self.db.method('get_%s_from_handle',
|
||||
key[0])(key[1])
|
||||
logging.warning(' FAIL: the "%(cls)s" [%(gid)s] '
|
||||
'has a "%(cls2)s" reference'
|
||||
' with no corresponding backlink.',
|
||||
{'gid': pri_obj.gramps_id,
|
||||
'cls': key[0], 'cls2': item[0]})
|
||||
|
||||
# Now we go through the db table and make checks against ours
|
||||
# Check for db backlinks that don't have a reference object at all
|
||||
self.progress.set_pass(_('Looking for backlink reference problems') +
|
||||
' (3)', db_items)
|
||||
for key, blinks in db_blinks.items():
|
||||
for item in blinks:
|
||||
self.progress.step()
|
||||
if item not in db_blinks:
|
||||
# backlink to object entirely missing
|
||||
self.bad_backlinks += 1
|
||||
pri_obj = self.db.method('get_%s_from_handle',
|
||||
key[0])(key[1])
|
||||
logging.warning(' FAIL: the "%(cls)s" [%(gid)s] '
|
||||
'has a backlink to a missing'
|
||||
' "%(cls2)s" object.',
|
||||
{'gid': pri_obj.gramps_id,
|
||||
'cls': key[0], 'cls2': item[0]})
|
||||
continue
|
||||
# Check if the object has a reference to the backlinked one
|
||||
if key not in my_blinks or item not in my_blinks[key]:
|
||||
# backlink to object which doesn't have reference
|
||||
self.bad_backlinks += 1
|
||||
pri_obj = self.db.method('get_%s_from_handle',
|
||||
key[0])(key[1])
|
||||
logging.warning(' FAIL: the "%(cls)s" [%(gid)s] '
|
||||
'has a backlink to a "%(cls2)s"'
|
||||
' with no corresponding reference.',
|
||||
{'gid': pri_obj.gramps_id,
|
||||
'cls': key[0], 'cls2': item[0]})
|
||||
|
||||
def callback(self, *args):
|
||||
self.progress.step()
|
||||
@ -1302,7 +1337,7 @@ class CheckIntegrity:
|
||||
person = self.db.get_person_from_handle(key)
|
||||
for pref in person.get_person_ref_list():
|
||||
newlist.append(pref)
|
||||
if pref.ref is None:
|
||||
if not pref.ref:
|
||||
none_handle = True
|
||||
pref.ref = create_id()
|
||||
try:
|
||||
@ -1361,7 +1396,7 @@ class CheckIntegrity:
|
||||
source = self.db.get_source_from_handle(key)
|
||||
for reporef in source.get_reporef_list():
|
||||
newlist.append(reporef)
|
||||
if reporef.ref is None:
|
||||
if not reporef.ref:
|
||||
none_handle = True
|
||||
reporef.ref = create_id()
|
||||
try:
|
||||
@ -1396,7 +1431,7 @@ class CheckIntegrity:
|
||||
place = self.db.get_place_from_handle(key)
|
||||
for placeref in place.get_placeref_list():
|
||||
newlist.append(placeref)
|
||||
if placeref.ref is None:
|
||||
if not placeref.ref:
|
||||
none_handle = True
|
||||
placeref.ref = create_id()
|
||||
try:
|
||||
@ -1506,7 +1541,7 @@ class CheckIntegrity:
|
||||
handle_list = person.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
person.replace_citation_references(None, new_handle)
|
||||
self.db.commit_person(person, self.trans)
|
||||
@ -1520,7 +1555,7 @@ class CheckIntegrity:
|
||||
handle_list = family.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
family.replace_citation_references(None, new_handle)
|
||||
self.db.commit_family(family, self.trans)
|
||||
@ -1534,7 +1569,7 @@ class CheckIntegrity:
|
||||
handle_list = place.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
place.replace_citation_references(None, new_handle)
|
||||
self.db.commit_place(place, self.trans)
|
||||
@ -1548,7 +1583,7 @@ class CheckIntegrity:
|
||||
handle_list = citation.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
citation.replace_citation_references(None, new_handle)
|
||||
self.db.commit_citation(citation, self.trans)
|
||||
@ -1562,7 +1597,7 @@ class CheckIntegrity:
|
||||
handle_list = repository.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
repository.replace_citation_references(None,
|
||||
new_handle)
|
||||
@ -1577,7 +1612,7 @@ class CheckIntegrity:
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
obj.replace_citation_references(None, new_handle)
|
||||
self.db.commit_media(obj, self.trans)
|
||||
@ -1591,7 +1626,7 @@ class CheckIntegrity:
|
||||
handle_list = event.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Citation':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
event.replace_citation_references(None, new_handle)
|
||||
self.db.commit_event(event, self.trans)
|
||||
@ -1622,7 +1657,7 @@ class CheckIntegrity:
|
||||
self.progress.step()
|
||||
citation = self.db.get_citation_from_handle(key)
|
||||
source_handle = citation.get_reference_handle()
|
||||
if source_handle is None:
|
||||
if not source_handle:
|
||||
source_handle = create_id()
|
||||
citation.set_reference_handle(source_handle)
|
||||
self.db.commit_citation(citation, self.trans)
|
||||
@ -1666,7 +1701,7 @@ class CheckIntegrity:
|
||||
handle_list = person.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
person.replace_media_references(None, new_handle)
|
||||
self.db.commit_person(person, self.trans)
|
||||
@ -1680,7 +1715,7 @@ class CheckIntegrity:
|
||||
handle_list = family.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
family.replace_media_references(None, new_handle)
|
||||
self.db.commit_family(family, self.trans)
|
||||
@ -1694,7 +1729,7 @@ class CheckIntegrity:
|
||||
handle_list = place.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
place.replace_media_references(None, new_handle)
|
||||
self.db.commit_place(place, self.trans)
|
||||
@ -1708,7 +1743,7 @@ class CheckIntegrity:
|
||||
handle_list = event.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
event.replace_media_references(None, new_handle)
|
||||
self.db.commit_event(event, self.trans)
|
||||
@ -1722,7 +1757,7 @@ class CheckIntegrity:
|
||||
handle_list = citation.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
citation.replace_media_references(None, new_handle)
|
||||
self.db.commit_citation(citation, self.trans)
|
||||
@ -1736,7 +1771,7 @@ class CheckIntegrity:
|
||||
handle_list = source.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Media':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
source.replace_media_references(None, new_handle)
|
||||
self.db.commit_source(source, self.trans)
|
||||
@ -1788,7 +1823,7 @@ class CheckIntegrity:
|
||||
handle_list = person.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
person.replace_note_references(None, new_handle)
|
||||
self.db.commit_person(person, self.trans)
|
||||
@ -1802,7 +1837,7 @@ class CheckIntegrity:
|
||||
handle_list = family.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
family.replace_note_references(None, new_handle)
|
||||
self.db.commit_family(family, self.trans)
|
||||
@ -1816,7 +1851,7 @@ class CheckIntegrity:
|
||||
handle_list = place.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
place.replace_note_references(None, new_handle)
|
||||
self.db.commit_place(place, self.trans)
|
||||
@ -1830,7 +1865,7 @@ class CheckIntegrity:
|
||||
handle_list = citation.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
citation.replace_note_references(None, new_handle)
|
||||
self.db.commit_citation(citation, self.trans)
|
||||
@ -1844,7 +1879,7 @@ class CheckIntegrity:
|
||||
handle_list = source.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
source.replace_note_references(None, new_handle)
|
||||
self.db.commit_source(source, self.trans)
|
||||
@ -1858,7 +1893,7 @@ class CheckIntegrity:
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
obj.replace_note_references(None, new_handle)
|
||||
self.db.commit_media(obj, self.trans)
|
||||
@ -1872,7 +1907,7 @@ class CheckIntegrity:
|
||||
handle_list = event.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
event.replace_note_references(None, new_handle)
|
||||
self.db.commit_event(event, self.trans)
|
||||
@ -1886,7 +1921,7 @@ class CheckIntegrity:
|
||||
handle_list = repo.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Note':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
repo.replace_note_references(None, new_handle)
|
||||
self.db.commit_repository(repo, self.trans)
|
||||
@ -1942,7 +1977,7 @@ class CheckIntegrity:
|
||||
handle_list = person.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
person.replace_tag_references(None, new_handle)
|
||||
self.db.commit_person(person, self.trans)
|
||||
@ -1956,7 +1991,7 @@ class CheckIntegrity:
|
||||
handle_list = family.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
family.replace_tag_references(None, new_handle)
|
||||
self.db.commit_family(family, self.trans)
|
||||
@ -1970,7 +2005,7 @@ class CheckIntegrity:
|
||||
handle_list = obj.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
obj.replace_tag_references(None, new_handle)
|
||||
self.db.commit_media(obj, self.trans)
|
||||
@ -1984,7 +2019,7 @@ class CheckIntegrity:
|
||||
handle_list = note.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
note.replace_tag_references(None, new_handle)
|
||||
self.db.commit_note(note, self.trans)
|
||||
@ -1998,7 +2033,7 @@ class CheckIntegrity:
|
||||
handle_list = event.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
event.replace_tag_references(None, new_handle)
|
||||
self.db.commit_event(event, self.trans)
|
||||
@ -2012,7 +2047,7 @@ class CheckIntegrity:
|
||||
handle_list = citation.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
citation.replace_tag_references(None, new_handle)
|
||||
self.db.commit_citation(citation, self.trans)
|
||||
@ -2026,7 +2061,7 @@ class CheckIntegrity:
|
||||
handle_list = source.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
source.replace_tag_references(None, new_handle)
|
||||
self.db.commit_source(source, self.trans)
|
||||
@ -2040,7 +2075,7 @@ class CheckIntegrity:
|
||||
handle_list = place.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
place.replace_tag_references(None, new_handle)
|
||||
self.db.commit_place(place, self.trans)
|
||||
@ -2054,7 +2089,7 @@ class CheckIntegrity:
|
||||
handle_list = repository.get_referenced_handles_recursively()
|
||||
for item in handle_list:
|
||||
if item[0] == 'Tag':
|
||||
if item[1] is None:
|
||||
if not item[1]:
|
||||
new_handle = create_id()
|
||||
repository.replace_tag_references(None, new_handle)
|
||||
self.db.commit_repository(repository, self.trans)
|
||||
|
@ -18,7 +18,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
from _collections import OrderedDict
|
||||
from collections import OrderedDict
|
||||
|
||||
"Find possible loop in a people descendance"
|
||||
|
||||
|
@ -561,10 +561,10 @@ class ReorderIds(tool.BatchTool, ManagedWindow, UpdateCallback):
|
||||
print('\nDone.')
|
||||
|
||||
# finds integer portion in a GrampsID
|
||||
_findint = re.compile('^[^\d]*(\d+)[^\d]*$')
|
||||
_findint = re.compile(r'^[^\d]*(\d+)[^\d]*$')
|
||||
# finds prefix, number, suffix of a Gramps ID ignoring a leading or
|
||||
# trailing space. The number must be at least three digits.
|
||||
_prob_id = re.compile('^ *([^\d]*)(\d{3,9})([^\d]*) *$')
|
||||
_prob_id = re.compile(r'^ *([^\d]*)(\d{3,9})([^\d]*) *$')
|
||||
|
||||
def _reorder(self, prim_obj):
|
||||
""" reorders all selected objects with a (new) style, start & step """
|
||||
|
@ -508,9 +508,11 @@ class GeoClose(GeoGraphyView):
|
||||
fhandle = family_list[0] # first is primary
|
||||
fam = dbstate.db.get_family_from_handle(fhandle)
|
||||
handle = fam.get_father_handle()
|
||||
father = dbstate.db.get_person_from_handle(handle)
|
||||
if father:
|
||||
descr1 = "%s - " % _nd.display(father)
|
||||
descr1 = " - "
|
||||
if handle:
|
||||
father = dbstate.db.get_person_from_handle(handle)
|
||||
if father:
|
||||
descr1 = "%s - " % _nd.display(father)
|
||||
handle = fam.get_mother_handle()
|
||||
if handle:
|
||||
mother = dbstate.db.get_person_from_handle(handle)
|
||||
|
@ -635,18 +635,10 @@ class BasePage: # pylint: disable=C1001
|
||||
(self._("Event"), "ColumnEvent"),
|
||||
(self._("Date"), "ColumnDate"),
|
||||
(self._("Place"), "ColumnPlace"),
|
||||
(self._("Description"), "ColumnDescription")]
|
||||
(self._("Description"), "ColumnDescription"),
|
||||
(self._("Sources"), "ColumnSources")]
|
||||
)
|
||||
trow += Html("/tr", close=None)
|
||||
trow2 = Html("tr", indent=False)
|
||||
trow2.extend(
|
||||
Html("th", trans, class_=colclass, colspan=opt, inline=True)
|
||||
for trans, colclass, opt in [
|
||||
("", "ColumnEvent", 1),
|
||||
(self._("Sources"), "ColumnSources", 1),
|
||||
(self._("Notes"), "ColumnNotes", 2)]
|
||||
)
|
||||
trow.extend(trow2)
|
||||
return trow
|
||||
|
||||
def display_event_row(self, event, event_ref, place_lat_long,
|
||||
@ -697,10 +689,10 @@ class BasePage: # pylint: disable=C1001
|
||||
)
|
||||
|
||||
trow2 = Html("tr")
|
||||
trow2 += Html("td", "", class_="ColumnSources")
|
||||
trow2 += Html("td", "", class_="ColumnEvent")
|
||||
# get event source references
|
||||
srcrefs = self.get_citation_links(event.get_citation_list()) or " "
|
||||
trow2 += Html("td", srcrefs, class_="ColumnSources")
|
||||
trow += Html("td", srcrefs, class_="ColumnSources", rowspan=2)
|
||||
|
||||
# get event notes
|
||||
notelist = event.get_note_list()
|
||||
@ -723,7 +715,7 @@ class BasePage: # pylint: disable=C1001
|
||||
if notelist:
|
||||
htmllist.extend(self.dump_notes(notelist))
|
||||
|
||||
trow2 += Html("td", htmllist, class_="ColumnNotes", colspan=2)
|
||||
trow2 += Html("td", htmllist, class_="ColumnNotes", colspan=3)
|
||||
|
||||
trow += trow2
|
||||
# return events table row to its callers
|
||||
@ -1415,10 +1407,10 @@ class BasePage: # pylint: disable=C1001
|
||||
# create stylesheet and favicon links
|
||||
links = Html("link", type="image/x-icon",
|
||||
href=url4, rel="shortcut icon") + (
|
||||
Html("link", type="text/css", href=url3,
|
||||
media='print', rel="stylesheet", indent=False),
|
||||
Html("link", type="text/css", href=url2,
|
||||
media="screen", rel="stylesheet", indent=False),
|
||||
Html("link", type="text/css", href=url3,
|
||||
media='print', rel="stylesheet", indent=False)
|
||||
)
|
||||
|
||||
# Link to Navigation Menus stylesheet
|
||||
|
@ -74,7 +74,7 @@ class StatisticsPage(BasePage):
|
||||
for this report
|
||||
@param: title -- Is the title of the web page
|
||||
"""
|
||||
import posixpath
|
||||
import os
|
||||
BasePage.__init__(self, report, title)
|
||||
self.bibli = Bibliography()
|
||||
self.uplink = False
|
||||
@ -99,7 +99,7 @@ class StatisticsPage(BasePage):
|
||||
total_media += 1
|
||||
fullname = media_path_full(report.database, media.get_path())
|
||||
try:
|
||||
chars += posixpath.getsize(fullname)
|
||||
chars += os.path.getsize(fullname)
|
||||
length = len(str(chars))
|
||||
if chars <= 999999:
|
||||
mbytes = _("less than 1")
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Copyright (C) 2008-2011 Rob G. Healey <robhealey1@gmail.com>
|
||||
# Copyright (C) 2008 Jason Simanek
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
# Copyright (C) 2015-2016 Serge Noiraud
|
||||
# Copyright (C) 2015- Serge Noiraud
|
||||
#
|
||||
# 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
|
||||
@ -34,6 +34,7 @@ Web Calendar generator.
|
||||
#------------------------------------------------------------------------
|
||||
import os, shutil
|
||||
import datetime
|
||||
import time
|
||||
import calendar # Python module
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@ -146,6 +147,10 @@ class WebCalReport(Report):
|
||||
self.multiyear = mgobn('multiyear')
|
||||
self.start_year = mgobn('start_year')
|
||||
self.end_year = mgobn('end_year')
|
||||
if not self.multiyear:
|
||||
self.end_year = self.start_year
|
||||
if self.end_year < self.start_year:
|
||||
self.end_year = self.start_year
|
||||
|
||||
self.maiden_name = mgobn('maiden_name')
|
||||
|
||||
@ -512,6 +517,7 @@ class WebCalReport(Report):
|
||||
# limit number of years to eighteen (18) years and only one row of years
|
||||
nyears = ((self.end_year - self.start_year) + 1)
|
||||
num_years = nyears if 0 < nyears < 19 else 18
|
||||
self.end_year = (self.start_year + 17) if nyears > 18 else self.end_year
|
||||
|
||||
# begin year division and begin unordered list
|
||||
with Html("div", id="subnavigation",
|
||||
@ -535,8 +541,8 @@ class WebCalReport(Report):
|
||||
# Note. We use '/' here because it is a URL, not a OS dependent
|
||||
# pathname.
|
||||
url = '/'.join(subdirs + [full_month_name]) + self.ext
|
||||
hyper = Html("a", str(cal_year), href=url,
|
||||
title=str(cal_year))
|
||||
hyper = Html("a", self.rlocale.get_date(Date(cal_year)),
|
||||
href=url, title=str(cal_year))
|
||||
|
||||
# Figure out if we need <li class="CurrentSection">
|
||||
# or just plain <li>
|
||||
@ -702,7 +708,8 @@ class WebCalReport(Report):
|
||||
th_txt = month_name
|
||||
if cal == 'wc': # webcalendar()
|
||||
if not self.multiyear:
|
||||
th_txt = '%s %04d' % (month_name, year)
|
||||
th_txt = '%s %s' % (month_name,
|
||||
self._get_date(Date(year))) # localized
|
||||
|
||||
# begin calendar table and table head
|
||||
with Html("table", class_="calendar",
|
||||
@ -1563,8 +1570,8 @@ class WebCalReport(Report):
|
||||
index, body = self.write_header(nr_up, title, "index", False)
|
||||
|
||||
# create Year Navigation menu
|
||||
if self.multiyear and ((self.end_year - self.start_year) > 0):
|
||||
body += self.year_navigation(nr_up, str(2016))
|
||||
current_year = time.strftime("%Y", time.gmtime())
|
||||
body += self.year_navigation(nr_up, str(current_year))
|
||||
|
||||
# create blank line for stylesheets
|
||||
# write footer section
|
||||
|
8
po/da.po
8
po/da.po
@ -7744,18 +7744,18 @@ msgid "Marriage Contract abbreviation|m.con."
|
||||
msgstr "ægtesk.kontr."
|
||||
|
||||
# Fra: http://genealogytipoftheday.blogspot.com/2010/08/marriage-bann.html
|
||||
#
|
||||
#
|
||||
# Marriage Bann?
|
||||
# A marriage bann is an announcement of an upcoming marriage.
|
||||
# Usually made for three consecutive weeks in church, banns may also be
|
||||
# publicly published announcements of an upcoming marriage.
|
||||
#
|
||||
#
|
||||
# Usually done so that anyone with knowledge of why the couple should not be
|
||||
# married could come forth with the reason.
|
||||
#
|
||||
#
|
||||
# The publication (or announcement) of the banns does not necessarily mean
|
||||
# that the marriage actually took place.
|
||||
#
|
||||
#
|
||||
# Dansk oversættelse ...bryllupskundgørelse? -MBJ
|
||||
#: ../gramps/gen/lib/eventtype.py:251
|
||||
msgid "Marriage Banns abbreviation|m.ban."
|
||||
|
32
po/hr.po
32
po/hr.po
@ -2080,7 +2080,7 @@ msgstr "D MMM GGGG"
|
||||
#. to learn how to select proper inflection for your language.
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:181
|
||||
#: ../gramps/plugins/drawreport/calendarreport.py:233
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2090,7 +2090,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:189
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "from|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2100,7 +2100,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:197
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "to|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2110,7 +2110,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:205
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "between|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2120,7 +2120,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:213
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "and|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2129,7 +2129,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:220
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "before|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2138,7 +2138,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:227
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "after|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2147,7 +2147,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:234
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "about|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2156,7 +2156,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:241
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "estimated|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2165,7 +2165,7 @@ msgstr "{long_month.f[G]} {year}."
|
||||
#. (where X is one of the month-name inflections you defined)
|
||||
#. else leave it untranslated
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:248
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-format
|
||||
msgid "calculated|{long_month} {year}"
|
||||
msgstr "{long_month.f[G]} {year}."
|
||||
|
||||
@ -2276,7 +2276,7 @@ msgstr "to"
|
||||
#: ../gramps/gen/datehandler/_datedisplay.py:433
|
||||
#, python-brace-format
|
||||
msgid "{date_quality}from {date_start} to {date_stop}{nonstd_calendar_and_ny}"
|
||||
msgstr "{date_quality} od {date_start} do {date_stop}{nonstd_calendar_and_ny}"
|
||||
msgstr "{date_quality}od {date_start} do {date_stop}{nonstd_calendar_and_ny}"
|
||||
|
||||
#. If there is no special inflection for "between <Month>"
|
||||
#. in your language, DON'T translate this string. Otherwise,
|
||||
@ -2297,7 +2297,7 @@ msgstr "and"
|
||||
msgid ""
|
||||
"{date_quality}between {date_start} and {date_stop}{nonstd_calendar_and_ny}"
|
||||
msgstr ""
|
||||
"{date_quality} između {date_start} i {date_stop}{nonstd_calendar_and_ny}"
|
||||
"{date_quality}između {date_start} i {date_stop}{nonstd_calendar_and_ny}"
|
||||
|
||||
#. If there is no special inflection for "before <Month>"
|
||||
#. in your language, DON'T translate this string. Otherwise,
|
||||
@ -20270,13 +20270,13 @@ msgid_plural ""
|
||||
"{spouse} and\n"
|
||||
" {person}, {nyears}"
|
||||
msgstr[0] ""
|
||||
"{spouse} and\n"
|
||||
"{spouse} i\n"
|
||||
" {person}, {nyears}"
|
||||
msgstr[1] ""
|
||||
"{spouse} and\n"
|
||||
"{spouse} i\n"
|
||||
" {person}, {nyears}"
|
||||
msgstr[2] ""
|
||||
"{spouse} and\n"
|
||||
"{spouse} i\n"
|
||||
" {person}, {nyears}"
|
||||
|
||||
#: ../gramps/plugins/drawreport/calendarreport.py:472
|
||||
@ -20981,7 +20981,7 @@ msgstr "Spremanje dijagrama..."
|
||||
#: ../gramps/plugins/drawreport/statisticschart.py:939
|
||||
#, python-format
|
||||
msgid "%s (persons):"
|
||||
msgstr "%s (persons):"
|
||||
msgstr "%s (osobe):"
|
||||
|
||||
#: ../gramps/plugins/drawreport/statisticschart.py:991
|
||||
#: ../gramps/plugins/textreport/recordsreport.py:219
|
||||
|
33
po/is.po
33
po/is.po
@ -24142,9 +24142,9 @@ msgid "Field '%(fldname)s' not found"
|
||||
msgstr "Gagnasviðið '%(fldname)s' fannst ekki"
|
||||
|
||||
#: ../gramps/plugins/importer/importprogen.py:460
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Cannot find DEF file: %(dname)s"
|
||||
msgstr "Ekki rétt DEF-skrá: %(dname)s"
|
||||
msgstr "Finn ekki DEF-skrána: %(dname)s"
|
||||
|
||||
#. Raise a error message
|
||||
#: ../gramps/plugins/importer/importprogen.py:516
|
||||
@ -24168,14 +24168,14 @@ msgid "Date did not match: '%(text)s' (%(msg)s)"
|
||||
msgstr "Dagsetning samsvarar ekki: '%(text)s' (%(msg)s)"
|
||||
|
||||
#: ../gramps/plugins/importer/importprogen.py:1790
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Cannot find father for I%(person)s (Father=%(id)d)"
|
||||
msgstr "Finn ekki föður fyrir I%(person)s (faðir=%(father))"
|
||||
msgstr "Finn ekki föður fyrir I%(person)s (faðir=%(id)d)"
|
||||
|
||||
#: ../gramps/plugins/importer/importprogen.py:1793
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Cannot find mother for I%(person)s (Mother=%(mother)d)"
|
||||
msgstr "Finn ekki móður fyrir I%(person)s (móðir=%(mother))"
|
||||
msgstr "Finn ekki móður fyrir I%(person)s (móðir=%(mother)d)"
|
||||
|
||||
#: ../gramps/plugins/importer/importvcard.py:228
|
||||
#, python-format
|
||||
@ -35826,14 +35826,6 @@ msgstr "Nebraska"
|
||||
msgid "No style sheet"
|
||||
msgstr "Ekkert stílblað"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Alternate line attachment"
|
||||
#~ msgstr "Varanöfn"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Whether lines attach to nodes differently"
|
||||
#~ msgstr "Hvort tengja eigi gögn við vefskýrslu"
|
||||
|
||||
#: ../gramps/gui/configure.py:565
|
||||
msgid "Gender Male Alive"
|
||||
msgstr "Flötur lifandi karlmanns"
|
||||
@ -35920,6 +35912,13 @@ msgstr ""
|
||||
"%(strong1_start)s%(page_number)d%(strong_end)s af %(strong2_start)s"
|
||||
"%(total_pages)d%(strong_end)s"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Alternate line attachment"
|
||||
#~ msgstr "Varanöfn"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Whether lines attach to nodes differently"
|
||||
#~ msgstr "Hvort tengja eigi gögn við vefskýrslu"
|
||||
|
||||
#~ msgid "Gender Male Death"
|
||||
#~ msgstr "Flötur látins karlmanns"
|
||||
@ -36690,3 +36689,9 @@ msgstr ""
|
||||
|
||||
#~ msgid "Requested page type not known"
|
||||
#~ msgstr "Umbeðin tegund síðu er ekki þekkt"
|
||||
|
||||
#~ msgid "Importing families"
|
||||
#~ msgstr "Innflutningur á fjölskyldum"
|
||||
|
||||
#~ msgid "Adding children"
|
||||
#~ msgstr "Bæta við börnum"
|
||||
|
327
po/vi.po
327
po/vi.po
@ -36480,6 +36480,151 @@ msgstr "Nebraska "
|
||||
msgid "No style sheet"
|
||||
msgstr "Không có style sheet "
|
||||
|
||||
#: ../gramps/gui/configure.py:565
|
||||
msgid "Gender Male Alive"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/gui/configure.py:571
|
||||
#, fuzzy
|
||||
msgid "Border Male Death"
|
||||
msgstr "Tuổi chết "
|
||||
|
||||
#: ../gramps/gui/configure.py:573
|
||||
msgid "Gender Female Alive"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/gui/configure.py:579
|
||||
msgid "Border Female Death"
|
||||
msgstr ""
|
||||
|
||||
#. # self.add_color(grid, _('Gender Other Alive'), 5,
|
||||
#. # 'preferences.color-gender-other-alive')
|
||||
#. # self.add_color(grid, _('Border Other Alive'), 6,
|
||||
#. # 'preferences.bordercolor-gender-other-alive')
|
||||
#. # self.add_color(grid, _('Gender Other Death'), 7,
|
||||
#. # 'preferences.color-gender-other-death')
|
||||
#. # self.add_color(grid, _('Border Other Death'), 8,
|
||||
#. # 'preferences.bordercolor-gender-other-death')
|
||||
#: ../gramps/gui/configure.py:589
|
||||
#, fuzzy
|
||||
msgid "Gender Unknown Alive"
|
||||
msgstr "Giới tính không rõ "
|
||||
|
||||
#: ../gramps/gui/configure.py:595
|
||||
#, fuzzy
|
||||
msgid "Border Unknown Death"
|
||||
msgstr "Không biết cha "
|
||||
|
||||
#: ../gramps/gui/configure.py:1132
|
||||
msgid "Suppress comma after house number"
|
||||
msgstr "Bỏ phẩy sau số nhà"
|
||||
|
||||
#: ../gramps/gui/editors/editplace.py:199
|
||||
#: ../gramps/gui/editors/editplaceref.py:192
|
||||
#, fuzzy
|
||||
msgid "Invalid latitude (syntax: 18\\u00b09'"
|
||||
msgstr "Kinh tuyền sai (cấu trúc: 18°9'"
|
||||
|
||||
#: ../gramps/gui/editors/editplace.py:202
|
||||
#: ../gramps/gui/editors/editplaceref.py:195
|
||||
#, fuzzy
|
||||
msgid "Invalid longitude (syntax: 18\\u00b09'"
|
||||
msgstr "Kinh tuyến sai (cấu trúc: 18°9'"
|
||||
|
||||
#: ../gramps/gui/editors/editrepository.py:60
|
||||
#, fuzzy
|
||||
msgid "manual|New_Repositories_dialog"
|
||||
msgstr "thủ công|Hòa_Kho tư liệu "
|
||||
|
||||
#: ../gramps/gui/editors/filtereditor.py:1186
|
||||
msgid ""
|
||||
"This filter is currently being used as the base for other filters. "
|
||||
"Deletingthis filter will result in removing all other filters that depend on "
|
||||
"it."
|
||||
msgstr ""
|
||||
"Bộ lọc này hiện được dùng làm cơ sở cho các bộ lọc khác. Xóa bộ lọc này sẽ "
|
||||
"dẫn đến xóa bỏ tất cả các bộ lọc khác phụ thuộc vào nó. "
|
||||
|
||||
#: ../gramps/gui/glade/editcitation.glade:201
|
||||
msgid ""
|
||||
"Conveys the submitter's quantitative evaluation of the credibility of a "
|
||||
"piece of information, based upon its supporting evidence. It is not intended "
|
||||
"to eliminate the receiver's need to evaluate the evidence for themselves.\n"
|
||||
"Very Low =Unreliable evidence or estimated data\n"
|
||||
"Low =Questionable reliability of evidence (interviews, census, oral "
|
||||
"genealogies, or potential for bias for example, an autobiography)\n"
|
||||
"High =Secondary evidence, data officially recorded sometime after event\n"
|
||||
"Very High =Direct and primary evidence used, or by dominance of the evidence "
|
||||
msgstr ""
|
||||
"Chuyển tại đánh giá của người gửi về độ tin cậy của thông tin, căn cứ vào "
|
||||
"các chứng cứ hỗ trợ. Nó không nhằm loại bỏ nhu cầu đánh giá bằng chứng của "
|
||||
"người nhận.\n"
|
||||
"Rất thấp=Chứng cứ không đáng tin cậy hay số liệu phỏng đoán \n"
|
||||
" Thấp=bằng chứng đáng nghi ngờ (phỏng vấn, thống kê, chuyện kể miệng, hoặc "
|
||||
"có khả năng thiên vị, thí dụ: tự truyện)\n"
|
||||
"Cao=Có bằng chứa thứ cấp, số liệu ghi chép chính thức vào thời gian nào đó "
|
||||
"sau sự kiện\n"
|
||||
"Rất cao= Bằng chứng trực tiếp và chủ yếu được dùng, hay làm chủ của chứng cứ "
|
||||
"đó. "
|
||||
|
||||
#: ../gramps/gui/glade/editplace.glade:105
|
||||
#: ../gramps/gui/glade/editplaceref.glade:228
|
||||
msgid ""
|
||||
"Either use the two fields below to enter coordinates(latitude and longitude),"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/gui/undohistory.py:57
|
||||
msgid "11"
|
||||
msgstr "11"
|
||||
|
||||
#: ../gramps/plugins/db/bsddb/write.py:2303
|
||||
#, fuzzy
|
||||
msgid "Database db version"
|
||||
msgstr "Phiên bản "
|
||||
|
||||
#: ../gramps/plugins/db/dbapi/dbapi.gpr.py:26
|
||||
msgid "DB-API"
|
||||
msgstr "DB-API"
|
||||
|
||||
#: ../gramps/plugins/webreport/narrativeweb.py:5367
|
||||
#, fuzzy, python-format
|
||||
msgid ""
|
||||
"%(strong1_start)s%(page_number)d%(strong_end)s of %(strong2_start)s"
|
||||
"%(total_pages)d%(strong_end)s"
|
||||
msgstr ""
|
||||
"<strong id = \"GalleryCurrent\">%(page_number)d</strong> / <strong id = "
|
||||
"\"GalleryTotal\">%(total_pages)d</strong>"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Person or Place|Title"
|
||||
msgstr "Chức danh "
|
||||
|
||||
#, fuzzy
|
||||
msgid "manual|Merge_citations..."
|
||||
msgstr "Hòa_trích dẫn...."
|
||||
|
||||
msgid "HtmlView"
|
||||
msgstr "Xem "
|
||||
|
||||
msgid "short for married|m."
|
||||
msgstr "kh. "
|
||||
|
||||
msgid "manual|Interactive_Descendant_Browser..."
|
||||
msgstr "Bộ_duyệt_con_cháu_tương_tác..."
|
||||
|
||||
msgid "manual|Generate_SoundEx_codes"
|
||||
msgstr "Tạo_mã_SoundEx "
|
||||
|
||||
msgid "Media |Gallery"
|
||||
msgstr " Kho hình"
|
||||
|
||||
msgid "Media | Gallery"
|
||||
msgstr " Kho hình"
|
||||
|
||||
#, fuzzy
|
||||
msgid "html|Home"
|
||||
msgstr "Trang chủ "
|
||||
|
||||
#~ msgid "Alternate line attachment"
|
||||
#~ msgstr "Tệp kèm dòng khác"
|
||||
|
||||
@ -36543,22 +36688,6 @@ msgstr "Không có style sheet "
|
||||
#~ "Văn bản thông số nguồn\n"
|
||||
#~ "(Văn bản, tên tập tin nhập & (System-)Date)."
|
||||
|
||||
#: ../gramps/gui/configure.py:565
|
||||
msgid "Gender Male Alive"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/gui/configure.py:571
|
||||
#, fuzzy
|
||||
msgid "Border Male Death"
|
||||
msgstr "Tuổi chết "
|
||||
|
||||
#: ../gramps/gui/configure.py:573
|
||||
msgid "Gender Female Alive"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/gui/configure.py:579
|
||||
msgid "Border Female Death"
|
||||
msgstr ""
|
||||
#~ msgid "Citation reference."
|
||||
#~ msgstr "Tham chiếu trích dẫn"
|
||||
|
||||
@ -36576,28 +36705,6 @@ msgstr ""
|
||||
#~ "Văn bản quyển/trang trích\n"
|
||||
#~ "(văn bản & (System-)Date)."
|
||||
|
||||
#. # self.add_color(grid, _('Gender Other Alive'), 5,
|
||||
#. # 'preferences.color-gender-other-alive')
|
||||
#. # self.add_color(grid, _('Border Other Alive'), 6,
|
||||
#. # 'preferences.bordercolor-gender-other-alive')
|
||||
#. # self.add_color(grid, _('Gender Other Death'), 7,
|
||||
#. # 'preferences.color-gender-other-death')
|
||||
#. # self.add_color(grid, _('Border Other Death'), 8,
|
||||
#. # 'preferences.bordercolor-gender-other-death')
|
||||
#: ../gramps/gui/configure.py:589
|
||||
#, fuzzy
|
||||
msgid "Gender Unknown Alive"
|
||||
msgstr "Giới tính không rõ "
|
||||
|
||||
#: ../gramps/gui/configure.py:595
|
||||
#, fuzzy
|
||||
msgid "Border Unknown Death"
|
||||
msgstr "Không biết cha "
|
||||
|
||||
#: ../gramps/gui/configure.py:1132
|
||||
msgid "Suppress comma after house number"
|
||||
msgstr "Bỏ phẩy sau số nhà"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Citation attribute text\n"
|
||||
#~ "(Text, import Filename & (System-)Date)."
|
||||
@ -36624,31 +36731,6 @@ msgstr "Bỏ phẩy sau số nhà"
|
||||
#~ msgid "Combined default text + filename + date."
|
||||
#~ msgstr "Văn bản mặc định kết hợp + tên tập tin + ngày tháng. "
|
||||
|
||||
#: ../gramps/gui/editors/editplace.py:199
|
||||
#: ../gramps/gui/editors/editplaceref.py:192
|
||||
#, fuzzy
|
||||
msgid "Invalid latitude (syntax: 18\\u00b09'"
|
||||
msgstr "Kinh tuyền sai (cấu trúc: 18°9'"
|
||||
|
||||
#: ../gramps/gui/editors/editplace.py:202
|
||||
#: ../gramps/gui/editors/editplaceref.py:195
|
||||
#, fuzzy
|
||||
msgid "Invalid longitude (syntax: 18\\u00b09'"
|
||||
msgstr "Kinh tuyến sai (cấu trúc: 18°9'"
|
||||
|
||||
#: ../gramps/gui/editors/editrepository.py:60
|
||||
#, fuzzy
|
||||
msgid "manual|New_Repositories_dialog"
|
||||
msgstr "thủ công|Hòa_Kho tư liệu "
|
||||
|
||||
#: ../gramps/gui/editors/filtereditor.py:1186
|
||||
msgid ""
|
||||
"This filter is currently being used as the base for other filters. "
|
||||
"Deletingthis filter will result in removing all other filters that depend on "
|
||||
"it."
|
||||
msgstr ""
|
||||
"Bộ lọc này hiện được dùng làm cơ sở cho các bộ lọc khác. Xóa bộ lọc này sẽ "
|
||||
"dẫn đến xóa bỏ tất cả các bộ lọc khác phụ thuộc vào nó. "
|
||||
#~ msgid ""
|
||||
#~ "Copy Default Date\n"
|
||||
#~ "to all sensitive Tag Text'."
|
||||
@ -36669,46 +36751,6 @@ msgstr ""
|
||||
#~ msgid "Tag Text"
|
||||
#~ msgstr "Văn bản thẻ"
|
||||
|
||||
#: ../gramps/gui/glade/editcitation.glade:201
|
||||
msgid ""
|
||||
"Conveys the submitter's quantitative evaluation of the credibility of a "
|
||||
"piece of information, based upon its supporting evidence. It is not intended "
|
||||
"to eliminate the receiver's need to evaluate the evidence for themselves.\n"
|
||||
"Very Low =Unreliable evidence or estimated data\n"
|
||||
"Low =Questionable reliability of evidence (interviews, census, oral "
|
||||
"genealogies, or potential for bias for example, an autobiography)\n"
|
||||
"High =Secondary evidence, data officially recorded sometime after event\n"
|
||||
"Very High =Direct and primary evidence used, or by dominance of the evidence "
|
||||
msgstr ""
|
||||
"Chuyển tại đánh giá của người gửi về độ tin cậy của thông tin, căn cứ vào "
|
||||
"các chứng cứ hỗ trợ. Nó không nhằm loại bỏ nhu cầu đánh giá bằng chứng của "
|
||||
"người nhận.\n"
|
||||
"Rất thấp=Chứng cứ không đáng tin cậy hay số liệu phỏng đoán \n"
|
||||
" Thấp=bằng chứng đáng nghi ngờ (phỏng vấn, thống kê, chuyện kể miệng, hoặc "
|
||||
"có khả năng thiên vị, thí dụ: tự truyện)\n"
|
||||
"Cao=Có bằng chứa thứ cấp, số liệu ghi chép chính thức vào thời gian nào đó "
|
||||
"sau sự kiện\n"
|
||||
"Rất cao= Bằng chứng trực tiếp và chủ yếu được dùng, hay làm chủ của chứng cứ "
|
||||
"đó. "
|
||||
|
||||
#: ../gramps/gui/glade/editplace.glade:105
|
||||
#: ../gramps/gui/glade/editplaceref.glade:228
|
||||
msgid ""
|
||||
"Either use the two fields below to enter coordinates(latitude and longitude),"
|
||||
msgstr ""
|
||||
|
||||
#: ../gramps/gui/undohistory.py:57
|
||||
msgid "11"
|
||||
msgstr "11"
|
||||
|
||||
#: ../gramps/plugins/db/bsddb/write.py:2303
|
||||
#, fuzzy
|
||||
msgid "Database db version"
|
||||
msgstr "Phiên bản "
|
||||
|
||||
#: ../gramps/plugins/db/dbapi/dbapi.gpr.py:26
|
||||
msgid "DB-API"
|
||||
msgstr "DB-API"
|
||||
#~ msgid "Import Objects"
|
||||
#~ msgstr "Đối tượng nhập"
|
||||
|
||||
@ -36750,15 +36792,6 @@ msgstr "DB-API"
|
||||
#~ msgid "Identifier"
|
||||
#~ msgstr "Số nhận diện"
|
||||
|
||||
#: ../gramps/plugins/webreport/narrativeweb.py:5367
|
||||
#, fuzzy, python-format
|
||||
msgid ""
|
||||
"%(strong1_start)s%(page_number)d%(strong_end)s of %(strong2_start)s"
|
||||
"%(total_pages)d%(strong_end)s"
|
||||
msgstr ""
|
||||
"<strong id = \"GalleryCurrent\">%(page_number)d</strong> / <strong id = "
|
||||
"\"GalleryTotal\">%(total_pages)d</strong>"
|
||||
|
||||
#~ msgid "Diverse"
|
||||
#~ msgstr "Khác"
|
||||
|
||||
@ -37247,10 +37280,6 @@ msgstr ""
|
||||
#~ msgid "%(type)s: %(list)s"
|
||||
#~ msgstr "%(type)s: %(list)s"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Person or Place|Title"
|
||||
#~ msgstr "Chức danh "
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Birth place id"
|
||||
#~ msgstr "Nơi sinh "
|
||||
@ -37480,10 +37509,6 @@ msgstr ""
|
||||
#~ "Dưới đây là danh sách các địa điểm với các dữ liệu có thể được rút ra từ "
|
||||
#~ "tiêu đề địa điểm.Chọn địa điểm bạn muốn Gramps đổi. "
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "manual|Merge_citations..."
|
||||
#~ msgstr "Hòa_trích dẫn...."
|
||||
|
||||
#~ msgid "Extract Place Data from a Place Title"
|
||||
#~ msgstr "Rúa số liệu địa điểm từ tên địa điểm "
|
||||
|
||||
@ -37834,9 +37859,6 @@ msgstr ""
|
||||
#~ msgid "Web"
|
||||
#~ msgstr "Web "
|
||||
|
||||
#~ msgid "HtmlView"
|
||||
#~ msgstr "Xem "
|
||||
|
||||
#~ msgid "Go to the previous page in the history"
|
||||
#~ msgstr "Đi đến trang trước trong lịch sử "
|
||||
|
||||
@ -38224,9 +38246,6 @@ msgstr ""
|
||||
#~ msgid "<no name>"
|
||||
#~ msgstr "<không tên> "
|
||||
|
||||
#~ msgid "short for married|m."
|
||||
#~ msgstr "kh. "
|
||||
|
||||
#~ msgid "Active person: <b>%s</b>"
|
||||
#~ msgstr "Người hoạt động: <b>%s</b>"
|
||||
|
||||
@ -38291,9 +38310,6 @@ msgstr ""
|
||||
#~ msgid "<i>Double-click on the row to edit personal information</i>"
|
||||
#~ msgstr "<i>Nhấp đúp vào dòng để sửa thông tin cá nhân</i> "
|
||||
|
||||
#~ msgid "manual|Interactive_Descendant_Browser..."
|
||||
#~ msgstr "Bộ_duyệt_con_cháu_tương_tác..."
|
||||
|
||||
#~ msgid "Descendant Browser tool"
|
||||
#~ msgstr "Công cụ duyệt con cháu "
|
||||
|
||||
@ -38315,9 +38331,6 @@ msgstr ""
|
||||
#~ msgid "Close Window"
|
||||
#~ msgstr "Đóng cửa sổ "
|
||||
|
||||
#~ msgid "manual|Generate_SoundEx_codes"
|
||||
#~ msgstr "Tạo_mã_SoundEx "
|
||||
|
||||
#~ msgid "Interactive Descendant Browser"
|
||||
#~ msgstr "Trình duyệt con cháu tương tác "
|
||||
|
||||
@ -38897,12 +38910,6 @@ msgstr ""
|
||||
#~ msgid "Source Reference: %s"
|
||||
#~ msgstr "Tham chiếu nguồn:%s "
|
||||
|
||||
#~ msgid "Media |Gallery"
|
||||
#~ msgstr " Kho hình"
|
||||
|
||||
#~ msgid "Media | Gallery"
|
||||
#~ msgstr " Kho hình"
|
||||
|
||||
#~ msgid "Partner 1"
|
||||
#~ msgstr "Bạn đời 1 "
|
||||
|
||||
@ -39585,10 +39592,6 @@ msgstr ""
|
||||
#~ msgid "Sub Navigation Menu Item: Year %04d"
|
||||
#~ msgstr "Mục menu di chuyển alphabet "
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "html|Home"
|
||||
#~ msgstr "Trang chủ "
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Main Navigation Menu Item: %s"
|
||||
#~ msgstr "Mục di chuyển chính %s "
|
||||
@ -39993,3 +39996,43 @@ msgstr ""
|
||||
|
||||
#~ msgid "Family Sources"
|
||||
#~ msgstr "Nguồn gia đình "
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Copy Default Text\n"
|
||||
#~ "to all Tag Text'."
|
||||
#~ msgstr ""
|
||||
#~ "Sao chép văn bản mặc định\n"
|
||||
#~ "sang tất cả văn bản thẻ'."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Copy Default Filename\n"
|
||||
#~ "to all sensitive Tag Text'."
|
||||
#~ msgstr ""
|
||||
#~ "Chép tên tập tin mặc định\n"
|
||||
#~ "sang tất cả văn bản thẻ nhạy cảm'."
|
||||
|
||||
#~ msgid "Name change"
|
||||
#~ msgstr "Thay đổi tên"
|
||||
|
||||
#~ msgid "Event date"
|
||||
#~ msgstr "Ngày sự kiện"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Store birth date in\n"
|
||||
#~ "event description."
|
||||
#~ msgstr ""
|
||||
#~ "Lưu ngày tháng sinh ở\n"
|
||||
#~ "mô tả sự kiện."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Store death date in\n"
|
||||
#~ "event description."
|
||||
#~ msgstr ""
|
||||
#~ "Mô tả ngày tháng chết ở\n"
|
||||
#~ "mô tả sự kiện."
|
||||
|
||||
#~ msgid "Importing families"
|
||||
#~ msgstr "Nhập gia đình "
|
||||
|
||||
#~ msgid "Adding children"
|
||||
#~ msgstr "Thêm con "
|
||||
|
3
setup.py
3
setup.py
@ -80,7 +80,8 @@ def intltool_version():
|
||||
Return the version of intltool as a tuple.
|
||||
'''
|
||||
if sys.platform == 'win32':
|
||||
cmd = ["perl", "-e print qx(intltool-update --version) =~ m/(\d+.\d+.\d+)/;"]
|
||||
cmd = ["perl",
|
||||
r"-e print qx(intltool-update --version) =~ m/(\d+.\d+.\d+)/;"]
|
||||
try:
|
||||
ver, ret = subprocess.Popen(cmd ,stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, shell=True).communicate()
|
||||
|
@ -222,7 +222,7 @@ class buildbase(GObject.GObject):
|
||||
os.makedirs(mo_dir)
|
||||
#TODO: find a better way to handle different platforms
|
||||
if sys.platform == 'win32':
|
||||
po_files = glob.glob(po_dir + "\*.po")
|
||||
po_files = glob.glob(po_dir + r"\*.po")
|
||||
# no longer using python msgfmt as it doesn't handle plurals (april 2010)
|
||||
# msgfmtCmd = path.normpath(path.join(sys.prefix, "Tools/i18n/msgfmt.py") )
|
||||
|
||||
|
@ -138,7 +138,8 @@ def ScanDependencyFileForErrors(fname):
|
||||
parts = line[pthend_idx:].split()
|
||||
OK = False
|
||||
if dirname.startswith(os.path.join(sysroot, 'winsxs').lower()) \
|
||||
or dirname.startswith(os.path.join(sys.prefix, 'lib\site-packages\gtk-2.0').lower()):
|
||||
or dirname.startswith(os.path.join(
|
||||
sys.prefix, r'lib\site-packages\gtk-2.0').lower()):
|
||||
OK = True
|
||||
|
||||
for pth in acceptablePaths:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user