Support msgctxt in po files instead of a vertical bar in the msgid
For developers, an extra optional context parameter has been added to the gettext functions. For example, _('point size|pt') should now be written as _('pt', 'point size'). For translators this would appear in the message catalog as: msgctxt "point size" msgid "pt" msgstr "pt" Implements #3416.
This commit is contained in:
parent
01403a0d03
commit
cc7ca7ff99
@ -47,8 +47,8 @@ from .const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
#---------------------------------------------------------------
|
||||
#
|
||||
@ -316,7 +316,7 @@ register('utf8.selected-font', "")
|
||||
register('utf8.death-symbol', 13)
|
||||
|
||||
if __debug__: # enable a simple CLI test to see if the datestrings exist
|
||||
register('test.january', _("localized lexeme inflections||January"))
|
||||
register('test.january', _("|January", "localized lexeme inflections"))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
#
|
||||
|
@ -257,8 +257,8 @@ DOCUMENTERS = [
|
||||
THUMBSCALE = 96.0
|
||||
THUMBSCALE_LARGE = 180.0
|
||||
XMLFILE = "data.gramps"
|
||||
NO_SURNAME = "(%s)" % _("surname|none")
|
||||
NO_GIVEN = "(%s)" % _("given-name|none")
|
||||
NO_SURNAME = "(%s)" % _("none", "surname")
|
||||
NO_GIVEN = "(%s)" % _("none", "given-name")
|
||||
ARABIC_COMMA = "،"
|
||||
ARABIC_SEMICOLON = "؛"
|
||||
DOCGEN_OPTIONS = 'Docgen Options'
|
||||
|
@ -52,8 +52,8 @@ from ..utils.grampslocale import GrampsLocale
|
||||
from ._datestrings import DateStrings
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -74,7 +74,7 @@ class DateDisplay:
|
||||
# This should be the format that is used under the locale by
|
||||
# strftime() for '%x'.
|
||||
# You may translate this as "Numerical", "System preferred", or similar.
|
||||
_T_("date format|Numerical"),
|
||||
_T_("Numerical", "date format"),
|
||||
|
||||
# Full month name, day, year
|
||||
_T_("Month Day, Year"),
|
||||
@ -186,7 +186,7 @@ class DateDisplay:
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("from|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "from"),
|
||||
|
||||
"to"
|
||||
# second date in a span
|
||||
@ -194,7 +194,7 @@ class DateDisplay:
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("to|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "to"),
|
||||
|
||||
"between"
|
||||
# first date in a range
|
||||
@ -202,7 +202,7 @@ class DateDisplay:
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("between|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "between"),
|
||||
|
||||
"and"
|
||||
# second date in a range
|
||||
@ -210,42 +210,42 @@ class DateDisplay:
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("and|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "and"),
|
||||
|
||||
"before"
|
||||
# If "before <Month>" needs a special inflection in your
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("before|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "before"),
|
||||
|
||||
"after"
|
||||
# If "after <Month>" needs a special inflection in your
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("after|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "after"),
|
||||
|
||||
"about"
|
||||
# If "about <Month>" needs a special inflection in your
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("about|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "about"),
|
||||
|
||||
"estimated"
|
||||
# If "estimated <Month>" needs a special inflection in your
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("estimated|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "estimated"),
|
||||
|
||||
"calculated"
|
||||
# If "calculated <Month>" needs a special inflection in your
|
||||
# language, translate this to "{long_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("calculated|{long_month} {year}"),
|
||||
: _("{long_month} {year}", "calculated"),
|
||||
}
|
||||
|
||||
self.FORMATS_short_month_year = {
|
||||
@ -258,7 +258,7 @@ class DateDisplay:
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("from|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "from"),
|
||||
|
||||
"to"
|
||||
# second date in a span
|
||||
@ -266,7 +266,7 @@ class DateDisplay:
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("to|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "to"),
|
||||
|
||||
"between"
|
||||
# first date in a range
|
||||
@ -274,7 +274,7 @@ class DateDisplay:
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("between|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "between"),
|
||||
|
||||
"and"
|
||||
# second date in a range
|
||||
@ -282,42 +282,42 @@ class DateDisplay:
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("and|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "and"),
|
||||
|
||||
"before"
|
||||
# If "before <Month>" needs a special inflection in your
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("before|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "before"),
|
||||
|
||||
"after"
|
||||
# If "after <Month>" needs a special inflection in your
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("after|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "after"),
|
||||
|
||||
"about"
|
||||
# If "about <Month>" needs a special inflection in your
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("about|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "about"),
|
||||
|
||||
"estimated"
|
||||
# If "estimated <Month>" needs a special inflection in your
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("estimated|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "estimated"),
|
||||
|
||||
"calculated"
|
||||
# If "calculated <Month>" needs a special inflection in your
|
||||
# language, translate this to "{short_month.f[X]} {year}"
|
||||
# (where X is one of the month-name inflections you defined)
|
||||
# else leave it untranslated
|
||||
: _("calculated|{short_month} {year}"),
|
||||
: _("{short_month} {year}", "calculated"),
|
||||
}
|
||||
|
||||
def formats_changed(self):
|
||||
@ -424,12 +424,12 @@ class DateDisplay:
|
||||
# If there is no special inflection for "from <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "from" in ENGLISH!!! ENGLISH!!!
|
||||
inflect=self._("from-date|"))
|
||||
inflect=self._("", "from-date"))
|
||||
d2 = self.display_cal[cal](date.get_stop_date(),
|
||||
# If there is no special inflection for "to <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "to" in ENGLISH!!! ENGLISH!!!
|
||||
inflect=self._("to-date|"))
|
||||
inflect=self._("", "to-date"))
|
||||
return self._("{date_quality}from {date_start} to {date_stop}"
|
||||
"{nonstd_calendar_and_ny}").format(
|
||||
date_quality=qual_str,
|
||||
@ -449,12 +449,12 @@ class DateDisplay:
|
||||
# If there is no special inflection for "between <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "between" in ENGLISH!!! ENGLISH!!!
|
||||
inflect=self._("between-date|"))
|
||||
inflect=self._("", "between-date"))
|
||||
d2 = self.display_cal[cal](date.get_stop_date(),
|
||||
# If there is no special inflection for "and <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "and" in ENGLISH!!! ENGLISH!!!
|
||||
inflect=self._("and-date|"))
|
||||
inflect=self._("", "and-date"))
|
||||
return self._("{date_quality}between {date_start} and {date_stop}"
|
||||
"{nonstd_calendar_and_ny}").format(
|
||||
date_quality=qual_str,
|
||||
@ -488,27 +488,27 @@ class DateDisplay:
|
||||
# If there is no special inflection for "before <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "before" in ENGLISH!!! ENGLISH!!!
|
||||
date_type = _("before-date|")
|
||||
date_type = _("", "before-date")
|
||||
elif mod == Date.MOD_AFTER:
|
||||
# If there is no special inflection for "after <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "after" in ENGLISH!!! ENGLISH!!!
|
||||
date_type = _("after-date|")
|
||||
date_type = _("", "after-date")
|
||||
elif mod == Date.MOD_ABOUT:
|
||||
# If there is no special inflection for "about <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "about" in ENGLISH!!! ENGLISH!!!
|
||||
date_type = _("about-date|")
|
||||
date_type = _("", "about-date")
|
||||
elif qual == Date.QUAL_ESTIMATED:
|
||||
# If there is no special inflection for "estimated <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "estimated" in ENGLISH!!! ENGLISH!!!
|
||||
date_type = _("estimated-date|")
|
||||
date_type = _("", "estimated-date")
|
||||
elif qual == Date.QUAL_CALCULATED:
|
||||
# If there is no special inflection for "calculated <Month>"
|
||||
# in your language, DON'T translate this string. Otherwise,
|
||||
# "translate" this to "calculated" in ENGLISH!!! ENGLISH!!!
|
||||
date_type = _("calculated-date|")
|
||||
date_type = _("", "calculated-date")
|
||||
else:
|
||||
date_type = ""
|
||||
# TODO -- do "estimated" and "calculated" need their own "if"?
|
||||
|
@ -76,36 +76,36 @@ class DateStrings:
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection to be used in your localized
|
||||
# DateDisplayer code!
|
||||
_("localized lexeme inflections||January"),
|
||||
_("localized lexeme inflections||February"),
|
||||
_("localized lexeme inflections||March"),
|
||||
_("localized lexeme inflections||April"),
|
||||
_("localized lexeme inflections||May"),
|
||||
_("localized lexeme inflections||June"),
|
||||
_("localized lexeme inflections||July"),
|
||||
_("localized lexeme inflections||August"),
|
||||
_("localized lexeme inflections||September"),
|
||||
_("localized lexeme inflections||October"),
|
||||
_("localized lexeme inflections||November"),
|
||||
_("localized lexeme inflections||December") )
|
||||
_("|January", "localized lexeme inflections"),
|
||||
_("|February", "localized lexeme inflections"),
|
||||
_("|March", "localized lexeme inflections"),
|
||||
_("|April", "localized lexeme inflections"),
|
||||
_("|May", "localized lexeme inflections"),
|
||||
_("|June", "localized lexeme inflections"),
|
||||
_("|July", "localized lexeme inflections"),
|
||||
_("|August", "localized lexeme inflections"),
|
||||
_("|September", "localized lexeme inflections"),
|
||||
_("|October", "localized lexeme inflections"),
|
||||
_("|November", "localized lexeme inflections"),
|
||||
_("|December", "localized lexeme inflections") )
|
||||
|
||||
self.short_months = ( "",
|
||||
# TRANSLATORS: see
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection to be used in your localized
|
||||
# DateDisplayer code!
|
||||
_("localized lexeme inflections - short month form||Jan"),
|
||||
_("localized lexeme inflections - short month form||Feb"),
|
||||
_("localized lexeme inflections - short month form||Mar"),
|
||||
_("localized lexeme inflections - short month form||Apr"),
|
||||
_("localized lexeme inflections - short month form||May"),
|
||||
_("localized lexeme inflections - short month form||Jun"),
|
||||
_("localized lexeme inflections - short month form||Jul"),
|
||||
_("localized lexeme inflections - short month form||Aug"),
|
||||
_("localized lexeme inflections - short month form||Sep"),
|
||||
_("localized lexeme inflections - short month form||Oct"),
|
||||
_("localized lexeme inflections - short month form||Nov"),
|
||||
_("localized lexeme inflections - short month form||Dec") )
|
||||
_("|Jan", "localized lexeme inflections - short month form"),
|
||||
_("|Feb", "localized lexeme inflections - short month form"),
|
||||
_("|Mar", "localized lexeme inflections - short month form"),
|
||||
_("|Apr", "localized lexeme inflections - short month form"),
|
||||
_("|May", "localized lexeme inflections - short month form"),
|
||||
_("|Jun", "localized lexeme inflections - short month form"),
|
||||
_("|Jul", "localized lexeme inflections - short month form"),
|
||||
_("|Aug", "localized lexeme inflections - short month form"),
|
||||
_("|Sep", "localized lexeme inflections - short month form"),
|
||||
_("|Oct", "localized lexeme inflections - short month form"),
|
||||
_("|Nov", "localized lexeme inflections - short month form"),
|
||||
_("|Dec", "localized lexeme inflections - short month form") )
|
||||
|
||||
_ = locale.translation.sgettext
|
||||
self.alt_long_months = ( "",
|
||||
@ -113,28 +113,28 @@ class DateStrings:
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to add proper alternatives to be recognized in your localized
|
||||
# DateParser code!
|
||||
_("alternative month names for January||"),
|
||||
_("alternative month names for February||"),
|
||||
_("alternative month names for March||"),
|
||||
_("alternative month names for April||"),
|
||||
_("alternative month names for May||"),
|
||||
_("alternative month names for June||"),
|
||||
_("alternative month names for July||"),
|
||||
_("alternative month names for August||"),
|
||||
_("alternative month names for September||"),
|
||||
_("alternative month names for October||"),
|
||||
_("alternative month names for November||"),
|
||||
_("alternative month names for December||") )
|
||||
_("|", "alternative month names for January"),
|
||||
_("|", "alternative month names for February"),
|
||||
_("|", "alternative month names for March"),
|
||||
_("|", "alternative month names for April"),
|
||||
_("|", "alternative month names for May"),
|
||||
_("|", "alternative month names for June"),
|
||||
_("|", "alternative month names for July"),
|
||||
_("|", "alternative month names for August"),
|
||||
_("|", "alternative month names for September"),
|
||||
_("|", "alternative month names for October"),
|
||||
_("|", "alternative month names for November"),
|
||||
_("|", "alternative month names for December") )
|
||||
|
||||
self.calendar = (
|
||||
# Must appear in the order indexed by Date.CAL_... numeric constants
|
||||
_("calendar|Gregorian"),
|
||||
_("calendar|Julian"),
|
||||
_("calendar|Hebrew"),
|
||||
_("calendar|French Republican"),
|
||||
_("calendar|Persian"),
|
||||
_("calendar|Islamic"),
|
||||
_("calendar|Swedish") )
|
||||
_("Gregorian", "calendar"),
|
||||
_("Julian", "calendar"),
|
||||
_("Hebrew", "calendar"),
|
||||
_("French Republican", "calendar"),
|
||||
_("Persian", "calendar"),
|
||||
_("Islamic", "calendar"),
|
||||
_("Swedish", "calendar") )
|
||||
_ = locale.translation.lexgettext
|
||||
|
||||
self.hebrew = (
|
||||
@ -143,19 +143,19 @@ class DateStrings:
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection to be used in your localized
|
||||
# DateDisplayer code!
|
||||
_("Hebrew month lexeme|Tishri"),
|
||||
_("Hebrew month lexeme|Heshvan"),
|
||||
_("Hebrew month lexeme|Kislev"),
|
||||
_("Hebrew month lexeme|Tevet"),
|
||||
_("Hebrew month lexeme|Shevat"),
|
||||
_("Hebrew month lexeme|AdarI"),
|
||||
_("Hebrew month lexeme|AdarII"),
|
||||
_("Hebrew month lexeme|Nisan"),
|
||||
_("Hebrew month lexeme|Iyyar"),
|
||||
_("Hebrew month lexeme|Sivan"),
|
||||
_("Hebrew month lexeme|Tammuz"),
|
||||
_("Hebrew month lexeme|Av"),
|
||||
_("Hebrew month lexeme|Elul")
|
||||
_("Tishri", "Hebrew month lexeme"),
|
||||
_("Heshvan", "Hebrew month lexeme"),
|
||||
_("Kislev", "Hebrew month lexeme"),
|
||||
_("Tevet", "Hebrew month lexeme"),
|
||||
_("Shevat", "Hebrew month lexeme"),
|
||||
_("AdarI", "Hebrew month lexeme"),
|
||||
_("AdarII", "Hebrew month lexeme"),
|
||||
_("Nisan", "Hebrew month lexeme"),
|
||||
_("Iyyar", "Hebrew month lexeme"),
|
||||
_("Sivan", "Hebrew month lexeme"),
|
||||
_("Tammuz", "Hebrew month lexeme"),
|
||||
_("Av", "Hebrew month lexeme"),
|
||||
_("Elul", "Hebrew month lexeme")
|
||||
)
|
||||
|
||||
self.french = (
|
||||
@ -164,19 +164,19 @@ class DateStrings:
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection to be used in your localized
|
||||
# DateDisplayer code!
|
||||
_("French month lexeme|Vendémiaire"),
|
||||
_("French month lexeme|Brumaire"),
|
||||
_("French month lexeme|Frimaire"),
|
||||
_("French month lexeme|Nivôse"),
|
||||
_("French month lexeme|Pluviôse"),
|
||||
_("French month lexeme|Ventôse"),
|
||||
_("French month lexeme|Germinal"),
|
||||
_("French month lexeme|Floréal"),
|
||||
_("French month lexeme|Prairial"),
|
||||
_("French month lexeme|Messidor"),
|
||||
_("French month lexeme|Thermidor"),
|
||||
_("French month lexeme|Fructidor"),
|
||||
_("French month lexeme|Extra"),
|
||||
_("Vendémiaire", "French month lexeme"),
|
||||
_("Brumaire", "French month lexeme"),
|
||||
_("Frimaire", "French month lexeme"),
|
||||
_("Nivôse", "French month lexeme"),
|
||||
_("Pluviôse", "French month lexeme"),
|
||||
_("Ventôse", "French month lexeme"),
|
||||
_("Germinal", "French month lexeme"),
|
||||
_("Floréal", "French month lexeme"),
|
||||
_("Prairial", "French month lexeme"),
|
||||
_("Messidor", "French month lexeme"),
|
||||
_("Thermidor", "French month lexeme"),
|
||||
_("Fructidor", "French month lexeme"),
|
||||
_("Extra", "French month lexeme"),
|
||||
)
|
||||
|
||||
self.islamic = (
|
||||
@ -185,18 +185,18 @@ class DateStrings:
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection to be used in your localized
|
||||
# DateDisplayer code!
|
||||
_("Islamic month lexeme|Muharram"),
|
||||
_("Islamic month lexeme|Safar"),
|
||||
_("Islamic month lexeme|Rabi`al-Awwal"),
|
||||
_("Islamic month lexeme|Rabi`ath-Thani"),
|
||||
_("Islamic month lexeme|Jumada l-Ula"),
|
||||
_("Islamic month lexeme|Jumada t-Tania"),
|
||||
_("Islamic month lexeme|Rajab"),
|
||||
_("Islamic month lexeme|Sha`ban"),
|
||||
_("Islamic month lexeme|Ramadan"),
|
||||
_("Islamic month lexeme|Shawwal"),
|
||||
_("Islamic month lexeme|Dhu l-Qa`da"),
|
||||
_("Islamic month lexeme|Dhu l-Hijja"),
|
||||
_("Muharram", "Islamic month lexeme"),
|
||||
_("Safar", "Islamic month lexeme"),
|
||||
_("Rabi`al-Awwal", "Islamic month lexeme"),
|
||||
_("Rabi`ath-Thani", "Islamic month lexeme"),
|
||||
_("Jumada l-Ula", "Islamic month lexeme"),
|
||||
_("Jumada t-Tania", "Islamic month lexeme"),
|
||||
_("Rajab", "Islamic month lexeme"),
|
||||
_("Sha`ban", "Islamic month lexeme"),
|
||||
_("Ramadan", "Islamic month lexeme"),
|
||||
_("Shawwal", "Islamic month lexeme"),
|
||||
_("Dhu l-Qa`da", "Islamic month lexeme"),
|
||||
_("Dhu l-Hijja", "Islamic month lexeme"),
|
||||
)
|
||||
|
||||
self.persian = (
|
||||
@ -205,35 +205,35 @@ class DateStrings:
|
||||
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
|
||||
# to learn how to select proper inflection to be used in your localized
|
||||
# DateDisplayer code!
|
||||
_("Persian month lexeme|Farvardin"),
|
||||
_("Persian month lexeme|Ordibehesht"),
|
||||
_("Persian month lexeme|Khordad"),
|
||||
_("Persian month lexeme|Tir"),
|
||||
_("Persian month lexeme|Mordad"),
|
||||
_("Persian month lexeme|Shahrivar"),
|
||||
_("Persian month lexeme|Mehr"),
|
||||
_("Persian month lexeme|Aban"),
|
||||
_("Persian month lexeme|Azar"),
|
||||
_("Persian month lexeme|Dey"),
|
||||
_("Persian month lexeme|Bahman"),
|
||||
_("Persian month lexeme|Esfand"),
|
||||
_("Farvardin", "Persian month lexeme"),
|
||||
_("Ordibehesht", "Persian month lexeme"),
|
||||
_("Khordad", "Persian month lexeme"),
|
||||
_("Tir", "Persian month lexeme"),
|
||||
_("Mordad", "Persian month lexeme"),
|
||||
_("Shahrivar", "Persian month lexeme"),
|
||||
_("Mehr", "Persian month lexeme"),
|
||||
_("Aban", "Persian month lexeme"),
|
||||
_("Azar", "Persian month lexeme"),
|
||||
_("Dey", "Persian month lexeme"),
|
||||
_("Bahman", "Persian month lexeme"),
|
||||
_("Esfand", "Persian month lexeme"),
|
||||
)
|
||||
|
||||
self.modifiers = ("",
|
||||
# TRANSLATORS: if the modifier is after the date
|
||||
# put the space ahead of the word instead of after it
|
||||
_("date modifier|before "),
|
||||
_("before ", "date modifier"),
|
||||
# TRANSLATORS: if the modifier is after the date
|
||||
# put the space ahead of the word instead of after it
|
||||
_("date modifier|after "),
|
||||
_("after ", "date modifier"),
|
||||
# TRANSLATORS: if the modifier is after the date
|
||||
# put the space ahead of the word instead of after it
|
||||
_("date modifier|about "),
|
||||
_("about ", "date modifier"),
|
||||
"", "", "")
|
||||
|
||||
self.qualifiers = ("",
|
||||
_("date quality|estimated "),
|
||||
_("date quality|calculated "),
|
||||
_("estimated ", "date quality"),
|
||||
_("calculated ", "date quality"),
|
||||
)
|
||||
|
||||
# 6753: localized day names. Eventually should sprout into
|
||||
|
@ -599,7 +599,7 @@ class NameDisplay:
|
||||
# called to fill in each format flag.
|
||||
# Dictionary is "code": ("expression", "keyword", "i18n-keyword")
|
||||
d = {"t": ("raw_data[_TITLE]", "title",
|
||||
_("Person|title")),
|
||||
_("title", "Person")),
|
||||
"f": ("raw_data[_FIRSTNAME]", "given",
|
||||
_("given")),
|
||||
"l": ("_raw_full_surname(raw_data[_SURNAME_LIST])", "surname",
|
||||
@ -607,17 +607,17 @@ class NameDisplay:
|
||||
"s": ("raw_data[_SUFFIX]", "suffix",
|
||||
_("suffix")),
|
||||
"c": ("raw_data[_CALL]", "call",
|
||||
_("Name|call")),
|
||||
_("call", "Name")),
|
||||
"x": ("(raw_data[_NICK] or raw_data[_CALL] or raw_data[_FIRSTNAME].split(' ')[0])",
|
||||
"common",
|
||||
_("Name|common")),
|
||||
_("common", "Name")),
|
||||
"i": ("''.join([word[0] +'.' for word in ('. ' +" +
|
||||
" raw_data[_FIRSTNAME]).split()][1:])",
|
||||
"initials",
|
||||
_("initials")),
|
||||
"m": ("_raw_primary_surname(raw_data[_SURNAME_LIST])",
|
||||
"primary",
|
||||
_("Name|primary")),
|
||||
_("primary", "Name")),
|
||||
"0m": ("_raw_primary_prefix_only(raw_data[_SURNAME_LIST])",
|
||||
"primary[pre]",
|
||||
_("primary[pre]")),
|
||||
@ -639,7 +639,7 @@ class NameDisplay:
|
||||
_("notpatronymic")),
|
||||
"r": ("_raw_nonprimary_surname(raw_data[_SURNAME_LIST])",
|
||||
"rest",
|
||||
_("Remaining names|rest")),
|
||||
_("rest", "Remaining names")),
|
||||
"p": ("_raw_prefix_surname(raw_data[_SURNAME_LIST])",
|
||||
"prefix",
|
||||
_("prefix")),
|
||||
@ -699,7 +699,7 @@ class NameDisplay:
|
||||
# called to fill in each format flag.
|
||||
# Dictionary is "code": ("expression", "keyword", "i18n-keyword")
|
||||
d = {"t": ("title", "title",
|
||||
_("Person|title")),
|
||||
_("title", "Person")),
|
||||
"f": ("first", "given",
|
||||
_("given")),
|
||||
"l": ("_raw_full_surname(raw_surname_list)", "surname",
|
||||
@ -707,14 +707,14 @@ class NameDisplay:
|
||||
"s": ("suffix", "suffix",
|
||||
_("suffix")),
|
||||
"c": ("call", "call",
|
||||
_("Name|call")),
|
||||
_("call", "Name")),
|
||||
"x": ("(nick or call or first.split(' ')[0])", "common",
|
||||
_("Name|common")),
|
||||
_("common", "Name")),
|
||||
"i": ("''.join([word[0] +'.' for word in ('. ' + first).split()][1:])",
|
||||
"initials",
|
||||
_("initials")),
|
||||
"m": ("_raw_primary_surname(raw_surname_list)", "primary",
|
||||
_("Name|primary")),
|
||||
_("primary", "Name")),
|
||||
"0m":("_raw_primary_prefix_only(raw_surname_list)",
|
||||
"primary[pre]", _("primary[pre]")),
|
||||
"1m":("_raw_primary_surname_only(raw_surname_list)",
|
||||
@ -732,7 +732,7 @@ class NameDisplay:
|
||||
"o": ("_raw_nonpatro_surname(raw_surname_list)", "notpatronymic",
|
||||
_("notpatronymic")),
|
||||
"r": ("_raw_nonprimary_surname(raw_surname_list)", "rest",
|
||||
_("Remaining names|rest")),
|
||||
_("rest", "Remaining names")),
|
||||
"p": ("_raw_prefix_surname(raw_surname_list)", "prefix",
|
||||
_("prefix")),
|
||||
"q": ("_raw_single_surname(raw_surname_list)", "rawsurnames",
|
||||
|
@ -45,7 +45,7 @@ class HasNameOf(Rule):
|
||||
|
||||
labels = [_('Given name:'),
|
||||
_('Full Family name:'),
|
||||
_('person|Title:'),
|
||||
_('Title:', 'person'),
|
||||
_('Suffix:'),
|
||||
_('Call Name:'),
|
||||
_('Nick Name:'),
|
||||
|
@ -43,7 +43,7 @@ class HasRepo(Rule):
|
||||
"""Rule that checks for a repo with a particular value"""
|
||||
|
||||
|
||||
labels = [ _('repo|Name:'),
|
||||
labels = [ _('Name:', 'repo'),
|
||||
_('Type:'),
|
||||
_('Address:'),
|
||||
_('URL:'),
|
||||
|
@ -33,8 +33,8 @@ from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
class AttributeType(GrampsType):
|
||||
|
||||
|
@ -287,7 +287,7 @@ class Span:
|
||||
elif self.date2.get_modifier() == Date.MOD_AFTER:
|
||||
_repr = trans_text("less than") + " " + fdate12
|
||||
elif self.date2.get_modifier() == Date.MOD_ABOUT:
|
||||
_repr = trans_text("age|about") + " " + fdate12p1
|
||||
_repr = trans_text("about", "age") + " " + fdate12p1
|
||||
elif self.date2.is_compound():
|
||||
start, stop = self.date2.get_start_stop_range()
|
||||
start = Date(*start)
|
||||
@ -322,15 +322,15 @@ class Span:
|
||||
_repr = trans_text("more than") + " " + fdate12
|
||||
elif self.date1.get_modifier() == Date.MOD_ABOUT:
|
||||
if self.date2.get_modifier() == Date.MOD_NONE:
|
||||
_repr = trans_text("age|about") + " " + fdate12p1
|
||||
_repr = trans_text("about", "age") + " " + fdate12p1
|
||||
elif self.date2.get_modifier() == Date.MOD_BEFORE:
|
||||
_repr = trans_text("more than about") + " " + fdate12p1
|
||||
elif self.date2.get_modifier() == Date.MOD_AFTER:
|
||||
_repr = trans_text("less than about") + " " + fdate12p1
|
||||
elif self.date2.get_modifier() == Date.MOD_ABOUT:
|
||||
_repr = trans_text("age|about") + " " + fdate12p1
|
||||
_repr = trans_text("about", "age") + " " + fdate12p1
|
||||
elif self.date2.is_compound():
|
||||
_repr = trans_text("age|about") + " " + fdate12p1
|
||||
_repr = trans_text("about", "age") + " " + fdate12p1
|
||||
elif self.date1.is_compound():
|
||||
if self.date2.get_modifier() == Date.MOD_NONE:
|
||||
start, stop = self.date1.get_start_stop_range()
|
||||
@ -347,7 +347,7 @@ class Span:
|
||||
elif self.date2.get_modifier() == Date.MOD_AFTER:
|
||||
_repr = trans_text("less than") + " " + fdate12
|
||||
elif self.date2.get_modifier() == Date.MOD_ABOUT:
|
||||
_repr = trans_text("age|about") + " " + fdate12p1
|
||||
_repr = trans_text("about", "age") + " " + fdate12p1
|
||||
elif self.date2.is_compound():
|
||||
start1, stop1 = self.date1.get_start_stop_range()
|
||||
start2, stop2 = self.date2.get_start_stop_range()
|
||||
@ -606,13 +606,13 @@ class Date:
|
||||
"Swedish"]
|
||||
|
||||
|
||||
ui_calendar_names = [_("calendar|Gregorian"),
|
||||
_("calendar|Julian"),
|
||||
_("calendar|Hebrew"),
|
||||
_("calendar|French Republican"),
|
||||
_("calendar|Persian"),
|
||||
_("calendar|Islamic"),
|
||||
_("calendar|Swedish")]
|
||||
ui_calendar_names = [_("Gregorian", "calendar"),
|
||||
_("Julian", "calendar"),
|
||||
_("Hebrew", "calendar"),
|
||||
_("French Republican", "calendar"),
|
||||
_("Persian", "calendar"),
|
||||
_("Islamic", "calendar"),
|
||||
_("Swedish", "calendar")]
|
||||
|
||||
def __init__(self, *source):
|
||||
"""
|
||||
@ -1853,7 +1853,7 @@ class Date:
|
||||
Lookup date quality keyword, even if translated.
|
||||
"""
|
||||
qualities = ["none", "estimated", "calculated"]
|
||||
ui_qualities = [_("date-quality|none"),
|
||||
ui_qualities = [_("none", "date-quality"),
|
||||
_("estimated"), _("calculated")]
|
||||
if quality.lower() in qualities:
|
||||
return qualities.index(quality.lower())
|
||||
@ -1868,7 +1868,7 @@ class Date:
|
||||
"""
|
||||
mods = ["none", "before", "after", "about",
|
||||
"range", "span", "textonly"]
|
||||
ui_mods = [_("date-modifier|none"),
|
||||
ui_mods = [_("none", "date-modifier"),
|
||||
_("before"), _("after"), _("about"),
|
||||
_("range"), _("span"), _("textonly")]
|
||||
if modifier.lower() in mods:
|
||||
|
@ -51,14 +51,14 @@ class EventRoleType(GrampsType):
|
||||
_DATAMAP = [
|
||||
(UNKNOWN, _("Unknown"), "Unknown"),
|
||||
(CUSTOM, _("Custom"), "Custom"),
|
||||
(PRIMARY, _("Role|Primary"), "Primary"),
|
||||
(PRIMARY, _("Primary", "Role"), "Primary"),
|
||||
(CLERGY, _("Clergy"), "Clergy"),
|
||||
(CELEBRANT, _("Celebrant"), "Celebrant"),
|
||||
(AIDE, _("Aide"), "Aide"),
|
||||
(BRIDE, _("Bride"), "Bride"),
|
||||
(GROOM, _("Groom"), "Groom"),
|
||||
(WITNESS, _("Witness"), "Witness"),
|
||||
(FAMILY, _("Role|Family"), "Family"),
|
||||
(FAMILY, _("Family", "Role"), "Family"),
|
||||
(INFORMANT, _("Informant"), "Informant"),
|
||||
]
|
||||
|
||||
|
@ -131,8 +131,8 @@ class EventType(GrampsType):
|
||||
WILL = 44
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
_MENU = [[_T_('Life Events'),
|
||||
[BIRTH, BAPTISM, DEATH, BURIAL, CREMATION, ADOPT]],
|
||||
@ -208,52 +208,52 @@ class EventType(GrampsType):
|
||||
]
|
||||
|
||||
_ABBREVIATIONS = {
|
||||
BIRTH: _T_("birth abbreviation|b."),
|
||||
DEATH: _T_("death abbreviation|d."),
|
||||
MARRIAGE: _T_("marriage abbreviation|m."),
|
||||
UNKNOWN: _T_("Unknown abbreviation|unkn."),
|
||||
CUSTOM: _T_("Custom abbreviation|cust."),
|
||||
ADOPT: _T_("Adopted abbreviation|adop."),
|
||||
ADULT_CHRISTEN : _T_("Adult Christening abbreviation|a.chr."),
|
||||
BAPTISM: _T_("Baptism abbreviation|bap."),
|
||||
BAR_MITZVAH : _T_("Bar Mitzvah abbreviation|bar."),
|
||||
BAS_MITZVAH : _T_("Bat Mitzvah abbreviation|bat."),
|
||||
BLESS: _T_("Blessing abbreviation|bles."),
|
||||
BURIAL: _T_("Burial abbreviation|bur."),
|
||||
CAUSE_DEATH : _T_("Cause Of Death abbreviation|d.cau."),
|
||||
CENSUS: _T_("Census abbreviation|cens."),
|
||||
CHRISTEN: _T_("Christening abbreviation|chr."),
|
||||
CONFIRMATION: _T_("Confirmation abbreviation|conf."),
|
||||
CREMATION: _T_("Cremation abbreviation|crem."),
|
||||
DEGREE: _T_("Degree abbreviation|deg."),
|
||||
EDUCATION: _T_("Education abbreviation|edu."),
|
||||
ELECTED: _T_("Elected abbreviation|elec."),
|
||||
EMIGRATION: _T_("Emigration abbreviation|em."),
|
||||
FIRST_COMMUN: _T_("First Communion abbreviation|f.comm."),
|
||||
IMMIGRATION: _T_("Immigration abbreviation|im."),
|
||||
GRADUATION: _T_("Graduation abbreviation|grad."),
|
||||
MED_INFO: _T_("Medical Information abbreviation|medinf."),
|
||||
MILITARY_SERV: _T_("Military Service abbreviation|milser."),
|
||||
NATURALIZATION: _T_("Naturalization abbreviation|nat."),
|
||||
NOB_TITLE: _T_("Nobility Title abbreviation|nob."),
|
||||
NUM_MARRIAGES: _T_("Number of Marriages abbreviation|n.o.mar."),
|
||||
OCCUPATION: _T_("Occupation abbreviation|occ."),
|
||||
ORDINATION: _T_("Ordination abbreviation|ord."),
|
||||
PROBATE: _T_("Probate abbreviation|prob."),
|
||||
PROPERTY: _T_("Property abbreviation|prop."),
|
||||
RELIGION: _T_("Religion abbreviation|rel."),
|
||||
RESIDENCE: _T_("Residence abbreviation|res."),
|
||||
RETIREMENT: _T_("Retirement abbreviation|ret."),
|
||||
WILL: _T_("Will abbreviation|will."),
|
||||
MARR_SETTL: _T_("Marriage Settlement abbreviation|m.set."),
|
||||
MARR_LIC: _T_("Marriage License abbreviation|m.lic."),
|
||||
MARR_CONTR: _T_("Marriage Contract abbreviation|m.con."),
|
||||
MARR_BANNS: _T_("Marriage Banns abbreviation|m.ban."),
|
||||
MARR_ALT: _T_("Alternate Marriage abbreviation|alt.mar."),
|
||||
ENGAGEMENT: _T_("Engagement abbreviation|engd."),
|
||||
DIVORCE: _T_("Divorce abbreviation|div."),
|
||||
DIV_FILING: _T_("Divorce Filing abbreviation|div.f."),
|
||||
ANNULMENT: _T_("Annulment abbreviation|annul.")
|
||||
BIRTH: _T_("b.", "birth abbreviation"),
|
||||
DEATH: _T_("d.", "death abbreviation"),
|
||||
MARRIAGE: _T_("m.", "marriage abbreviation"),
|
||||
UNKNOWN: _T_("unkn.", "Unknown abbreviation"),
|
||||
CUSTOM: _T_("cust.", "Custom abbreviation"),
|
||||
ADOPT: _T_("adop.", "Adopted abbreviation"),
|
||||
ADULT_CHRISTEN : _T_("a.chr.", "Adult Christening abbreviation"),
|
||||
BAPTISM: _T_("bap.", "Baptism abbreviation"),
|
||||
BAR_MITZVAH : _T_("bar.", "Bar Mitzvah abbreviation"),
|
||||
BAS_MITZVAH : _T_("bat.", "Bat Mitzvah abbreviation"),
|
||||
BLESS: _T_("bles.", "Blessing abbreviation"),
|
||||
BURIAL: _T_("bur.", "Burial abbreviation"),
|
||||
CAUSE_DEATH : _T_("d.cau.", "Cause Of Death abbreviation"),
|
||||
CENSUS: _T_("cens.", "Census abbreviation"),
|
||||
CHRISTEN: _T_("chr.", "Christening abbreviation"),
|
||||
CONFIRMATION: _T_("conf.", "Confirmation abbreviation"),
|
||||
CREMATION: _T_("crem.", "Cremation abbreviation"),
|
||||
DEGREE: _T_("deg.", "Degree abbreviation"),
|
||||
EDUCATION: _T_("edu.", "Education abbreviation"),
|
||||
ELECTED: _T_("elec.", "Elected abbreviation"),
|
||||
EMIGRATION: _T_("em.", "Emigration abbreviation"),
|
||||
FIRST_COMMUN: _T_("f.comm.", "First Communion abbreviation"),
|
||||
IMMIGRATION: _T_("im.", "Immigration abbreviation"),
|
||||
GRADUATION: _T_("grad.", "Graduation abbreviation"),
|
||||
MED_INFO: _T_("medinf.", "Medical Information abbreviation"),
|
||||
MILITARY_SERV: _T_("milser.", "Military Service abbreviation"),
|
||||
NATURALIZATION: _T_("nat.", "Naturalization abbreviation"),
|
||||
NOB_TITLE: _T_("nob.", "Nobility Title abbreviation"),
|
||||
NUM_MARRIAGES: _T_("n.o.mar.", "Number of Marriages abbreviation"),
|
||||
OCCUPATION: _T_("occ.", "Occupation abbreviation"),
|
||||
ORDINATION: _T_("ord.", "Ordination abbreviation"),
|
||||
PROBATE: _T_("prob.", "Probate abbreviation"),
|
||||
PROPERTY: _T_("prop.", "Property abbreviation"),
|
||||
RELIGION: _T_("rel.", "Religion abbreviation"),
|
||||
RESIDENCE: _T_("res.", "Residence abbreviation"),
|
||||
RETIREMENT: _T_("ret.", "Retirement abbreviation"),
|
||||
WILL: _T_("will.", "Will abbreviation"),
|
||||
MARR_SETTL: _T_("m.set.", "Marriage Settlement abbreviation"),
|
||||
MARR_LIC: _T_("m.lic.", "Marriage License abbreviation"),
|
||||
MARR_CONTR: _T_("m.con.", "Marriage Contract abbreviation"),
|
||||
MARR_BANNS: _T_("m.ban.", "Marriage Banns abbreviation"),
|
||||
MARR_ALT: _T_("alt.mar.", "Alternate Marriage abbreviation"),
|
||||
ENGAGEMENT: _T_("engd.", "Engagement abbreviation"),
|
||||
DIVORCE: _T_("div.", "Divorce abbreviation"),
|
||||
DIV_FILING: _T_("div.f.", "Divorce Filing abbreviation"),
|
||||
ANNULMENT: _T_("annul.", "Annulment abbreviation")
|
||||
}
|
||||
|
||||
def __init__(self, value=None):
|
||||
|
@ -73,12 +73,12 @@ class NameOriginType(GrampsType):
|
||||
(UNKNOWN, _("Unknown"), "Unknown "),
|
||||
(CUSTOM, _("Custom"), "Custom"),
|
||||
(NONE, "", ""),
|
||||
(INHERITED, _("Surname|Inherited"), "Inherited"),
|
||||
(GIVEN, _("Surname|Given"), "Given"),
|
||||
(TAKEN, _("Surname|Taken"), "Taken"),
|
||||
(INHERITED, _("Inherited", "Surname"), "Inherited"),
|
||||
(GIVEN, _("Given", "Surname"), "Given"),
|
||||
(TAKEN, _("Taken", "Surname"), "Taken"),
|
||||
(PATRONYMIC, _("Patronymic"), "Patronymic"),
|
||||
(MATRONYMIC, _("Matronymic"), "Matronymic"),
|
||||
(FEUDAL, _("Surname|Feudal"), "Feudal"),
|
||||
(FEUDAL, _("Feudal", "Surname"), "Feudal"),
|
||||
(PSEUDONYM, _("Pseudonym"), "Pseudonym"),
|
||||
(PATRILINEAL, _("Patrilineal"), "Patrilineal"),
|
||||
(MATRILINEAL, _("Matrilineal"), "Matrilineal"),
|
||||
|
@ -79,8 +79,8 @@ class NoteType(GrampsType):
|
||||
(CITATION, _('Citation'), "Citation"),
|
||||
(REPORT_TEXT, _("Report"), "Report"),
|
||||
(HTML_CODE, _("Html code"), "Html code"),
|
||||
(TODO, _("notetype|To Do"), "To Do"),
|
||||
(LINK, _("notetype|Link"), "Link"),
|
||||
(TODO, _("To Do", "notetype"), "To Do"),
|
||||
(LINK, _("Link", "notetype"), "Link"),
|
||||
]
|
||||
|
||||
_DATAMAPIGNORE = [
|
||||
|
@ -75,9 +75,9 @@ class PaperSize:
|
||||
self.height = height
|
||||
self.width = width
|
||||
if self.name == 'Letter':
|
||||
self.trans_pname = _('paper size|Letter')
|
||||
self.trans_pname = _('Letter', 'paper size')
|
||||
elif self.name == 'Legal':
|
||||
self.trans_pname = _('paper size|Legal')
|
||||
self.trans_pname = _('Legal', 'paper size')
|
||||
elif self.name == 'Custom Size':
|
||||
self.trans_pname = _('Custom Size')
|
||||
else:
|
||||
|
@ -40,8 +40,8 @@ from ...const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -171,17 +171,18 @@ def add_living_people_option(menu, category,
|
||||
|
||||
living_people = EnumeratedListOption(_("Living People"), mode)
|
||||
items = [(LivingProxyDb.MODE_INCLUDE_ALL,
|
||||
_T_("'living people'|Included, and all data"))]
|
||||
_T_("Included, and all data", "'living people'"))]
|
||||
if process_names:
|
||||
items += [
|
||||
(LivingProxyDb.MODE_INCLUDE_FULL_NAME_ONLY,
|
||||
_T_("'living people'|Full names, but data removed")),
|
||||
_T_("Full names, but data removed", "'living people'")),
|
||||
(LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY,
|
||||
_T_("'living people'|Given names replaced, and data removed")),
|
||||
_T_("Given names replaced, and data removed", "'living people'")),
|
||||
(LivingProxyDb.MODE_REPLACE_COMPLETE_NAME,
|
||||
_T_("'living people'|Complete names replaced, and data removed"))]
|
||||
_T_("Complete names replaced, and data removed",
|
||||
"'living people'"))]
|
||||
items += [(LivingProxyDb.MODE_EXCLUDE_ALL,
|
||||
_T_("'living people'|Not included"))]
|
||||
_T_("Not included", "'living people'"))]
|
||||
living_people.set_items(items, xml_items=True) # for deferred translation
|
||||
living_people.set_help(_("How to handle living people"))
|
||||
menu.add_option(category, "living_people", living_people)
|
||||
|
@ -46,9 +46,8 @@ from ...utils.file import media_path_full
|
||||
from ..docgen import IndexMark, INDEX_TYPE_ALP
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value):
|
||||
""" enable deferred translations (see Python docs 22.1.3.4) """
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -258,7 +258,7 @@ def available_updates():
|
||||
if "new" in whattypes:
|
||||
if (not config.get('behavior.do-not-show-previously-seen-addon-updates') or
|
||||
plugin_dict["i"] not in config.get('behavior.previously-seen-addon-updates')):
|
||||
addon_update_list.append((_("updates|New"),
|
||||
addon_update_list.append((_("New", "updates"),
|
||||
"%s/download/%s" %
|
||||
(config.get("behavior.addons-url"),
|
||||
plugin_dict["z"]),
|
||||
|
@ -2171,58 +2171,58 @@ class RelationshipCalculator:
|
||||
elif gender == FEMALE:
|
||||
return trans_text("wife")
|
||||
else:
|
||||
return trans_text("gender unknown|spouse")
|
||||
return trans_text("spouse", "gender unknown")
|
||||
elif spouse_type == self.PARTNER_EX_MARRIED:
|
||||
if gender == MALE:
|
||||
return trans_text("ex-husband")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("ex-wife")
|
||||
else:
|
||||
return trans_text("gender unknown|ex-spouse")
|
||||
return trans_text("ex-spouse", "gender unknown")
|
||||
elif spouse_type == self.PARTNER_UNMARRIED:
|
||||
if gender == MALE:
|
||||
return trans_text("male,unmarried|partner")
|
||||
return trans_text("partner", "male,unmarried")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("female,unmarried|partner")
|
||||
return trans_text("partner", "female,unmarried")
|
||||
else:
|
||||
return trans_text("gender unknown,unmarried|partner")
|
||||
return trans_text("partner", "gender unknown,unmarried")
|
||||
elif spouse_type == self.PARTNER_EX_UNMARRIED:
|
||||
if gender == MALE:
|
||||
return trans_text("male,unmarried|ex-partner")
|
||||
return trans_text("ex-partner", "male,unmarried")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("female,unmarried|ex-partner")
|
||||
return trans_text("ex-partner", "female,unmarried")
|
||||
else:
|
||||
return trans_text("gender unknown,unmarried|ex-partner")
|
||||
return trans_text("ex-partner", "gender unknown,unmarried")
|
||||
elif spouse_type == self.PARTNER_CIVIL_UNION:
|
||||
if gender == MALE:
|
||||
return trans_text("male,civil union|partner")
|
||||
return trans_text("partner", "male,civil union")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("female,civil union|partner")
|
||||
return trans_text("partner", "female,civil union")
|
||||
else:
|
||||
return trans_text("gender unknown,civil union|partner")
|
||||
return trans_text("partner", "gender unknown,civil union")
|
||||
elif spouse_type == self.PARTNER_EX_CIVIL_UNION:
|
||||
if gender == MALE:
|
||||
return trans_text("male,civil union|former partner")
|
||||
return trans_text("former partner", "male,civil union")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("female,civil union|former partner")
|
||||
return trans_text("former partner", "female,civil union")
|
||||
else:
|
||||
return trans_text("gender unknown,civil union|former partner")
|
||||
return trans_text("former partner", "gender unknown,civil union")
|
||||
elif spouse_type == self.PARTNER_UNKNOWN_REL:
|
||||
if gender == MALE:
|
||||
return trans_text("male,unknown relation|partner")
|
||||
return trans_text("partner", "male,unknown relation")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("female,unknown relation|partner")
|
||||
return trans_text("partner", "female,unknown relation")
|
||||
else:
|
||||
return trans_text("gender unknown,unknown relation|partner")
|
||||
return trans_text("partner", "gender unknown,unknown relation")
|
||||
else:
|
||||
# here we have spouse_type == self.PARTNER_EX_UNKNOWN_REL
|
||||
# or other not catched types
|
||||
if gender == MALE:
|
||||
return trans_text("male,unknown relation|former partner")
|
||||
return trans_text("former partner", "male,unknown relation")
|
||||
elif gender == FEMALE:
|
||||
return trans_text("female,unknown relation|former partner")
|
||||
return trans_text("former partner", "female,unknown relation")
|
||||
else:
|
||||
return trans_text("gender unknown,unknown relation|former partner")
|
||||
return trans_text("former partner", "gender unknown,unknown relation")
|
||||
|
||||
def connect_db_signals(self, dbstate):
|
||||
"""
|
||||
|
@ -1027,8 +1027,8 @@ class Lexeme(str):
|
||||
Python code::
|
||||
|
||||
_ = lexgettext
|
||||
dec = _("localized lexeme inflections||December")
|
||||
xmas = _("lexeme||Christmas")
|
||||
dec = _("|December", "localized lexeme inflections")
|
||||
xmas = _("|Christmas", "lexeme")
|
||||
text = _("{holiday} is celebrated in {month}".format(
|
||||
holiday=xmas, month=dec))
|
||||
greeting = _("Merry {holiday}!").format(holiday=xmas)
|
||||
@ -1142,26 +1142,33 @@ class GrampsTranslations(gettext.GNUTranslations):
|
||||
Overrides and extends gettext.GNUTranslations. See the Python gettext
|
||||
"Class API" documentation for how to use this.
|
||||
"""
|
||||
CONTEXT = "%s\x04%s"
|
||||
|
||||
def language(self):
|
||||
"""
|
||||
Return the target languge of this translations object.
|
||||
"""
|
||||
return self._language
|
||||
|
||||
def gettext(self, msgid):
|
||||
def gettext(self, msgid, context=''):
|
||||
"""
|
||||
Obtain translation of gettext, return a unicode object
|
||||
|
||||
:param msgid: The string to translated.
|
||||
:type msgid: unicode
|
||||
:param context: The message context.
|
||||
:type context: unicode
|
||||
:returns: Translation or the original.
|
||||
:rtype: unicode
|
||||
"""
|
||||
# If msgid =="" then gettext will return po file header
|
||||
# If context=="" and msgid =="" then gettext will return po file header
|
||||
# and that's not what we want.
|
||||
if len(msgid.strip()) == 0:
|
||||
if len((context + msgid).strip()) == 0:
|
||||
return msgid
|
||||
return gettext.GNUTranslations.gettext(self, msgid)
|
||||
if context:
|
||||
return self.pgettext(context, msgid)
|
||||
else:
|
||||
return gettext.GNUTranslations.gettext(self, msgid)
|
||||
|
||||
def ngettext(self, singular, plural, num):
|
||||
"""
|
||||
@ -1181,7 +1188,7 @@ class GrampsTranslations(gettext.GNUTranslations):
|
||||
"""
|
||||
return gettext.GNUTranslations.ngettext(self, singular, plural, num)
|
||||
|
||||
def sgettext(self, msgid, sep='|'):
|
||||
def sgettext(self, msgid, context='', sep='|'):
|
||||
"""
|
||||
Strip the context used for resolving translation ambiguities.
|
||||
|
||||
@ -1192,18 +1199,22 @@ class GrampsTranslations(gettext.GNUTranslations):
|
||||
|
||||
:param msgid: The string to translated.
|
||||
:type msgid: unicode
|
||||
:param context: The message context.
|
||||
:type context: unicode
|
||||
:param sep: The separator marking the context.
|
||||
:type sep: unicode
|
||||
:returns: Translation or the original with context stripped.
|
||||
:rtype: unicode
|
||||
"""
|
||||
msgval = self.gettext(msgid)
|
||||
if '\x04' in msgid: # Deferred translation
|
||||
context, msgid = msgid.split('\x04')
|
||||
msgval = self.gettext(msgid, context)
|
||||
if msgval == msgid:
|
||||
sep_idx = msgid.rfind(sep)
|
||||
msgval = msgid[sep_idx+1:]
|
||||
return msgval
|
||||
|
||||
def lexgettext(self, msgid):
|
||||
def lexgettext(self, msgid, context=''):
|
||||
"""
|
||||
Extract all inflections of the same lexeme,
|
||||
stripping the '|'-separated context using :meth:`~sgettext`
|
||||
@ -1222,13 +1233,28 @@ class GrampsTranslations(gettext.GNUTranslations):
|
||||
|
||||
:param msgid: The string to translated.
|
||||
:type msgid: unicode
|
||||
:param context: The message context.
|
||||
:type context: unicode
|
||||
:returns: Translation or the original with context stripped.
|
||||
:rtype: unicode (for option (1)) / Lexeme (option (2))
|
||||
"""
|
||||
variants = self.sgettext(msgid).split('|')
|
||||
variants = self.sgettext(msgid, context).split('|')
|
||||
return Lexeme([v.split('=') for v in variants]
|
||||
) if len(variants) > 1 else variants[0]
|
||||
|
||||
def pgettext(self, context, message):
|
||||
"""
|
||||
Copied from python 3.8
|
||||
"""
|
||||
ctxt_msg_id = self.CONTEXT % (context, message)
|
||||
missing = object()
|
||||
tmsg = self._catalog.get(ctxt_msg_id, missing)
|
||||
if tmsg is missing:
|
||||
if self._fallback:
|
||||
return self._fallback.pgettext(context, message)
|
||||
return message
|
||||
return tmsg
|
||||
|
||||
class GrampsNullTranslations(gettext.NullTranslations):
|
||||
"""
|
||||
Extends gettext.NullTranslations to provide the sgettext method.
|
||||
@ -1236,8 +1262,16 @@ class GrampsNullTranslations(gettext.NullTranslations):
|
||||
Note that it's necessary for msgid to be unicode. If it's not,
|
||||
neither will be the returned string.
|
||||
"""
|
||||
def sgettext(self, msgid, sep='|'):
|
||||
msgval = self.gettext(msgid)
|
||||
def gettext(self, msgid, context=''):
|
||||
if context:
|
||||
return self.pgettext(context, msgid)
|
||||
else:
|
||||
return gettext.NullTranslations.gettext(self, msgid)
|
||||
|
||||
def sgettext(self, msgid, context='', sep='|'):
|
||||
if '\x04' in msgid: # Deferred translation
|
||||
context, msgid = msgid.split('\x04')
|
||||
msgval = self.gettext(msgid, context)
|
||||
if msgval == msgid:
|
||||
sep_idx = msgid.rfind(sep)
|
||||
msgval = msgid[sep_idx+1:]
|
||||
@ -1250,3 +1284,11 @@ class GrampsNullTranslations(gettext.NullTranslations):
|
||||
The null translation returns the raw msgids, which are in English
|
||||
"""
|
||||
return "en"
|
||||
|
||||
def pgettext(self, context, message):
|
||||
"""
|
||||
Copied from python 3.8
|
||||
"""
|
||||
if self._fallback:
|
||||
return self._fallback.pgettext(context, message)
|
||||
return message
|
||||
|
@ -51,14 +51,14 @@ Keyword translation interface
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
|
||||
KEYWORDS = [("title", "t", _("Person|Title"), _("Person|TITLE")),
|
||||
KEYWORDS = [("title", "t", _("Title", "Person"), _("TITLE", "Person")),
|
||||
("given", "f", _("Given"), _("GIVEN")),
|
||||
("surname", "l", _("Surname"), _("SURNAME")),
|
||||
("call", "c", _("Name|Call"), _("Name|CALL")),
|
||||
("common", "x", _("Name|Common"), _("Name|COMMON")),
|
||||
("call", "c", _("Call", "Name"), _("CALL", "Name")),
|
||||
("common", "x", _("Common", "Name"), _("COMMON", "Name")),
|
||||
("initials", "i", _("Initials"), _("INITIALS")),
|
||||
("suffix", "s", _("Suffix"), _("SUFFIX")),
|
||||
("primary", "m", _("Name|Primary"), _("PRIMARY")),
|
||||
("primary", "m", _("Primary", "Name"), _("PRIMARY")),
|
||||
("primary[pre]", "0m", _("Primary[pre]"), _("PRIMARY[PRE]")),
|
||||
("primary[sur]", "1m", _("Primary[sur]"), _("PRIMARY[SUR]")),
|
||||
("primary[con]", "2m", _("Primary[con]"), _("PRIMARY[CON]")),
|
||||
|
@ -33,8 +33,8 @@ from ..lib import Person, Citation, FamilyRelType
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -45,7 +45,7 @@ def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
gender = {
|
||||
Person.MALE : _("male"),
|
||||
Person.FEMALE : _("female"),
|
||||
Person.UNKNOWN : _("gender|unknown"),
|
||||
Person.UNKNOWN : _("unknown", "gender"),
|
||||
}
|
||||
|
||||
def format_gender(type):
|
||||
|
@ -36,7 +36,8 @@ except:
|
||||
|
||||
class LexGettextTest(unittest.TestCase):
|
||||
SRC_WORD = "Inflect-me"
|
||||
MSGID = "how-to-use-lexgettext||" + SRC_WORD
|
||||
CONTEXT = "how-to-use-lexgettext"
|
||||
MSGID = "|" + SRC_WORD
|
||||
|
||||
def setUp(self):
|
||||
from ..grampslocale import GrampsTranslations
|
||||
@ -54,26 +55,26 @@ class LexGettextTest(unittest.TestCase):
|
||||
if MOCKING:
|
||||
try:
|
||||
self.trans.sgettext.assert_called_once_with(
|
||||
self.MSGID)
|
||||
self.MSGID, self.CONTEXT)
|
||||
except AttributeError as e:
|
||||
print ("Apparently the test has never set up the mock: ", e)
|
||||
|
||||
def testSrcWordOnlyIfNoTranslation(self):
|
||||
self.setup_sgettext_mock(self.SRC_WORD)
|
||||
result = self.trans.lexgettext(self.MSGID)
|
||||
result = self.trans.lexgettext(self.MSGID, self.CONTEXT)
|
||||
self.assertEqual(result, self.SRC_WORD)
|
||||
|
||||
def test3InflectionsExtractableByNameThroughForm(self):
|
||||
translated = "n=TargetNom|g=TargetGen|d=TargetDat"
|
||||
self.setup_sgettext_mock(translated)
|
||||
lex = self.trans.lexgettext(self.MSGID)
|
||||
lex = self.trans.lexgettext(self.MSGID, self.CONTEXT)
|
||||
formatted = "{lex.f[n]},{lex.f[g]},{lex.f[d]}".format(lex=lex)
|
||||
self.assertEqual(formatted, "TargetNom,TargetGen,TargetDat")
|
||||
|
||||
def testFirstLexemeFormExtractableAsDefaultString(self):
|
||||
translated = "def=Default|v1=Option1|a=AnotherOption"
|
||||
self.setup_sgettext_mock(translated)
|
||||
lex = self.trans.lexgettext(self.MSGID)
|
||||
lex = self.trans.lexgettext(self.MSGID, self.CONTEXT)
|
||||
formatted = "{}".format(lex)
|
||||
self.assertEqual(formatted, "Default")
|
||||
|
||||
|
@ -67,7 +67,7 @@ _ = glocale.translation.sgettext
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = '%s_-_Navigation' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Using_the_Clipboard')
|
||||
WIKI_HELP_SEC = _('Using_the_Clipboard', 'manual')
|
||||
clipdb = None # current db to avoid different transient dbs during db change
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -480,7 +480,7 @@ class ClipCitation(ClipHandleWrapper):
|
||||
if note.get_type() == NoteType.SOURCE_TEXT]
|
||||
page = citation.get_page()
|
||||
if not page:
|
||||
page = _('not available|NA')
|
||||
page = _('NA', 'not available')
|
||||
text = ""
|
||||
if srctxtlist:
|
||||
text = " ".join(srctxtlist[0].get().split())
|
||||
@ -1490,7 +1490,7 @@ class MultiTreeView(Gtk.TreeView):
|
||||
if obj2class(objclass):
|
||||
if self.dbstate.db.method('has_%s_handle', objclass)(handle):
|
||||
menu_item = Gtk.MenuItem(
|
||||
label=_("the object|See %s details") %
|
||||
label=_("See %s details", "the object") %
|
||||
glocale.trans_objclass(objclass))
|
||||
menu_item.connect(
|
||||
"activate",
|
||||
@ -1499,7 +1499,7 @@ class MultiTreeView(Gtk.TreeView):
|
||||
menu_item.show()
|
||||
# ---------------------------
|
||||
menu_item = Gtk.MenuItem(
|
||||
label=_("the object|Make %s active") %
|
||||
label=_("Make %s active", "the object") %
|
||||
glocale.trans_objclass(objclass))
|
||||
menu_item.connect(
|
||||
"activate", lambda widget:
|
||||
@ -1521,8 +1521,8 @@ class MultiTreeView(Gtk.TreeView):
|
||||
gids.add(obj.gramps_id)
|
||||
if gids:
|
||||
menu_item = Gtk.MenuItem(
|
||||
label=_("the object|Create Filter from %s "
|
||||
"selected...") %
|
||||
label=_("Create Filter from %s selected...",
|
||||
"the object") %
|
||||
glocale.trans_objclass(objclass))
|
||||
menu_item.connect("activate", lambda widget: make_filter(
|
||||
self.dbstate, self.uistate,
|
||||
|
@ -845,19 +845,19 @@ class GrampsPreferences(ConfigureDialog):
|
||||
_("Common")),
|
||||
"%s, %s %s (%s)" % (_("Surname"), _("Given"), _("Suffix"),
|
||||
_("Nickname")),
|
||||
"%s, %s %s (%s)" % (_("Surname"), _("Name|Common"), _("Suffix"),
|
||||
"%s, %s %s (%s)" % (_("Surname"), _("Common", "Name"), _("Suffix"),
|
||||
_("Nickname")),
|
||||
"%s, %s %s" % (_("Surname"), _("Name|Common"), _("Suffix")),
|
||||
"%s, %s %s" % (_("Surname"), _("Common", "Name"), _("Suffix")),
|
||||
"%s, %s %s (%s)" % (_("SURNAME"), _("Given"), _("Suffix"),
|
||||
_("Call")),
|
||||
"%s, %s (%s)" % (_("Surname"), _("Given"), _("Name|Common")),
|
||||
"%s, %s (%s)" % (_("Surname"), _("Name|Common"), _("Nickname")),
|
||||
"%s, %s (%s)" % (_("Surname"), _("Given"), _("Common", "Name")),
|
||||
"%s, %s (%s)" % (_("Surname"), _("Common", "Name"), _("Nickname")),
|
||||
"%s %s" % (_("Given"), _("Surname")),
|
||||
"%s %s, %s" % (_("Given"), _("Surname"), _("Suffix")),
|
||||
"%s %s %s" % (_("Given"), _("NotPatronymic"), _("Patronymic")),
|
||||
"%s, %s %s (%s)" % (_("SURNAME"), _("Given"), _("Suffix"),
|
||||
_("Common")),
|
||||
"%s, %s (%s)" % (_("SURNAME"), _("Given"), _("Name|Common")),
|
||||
"%s, %s (%s)" % (_("SURNAME"), _("Given"), _("Common", "Name")),
|
||||
"%s, %s (%s)" % (_("SURNAME"), _("Given"), _("Nickname")),
|
||||
"%s %s" % (_("Given"), _("SURNAME")),
|
||||
"%s %s, %s" % (_("Given"), _("SURNAME"), _("Suffix")),
|
||||
|
@ -67,7 +67,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Select_a_media_selector')
|
||||
WIKI_HELP_SEC = _('Select_a_media_selector', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -139,7 +139,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
||||
media_path = media_path_full(self.dbstate.db, ref_obj.get_path())
|
||||
if media_path:
|
||||
# Translators: _View means "to look at this"
|
||||
item = Gtk.MenuItem.new_with_mnemonic(_('verb:look at this|_View'))
|
||||
item = Gtk.MenuItem.new_with_mnemonic(_('_View', 'verb:look at this'))
|
||||
item.connect('activate', make_launcher(media_path, self.uistate))
|
||||
item.show()
|
||||
self.menu.append(item)
|
||||
|
@ -79,7 +79,7 @@ class SurnameTab(EmbeddedList):
|
||||
(_('Connector'), 2, 100, TEXT_EDIT_COL, -1, None),
|
||||
]
|
||||
_column_combo = (_('Origin'), -1, 150, 3) # name, sort, width, modelcol
|
||||
_column_toggle = (_('Name|Primary'), -1, 80, 4)
|
||||
_column_toggle = (_('Primary', 'Name'), -1, 80, 4)
|
||||
|
||||
def __init__(self, dbstate, uistate, track, name, on_change=None,
|
||||
top_label='<b>%s</b>' % _("Multiple Surnames") ):
|
||||
|
@ -62,7 +62,7 @@ from gramps.gen.const import URL_MANUAL_SECT3
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Address_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Address_Editor_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -59,7 +59,7 @@ from gramps.gen.const import URL_MANUAL_SECT3
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Attribute_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Attribute_Editor_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -63,7 +63,7 @@ from gramps.gen.const import URL_MANUAL_SECT1
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Child_Reference_Editor')
|
||||
WIKI_HELP_SEC = _('Child_Reference_Editor', 'manual')
|
||||
|
||||
_RETURN = Gdk.keyval_from_name("Return")
|
||||
_KP_ENTER = Gdk.keyval_from_name("KP_Enter")
|
||||
|
@ -66,7 +66,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|New_Citation_dialog')
|
||||
WIKI_HELP_SEC = _('New_Citation_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -96,7 +96,7 @@ CAL_TO_MONTHS_NAMES = {
|
||||
Date.CAL_SWEDISH : displayer.swedish }
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Editing_dates')
|
||||
WIKI_HELP_SEC = _('Editing_dates', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -61,7 +61,7 @@ from gramps.gen.utils.db import get_participant_from_event
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|New_Event_dialog')
|
||||
WIKI_HELP_SEC = _('New_Event_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -54,7 +54,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Event_Reference_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Event_Reference_Editor_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -89,7 +89,7 @@ from ..dbguielement import DbGUIElement
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Family_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Family_Editor_dialog', 'manual')
|
||||
|
||||
SelectPerson = SelectorFactory('Person')
|
||||
|
||||
|
@ -64,7 +64,7 @@ from gramps.gen.const import URL_MANUAL_SECT1
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|LDS_Ordinance_Editor')
|
||||
WIKI_HELP_SEC = _('LDS_Ordinance_Editor', 'manual')
|
||||
|
||||
_DATA_MAP = {
|
||||
LdsOrd.BAPTISM : [
|
||||
|
@ -46,7 +46,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Link_Editor')
|
||||
WIKI_HELP_SEC = _('Link_Editor', 'manual')
|
||||
|
||||
WEB, EVENT, FAMILY, MEDIA, NOTE, PERSON, PLACE, REPOSITORY, SOURCE, CITATION = list(range(10))
|
||||
OBJECT_MAP = {
|
||||
|
@ -65,7 +65,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|New_Media_dialog')
|
||||
WIKI_HELP_SEC = _('New_Media_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -69,7 +69,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Media_Reference_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Media_Reference_Editor_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -97,8 +97,8 @@ class EditMediaRef(EditReference):
|
||||
self.setup_configs('interface.media-ref', 600, 450)
|
||||
|
||||
self.define_warn_box(self.top.get_object("warn_box"))
|
||||
self.top.get_object("label427").set_text(_("Y coordinate|Y"))
|
||||
self.top.get_object("label428").set_text(_("Y coordinate|Y"))
|
||||
self.top.get_object("label427").set_text(_("Y", "Y coordinate"))
|
||||
self.top.get_object("label428").set_text(_("Y", "Y coordinate"))
|
||||
|
||||
tblref = self.top.get_object('table50')
|
||||
self.notebook_ref = self.top.get_object('notebook_ref')
|
||||
|
@ -159,7 +159,7 @@ class EditName(EditSecondary):
|
||||
self.define_cancel_button(self.top.get_object('button119'))
|
||||
self.define_help_button(self.top.get_object('button131'),
|
||||
WIKI_HELP_PAGE,
|
||||
_('manual|Name_Editor'))
|
||||
_('Name_Editor', 'manual'))
|
||||
self.define_ok_button(self.top.get_object('button118'), self.save)
|
||||
|
||||
def _validate_call(self, widget, text):
|
||||
|
@ -64,7 +64,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Editing_information_about_notes')
|
||||
WIKI_HELP_SEC = _('Editing_information_about_notes', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -240,7 +240,7 @@ class EditPerson(EditPrimary):
|
||||
self.define_ok_button(self.top.get_object("ok"), self.save)
|
||||
self.define_help_button(self.top.get_object("button134"),
|
||||
WIKI_HELP_PAGE,
|
||||
_('manual|Editing_information_about_people'))
|
||||
_('Editing_information_about_people', 'manual'))
|
||||
|
||||
self.given.connect("focus-out-event", self._given_focus_out_event)
|
||||
self.top.get_object("editnamebtn").connect("clicked",
|
||||
|
@ -64,7 +64,7 @@ from gramps.gen.const import URL_MANUAL_SECT1
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Person_Reference_Editor')
|
||||
WIKI_HELP_SEC = _('Person_Reference_Editor', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -66,7 +66,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Place_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Place_Editor_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -88,7 +88,7 @@ class EditPlace(EditPrimary):
|
||||
self.set_window(self.top.toplevel, None, self.get_menu_title())
|
||||
self.setup_configs('interface.place', 650, 450)
|
||||
self.place_name_label = self.top.get_object('place_name_label')
|
||||
self.place_name_label.set_text(_('place|Name:'))
|
||||
self.place_name_label.set_text(_('Name:', 'place'))
|
||||
|
||||
def get_menu_title(self):
|
||||
if self.obj and self.obj.get_handle():
|
||||
|
@ -46,7 +46,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Place_Name_Editor_dialog')
|
||||
WIKI_HELP_SEC = _('Place_Name_Editor_dialog', 'manual')
|
||||
|
||||
ISO_CODES = (
|
||||
'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az',
|
||||
|
@ -62,7 +62,7 @@ class EditPlaceRef(EditReference):
|
||||
self.define_warn_box(self.top.get_object("warning"))
|
||||
self.define_expander(self.top.get_object("expander"))
|
||||
#self.place_name_label = self.top.get_object('place_name_label')
|
||||
#self.place_name_label.set_text(_('place|Name:'))
|
||||
#self.place_name_label.set_text(_('Name:', 'place'))
|
||||
|
||||
tblref = self.top.get_object('table64')
|
||||
notebook = self.top.get_object('notebook_ref')
|
||||
|
@ -57,7 +57,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|New_Repository_dialog')
|
||||
WIKI_HELP_SEC = _('New_Repository_dialog', 'manual')
|
||||
|
||||
class EditRepository(EditPrimary):
|
||||
|
||||
|
@ -61,7 +61,7 @@ from gramps.gen.const import URL_MANUAL_SECT2
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|New_Source_dialog')
|
||||
WIKI_HELP_SEC = _('New_Source_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -45,7 +45,7 @@ from ..listmodel import ListModel, TOGGLE
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = '%s_-_Filters' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Tag_selection_dialog')
|
||||
WIKI_HELP_SEC = _('Tag_selection_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -44,7 +44,7 @@ from gramps.gen.const import URL_MANUAL_SECT1
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Internet_Address_Editor')
|
||||
WIKI_HELP_SEC = _('Internet_Address_Editor', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -81,9 +81,9 @@ from gramps.gen.config import config
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = '%s_-_Filters' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Add_Rule_dialog')
|
||||
WIKI_HELP_SEC2 = _('manual|Define_Filter_dialog')
|
||||
WIKI_HELP_SEC3 = _('manual|Custom_Filters')
|
||||
WIKI_HELP_SEC = _('Add_Rule_dialog', 'manual')
|
||||
WIKI_HELP_SEC2 = _('Define_Filter_dialog', 'manual')
|
||||
WIKI_HELP_SEC3 = _('Custom_Filters', 'manual')
|
||||
|
||||
# dictionary mapping FILTER_TYPE of views to Filter window name
|
||||
_TITLES = {
|
||||
|
@ -111,7 +111,7 @@ class CitationSidebarFilter(SidebarFilter):
|
||||
self.add_text_entry(_('ID'), self.filter_id)
|
||||
self.add_text_entry(_('Volume/Page'), self.filter_page)
|
||||
self.add_text_entry(_('Date'), self.filter_date)
|
||||
self.add_entry(_('Citation: Minimum Confidence|Min. Conf.'), self.filter_conf)
|
||||
self.add_entry(_('Min. Conf.', 'Citation: Minimum Confidence'), self.filter_conf)
|
||||
self.add_text_entry(_('Note'), self.filter_note)
|
||||
self.add_entry(_('Tag'), self.tag)
|
||||
self.add_filter_entry(_('Custom filter'), self.generic)
|
||||
|
@ -130,7 +130,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">Y coordinate|Y</property>
|
||||
<property name="label" translatable="yes" context="Y coordinate">Y</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">corner2_y</property>
|
||||
</object>
|
||||
@ -254,7 +254,7 @@ You can use the mouse on the picture to select a region, or use these spinbutton
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">Y coordinate|Y</property>
|
||||
<property name="label" translatable="yes" context="Y coordinate">Y</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">corner1_y</property>
|
||||
</object>
|
||||
|
@ -174,7 +174,7 @@
|
||||
<object class="ValidatableMaskedEntry" id="lat_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Latitude (position above the Equator) of the place in decimal or degree notation.
|
||||
<property name="tooltip_text" translatable="yes">Latitude (position above the Equator) of the place in decimal or degree notation.
|
||||
Eg, valid values are 12.0154, 50°52′21.92″N, N50°52′21.92″ or 50:52:21.92
|
||||
You can set these values via the Geography View by searching the place, or via a map service in the place view.</property>
|
||||
<property name="hexpand">True</property>
|
||||
@ -189,7 +189,7 @@ You can set these values via the Geography View by searching the place, or via a
|
||||
<object class="ValidatableMaskedEntry" id="lon_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Longitude (position relative to the Prime, or Greenwich, Meridian) of the place in decimal or degree notation.
|
||||
<property name="tooltip_text" translatable="yes">Longitude (position relative to the Prime, or Greenwich, Meridian) of the place in decimal or degree notation.
|
||||
Eg, valid values are -124.3647, 124°52′21.92″E, E124°52′21.92″ or 124:52:21.92
|
||||
You can set these values via the Geography View by searching the place, or via a map service in the place view.</property>
|
||||
<property name="hexpand">True</property>
|
||||
@ -352,7 +352,7 @@ You can set these values via the Geography View by searching the place, or via a
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">place|Name:</property>
|
||||
<property name="label" translatable="yes" context="place">Name:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -209,7 +209,7 @@ primary data for the merged repository.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="name_btn1">
|
||||
<property name="label" translatable="yes">repo|Name:</property>
|
||||
<property name="label" translatable="yes" context="repo">Name:</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -225,7 +225,7 @@ primary data for the merged repository.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="name_btn2">
|
||||
<property name="label" translatable="yes">repo|Name:</property>
|
||||
<property name="label" translatable="yes" context="repo">Name:</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
|
@ -382,7 +382,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">point size|pt</property>
|
||||
<property name="label" translatable="yes" context="point size">pt</property>
|
||||
<property name="justify">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -43,7 +43,7 @@ from ..managedwindow import ManagedWindow
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = '%s_-_Error_and_Warning_Reference' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Error_Report')
|
||||
WIKI_HELP_SEC = _('Error_Report', 'manual')
|
||||
|
||||
class ErrorView(ManagedWindow):
|
||||
"""
|
||||
|
@ -43,7 +43,7 @@ from gramps.gen.merge import MergeCitationQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Citations')
|
||||
WIKI_HELP_SEC = _('Merge_Citations', 'manual')
|
||||
_GLADE_FILE = 'mergecitation.glade'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -42,7 +42,7 @@ from gramps.gen.merge import MergeEventQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Events')
|
||||
WIKI_HELP_SEC = _('Merge_Events', 'manual')
|
||||
_GLADE_FILE = 'mergeevent.glade'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -43,7 +43,7 @@ from gramps.gen.merge import MergePersonQuery, MergeFamilyQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Families')
|
||||
WIKI_HELP_SEC = _('Merge_Families', 'manual')
|
||||
_GLADE_FILE = 'mergefamily.glade'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -41,7 +41,7 @@ from gramps.gen.merge import MergeMediaQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Media_Objects')
|
||||
WIKI_HELP_SEC = _('Merge_Media_Objects', 'manual')
|
||||
_GLADE_FILE = 'mergemedia.glade'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -41,7 +41,7 @@ from gramps.gen.merge import MergeNoteQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Notes')
|
||||
WIKI_HELP_SEC = _('Merge_Notes', 'manual')
|
||||
_GLADE_FILE = 'mergenote.glade'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -55,7 +55,7 @@ from gramps.gen.merge import MergePersonQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _("manual|Merge_People")
|
||||
WIKI_HELP_SEC = _("Merge_People", "manual")
|
||||
_GLADE_FILE = "mergeperson.glade"
|
||||
|
||||
# translators: needed for French, ignore otherwise
|
||||
|
@ -50,9 +50,9 @@ from gramps.gen.config import config
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Places')
|
||||
WIKI_HELP_SEC = _('Merge_Places', 'manual')
|
||||
_GLADE_FILE = 'mergeplace.glade'
|
||||
PLACE_NAME = _('place|Name:')
|
||||
PLACE_NAME = _('Name:', 'place')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -41,9 +41,9 @@ from gramps.gen.merge import MergeRepositoryQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Repositories')
|
||||
WIKI_HELP_SEC = _('Merge_Repositories', 'manual')
|
||||
_GLADE_FILE = 'mergerepository.glade'
|
||||
REPO_NAME = _('repo|Name:')
|
||||
REPO_NAME = _('Name:', 'repo')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -42,7 +42,7 @@ from gramps.gen.merge import MergeSourceQuery
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT3
|
||||
WIKI_HELP_SEC = _('manual|Merge_Sources')
|
||||
WIKI_HELP_SEC = _('Merge_Sources', 'manual')
|
||||
_GLADE_FILE = 'mergesource.glade'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -138,7 +138,7 @@ class QuickTable(SimpleTable):
|
||||
menu_item.show()
|
||||
# Now add more items to popup menu, if available
|
||||
# See details (edit, etc):
|
||||
menu_item = Gtk.MenuItem(label=_("the object|See %s details") %
|
||||
menu_item = Gtk.MenuItem(label=_("See %s details", "the object") %
|
||||
glocale.trans_objclass(objclass))
|
||||
menu_item.connect(
|
||||
"activate", lambda widget: self.on_table_doubleclick(treeview))
|
||||
@ -146,7 +146,7 @@ class QuickTable(SimpleTable):
|
||||
menu_item.show()
|
||||
# Add other items to menu:
|
||||
if objclass == 'Person':
|
||||
menu_item = Gtk.MenuItem(label=_("the object|Make %s active")
|
||||
menu_item = Gtk.MenuItem(label=_("Make %s active", "the object")
|
||||
% glocale.trans_objclass('Person'))
|
||||
menu_item.connect("activate",
|
||||
lambda widget: self.on_table_click(treeview))
|
||||
|
@ -213,7 +213,7 @@ class PaperFrame(Gtk.Box):
|
||||
else:
|
||||
self.paper_unit = 'in.'
|
||||
self.paper_unit_multiplier = 2.54
|
||||
paper_unit_text = _("inch|in.")
|
||||
paper_unit_text = _("in.", "inch")
|
||||
|
||||
self.lunits1.set_text(paper_unit_text)
|
||||
self.lunits2.set_text(paper_unit_text)
|
||||
|
@ -105,7 +105,7 @@ class StyleListDisplay(ManagedWindow):
|
||||
"on_edit_clicked" : self.on_edit_clicked,
|
||||
"on_cancel_clicked" : self.__cancel,
|
||||
"on_help_btn_clicked" : lambda x: display_help(
|
||||
WIKI_HELP_PAGE, _('manual|Document_Styles_dialog')),
|
||||
WIKI_HELP_PAGE, _('Document_Styles_dialog', 'manual')),
|
||||
"on_cancel_style_clicked" : dummy_callback,
|
||||
"on_save_style_clicked" : dummy_callback,
|
||||
"on_help_btn_style_clicked" : dummy_callback,
|
||||
@ -239,7 +239,7 @@ class StyleEditor(ManagedWindow):
|
||||
"on_save_style_clicked" : self.on_save_style_clicked,
|
||||
"on_cancel_style_clicked" : self.__cancel,
|
||||
"on_help_btn_style_clicked" : lambda x: display_help(
|
||||
WIKI_HELP_PAGE, _('manual|Style_editor_dialog')),
|
||||
WIKI_HELP_PAGE, _('Style_editor_dialog', 'manual')),
|
||||
"on_cancel_clicked" : dummy_callback,
|
||||
"on_ok_clicked" : dummy_callback,
|
||||
"on_add_clicked" : dummy_callback,
|
||||
@ -265,7 +265,7 @@ class StyleEditor(ManagedWindow):
|
||||
self.line_style.pack_start(renderer_text, True)
|
||||
self.line_style.add_attribute(renderer_text, "text", 1)
|
||||
|
||||
self.top.get_object("label6").set_text(_("point size|pt"))
|
||||
self.top.get_object("label6").set_text(_("pt", "point size"))
|
||||
|
||||
titles = [(_('Style'), 0, 130)]
|
||||
self.plist = ListModel(self.top.get_object("ptree"), titles,
|
||||
|
@ -83,4 +83,4 @@ class SelectCitation(BaseSelector):
|
||||
return self.db.get_citation_from_handle(handle)
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Select_Source_or_Citation_selector')
|
||||
WIKI_HELP_SEC = _('Select_Source_or_Citation_selector', 'manual')
|
||||
|
@ -76,4 +76,4 @@ class SelectEvent(BaseSelector):
|
||||
return self.db.get_event_from_handle
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Select_Event_selector')
|
||||
WIKI_HELP_SEC = _('Select_Event_selector', 'manual')
|
||||
|
@ -73,4 +73,4 @@ class SelectFamily(BaseSelector):
|
||||
return self.db.get_family_from_handle
|
||||
|
||||
WIKI_HELP_PAGE = '%s_-_Categories' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Select_Family_selector')
|
||||
WIKI_HELP_SEC = _('Select_Family_selector', 'manual')
|
||||
|
@ -79,4 +79,4 @@ class SelectNote(BaseSelector):
|
||||
return self.db.get_note_from_handle
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Select_Note_selector')
|
||||
WIKI_HELP_SEC = _('Select_Note_selector', 'manual')
|
||||
|
@ -105,4 +105,4 @@ class SelectObject(BaseSelector):
|
||||
gc.collect()
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
WIKI_HELP_SEC = _('manual|Select_Media_Object_selector')
|
||||
WIKI_HELP_SEC = _('Select_Media_Object_selector', 'manual')
|
||||
|
@ -61,13 +61,13 @@ class SelectPerson(BaseSelector):
|
||||
self.title = title
|
||||
self.WIKI_HELP_PAGE = URL_MANUAL_SECT1
|
||||
if title == _("Select Father"):
|
||||
self.WIKI_HELP_SEC = _('manual|Select_Father_selector')
|
||||
self.WIKI_HELP_SEC = _('Select_Father_selector', 'manual')
|
||||
elif title == _("Select Mother"):
|
||||
self.WIKI_HELP_SEC = _('manual|Select_Mother_selector')
|
||||
self.WIKI_HELP_SEC = _('Select_Mother_selector', 'manual')
|
||||
elif title == _("Select Child"):
|
||||
self.WIKI_HELP_SEC = _('manual|Select_Child_selector')
|
||||
self.WIKI_HELP_SEC = _('Select_Child_selector', 'manual')
|
||||
else:
|
||||
self.WIKI_HELP_SEC = _('manual|Select_Person_selector')
|
||||
self.WIKI_HELP_SEC = _('Select_Person_selector', 'manual')
|
||||
|
||||
BaseSelector.__init__(self, dbstate, uistate, track, filter,
|
||||
skip, show_search_bar, default)
|
||||
|
@ -87,4 +87,4 @@ class SelectPlace(BaseSelector):
|
||||
self.search_bar.setup_filter(cols)
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Select_Place_selector')
|
||||
WIKI_HELP_SEC = _('Select_Place_selector', 'manual')
|
||||
|
@ -72,4 +72,4 @@ class SelectRepository(BaseSelector):
|
||||
return self.db.get_repository_from_handle
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Select_Repository_selector')
|
||||
WIKI_HELP_SEC = _('Select_Repository_selector', 'manual')
|
||||
|
@ -73,4 +73,4 @@ class SelectSource(BaseSelector):
|
||||
return self.db.get_source_from_handle
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_SECT2
|
||||
WIKI_HELP_SEC = _('manual|Select_Source_selector')
|
||||
WIKI_HELP_SEC = _('Select_Source_selector', 'manual')
|
||||
|
@ -1751,7 +1751,7 @@ class QuickBackup(ManagedWindow): # TODO move this class into its own module
|
||||
hbox.pack_start(label, False, True, 0)
|
||||
include = Gtk.RadioButton.new_with_mnemonic_from_widget(
|
||||
None, "%s (%s %s)" % (_("Include"),
|
||||
mbytes, _("Megabyte|MB")))
|
||||
mbytes, _("MB", "Megabyte")))
|
||||
exclude = Gtk.RadioButton.new_with_mnemonic_from_widget(include,
|
||||
_("Exclude"))
|
||||
include.connect("toggled", lambda widget: self.media_toggle(widget,
|
||||
|
@ -66,7 +66,7 @@ _ = glocale.translation.sgettext
|
||||
#-------------------------------------------------------------------------
|
||||
LOG = logging.getLogger(".Bookmarks")
|
||||
WIKI_HELP_PAGE = '%s_-_Navigation' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Bookmarks')
|
||||
WIKI_HELP_SEC = _('Bookmarks', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -109,8 +109,8 @@ TAG_MENU = (
|
||||
|
||||
WIKI_HELP_PAGE = '%s_-_Filters' % \
|
||||
URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Organize_Tags_Window')
|
||||
WIKI_HELP_SEC2 = _('manual|New_Tag_dialog')
|
||||
WIKI_HELP_SEC = _('Organize_Tags_Window', 'manual')
|
||||
WIKI_HELP_SEC2 = _('New_Tag_dialog', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -60,7 +60,7 @@ from gramps.gen.display.name import displayer as name_displayer
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
WIKI_HELP_PAGE = URL_MANUAL_PAGE + "_-_Categories"
|
||||
WIKI_HELP_SEC = _('manual|Reorder_Relationships_dialog')
|
||||
WIKI_HELP_SEC = _('Reorder_Relationships_dialog', 'manual')
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -57,9 +57,9 @@ PT2CM = utils.pt2cm
|
||||
# Constants
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
_BORN = _("birth abbreviation|b."),
|
||||
_DIED = _("death abbreviation|d."),
|
||||
_MARR = _("marriage abbreviation|m."),
|
||||
_BORN = _("b.", "birth abbreviation"),
|
||||
_DIED = _("d.", "death abbreviation"),
|
||||
_MARR = _("m.", "marriage abbreviation"),
|
||||
|
||||
LVL_GEN, LVL_INDX, LVL_Y = range(3)
|
||||
|
||||
|
@ -68,8 +68,8 @@ pt2cm = utils.pt2cm
|
||||
cm2pt = utils.cm2pt
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
_TITLE1 = _T_("My Calendar")
|
||||
_TITLE2 = _T_("Produced with Gramps")
|
||||
|
@ -54,9 +54,9 @@ PT2CM = utils.pt2cm
|
||||
# Constants
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
_BORN = _("birth abbreviation|b."),
|
||||
_DIED = _("death abbreviation|d."),
|
||||
_MARR = _("marriage abbreviation|m."),
|
||||
_BORN = _("b.", "birth abbreviation"),
|
||||
_DIED = _("d.", "death abbreviation"),
|
||||
_MARR = _("m.", "marriage abbreviation"),
|
||||
|
||||
_RPT_NAME = 'descend_chart'
|
||||
|
||||
|
@ -318,8 +318,8 @@ class _options:
|
||||
]
|
||||
|
||||
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
|
||||
|
||||
@ -335,7 +335,7 @@ class Extract:
|
||||
"""Methods for extracting statistical data from the database"""
|
||||
# key, non-localized name, localized name, type method, data method
|
||||
self.extractors = {
|
||||
'data_title': ("Title", _T_("person|Title"),
|
||||
'data_title': ("Title", _T_("Title", "person"),
|
||||
self.get_person, self.get_title),
|
||||
'data_sname': ("Surname", _T_("Surname"),
|
||||
self.get_person, self.get_surname),
|
||||
|
@ -54,8 +54,8 @@ from gramps.gen.lib import Date
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -63,8 +63,8 @@ def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
def _get_sort_functions(sort):
|
||||
return [(_T_("sorted by|Birth Date"), sort.by_birthdate_key),
|
||||
(_T_("sorted by|Name"), sort.by_last_name_key),]
|
||||
return [(_T_("Birth Date", "sorted by"), sort.by_birthdate_key),
|
||||
(_T_("Name", "sorted by"), sort.by_last_name_key),]
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -353,7 +353,7 @@ class CSVWriter:
|
||||
self.write_csv(
|
||||
_("Person"), _("Surname"), _("Given"),
|
||||
_("Call"), _("Suffix"), _("Prefix"),
|
||||
_("Person|Title"), _("Gender"),
|
||||
_("Title", "Person"), _("Gender"),
|
||||
_("Birth date"), _("Birth place"), _("Birth source"),
|
||||
_("Baptism date"), _("Baptism place"), _("Baptism source"),
|
||||
_("Death date"), _("Death place"), _("Death source"),
|
||||
|
@ -287,14 +287,14 @@ register(GRAMPLET,
|
||||
|
||||
register(GRAMPLET,
|
||||
id="To Do",
|
||||
name=_("gramplet|To Do"),
|
||||
name=_("To Do", "gramplet"),
|
||||
description = _("Gramplet for displaying a To Do list"),
|
||||
status = STABLE,
|
||||
fname="todogramplet.py",
|
||||
height=300,
|
||||
expand=True,
|
||||
gramplet = 'ToDoGramplet',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
version="1.0.0",
|
||||
gramps_target_version=MODULE_VERSION,
|
||||
navtypes=["Dashboard"],
|
||||
@ -1148,7 +1148,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'PersonToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Person"],
|
||||
)
|
||||
|
||||
@ -1162,7 +1162,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'EventToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Event"],
|
||||
)
|
||||
|
||||
@ -1176,7 +1176,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'FamilyToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Family"],
|
||||
)
|
||||
|
||||
@ -1190,7 +1190,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'PlaceToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Place"],
|
||||
)
|
||||
|
||||
@ -1204,7 +1204,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'SourceToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Source"],
|
||||
)
|
||||
|
||||
@ -1218,7 +1218,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'CitationToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Citation"],
|
||||
)
|
||||
|
||||
@ -1232,7 +1232,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'RepositoryToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Repository"],
|
||||
)
|
||||
|
||||
@ -1246,7 +1246,7 @@ register(GRAMPLET,
|
||||
fname="todo.py",
|
||||
height=200,
|
||||
gramplet = 'MediaToDo',
|
||||
gramplet_title=_("gramplet|To Do"),
|
||||
gramplet_title=_("To Do", "gramplet"),
|
||||
navtypes=["Media"],
|
||||
)
|
||||
|
||||
|
@ -251,7 +251,7 @@ class PedigreeGramplet(Gramplet):
|
||||
gens = sorted(self._generations)
|
||||
self.append_text(_("\nBreakdown by generation:\n"))
|
||||
all = [active_person.handle]
|
||||
percent_sign = _("percent sign or text string|%")
|
||||
percent_sign = _("%", "percent sign or text string")
|
||||
for g in gens:
|
||||
yield True
|
||||
count = len(self._generations[g])
|
||||
|
@ -193,7 +193,7 @@ class StatsGramplet(Gramplet):
|
||||
|
||||
self.link(_("%s:") % _("Total size of media objects"),
|
||||
'Filter', 'media by size')
|
||||
self.append_text(" %s %s" % (mbytes, _("Megabyte|MB")))
|
||||
self.append_text(" %s %s" % (mbytes, _("MB", "Megabyte")))
|
||||
self.append_text("\n")
|
||||
self.link(_("%s:") % _("Missing Media Objects"),
|
||||
'Filter', 'missing media')
|
||||
|
@ -109,7 +109,7 @@ class WelcomeGramplet(Gramplet):
|
||||
{'gramps_wiki_url': URL_WIKISTRING}) + '\n'
|
||||
welcome += linkst(_('Gramps online manual'),
|
||||
URL_WIKISTRING + URL_MANUAL_PAGE +
|
||||
_('locale_suffix|')) + '\n'
|
||||
_('', 'locale_suffix')) + '\n'
|
||||
welcome += linkst(_('Ask questions on gramps-users mailing list'),
|
||||
'%(gramps_home_url)scontact/' %
|
||||
{'gramps_home_url': URL_HOMEPAGE}) + '\n\n'
|
||||
|
@ -166,7 +166,7 @@ class CSVParser:
|
||||
_("Given"), _("Given name")),
|
||||
"callname": ("call name", _("Call name"), "callname", "call_name",
|
||||
"call", _("Call"), _("call")),
|
||||
"title": ("title", _("title"), _("Person or Place|title")),
|
||||
"title": ("title", _("title"), _("title", "Person or Place")),
|
||||
"prefix": ("prefix", _("prefix"), _("Prefix")),
|
||||
"suffix": ("suffix", _("suffix"), _("Suffix")),
|
||||
"gender": ("gender", _("gender"), _("Gender")),
|
||||
|
@ -59,7 +59,7 @@ from gramps.plugins.lib import libprogen
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = '%s_-_Importer' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Import_from_another_genealogy_program')
|
||||
WIKI_HELP_SEC = _('Import_from_another_genealogy_program', 'manual')
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -72,7 +72,7 @@ def _get_empty_endnote_numbers(obj):
|
||||
return ""
|
||||
|
||||
# avoid normal translation!
|
||||
# enable deferred translations (see Python docs 22.1.3.4)
|
||||
# enable deferred translations
|
||||
# (these days this is done elsewhere as _T_ but it was done here first)
|
||||
##from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
##_ = glocale.translation.gettext
|
||||
|
@ -242,7 +242,7 @@ class BasePersonView(ListView):
|
||||
<attribute name="label" translatable="yes">_Merge...</attribute>
|
||||
</item>
|
||||
</section>
|
||||
''' % _("action|_Edit..."), # to use sgettext()
|
||||
''' % _("_Edit...", "action"), # to use sgettext()
|
||||
'''
|
||||
<placeholder id='otheredit'>
|
||||
<item>
|
||||
@ -400,7 +400,7 @@ class BasePersonView(ListView):
|
||||
</placeholder>
|
||||
</section>
|
||||
</menu>
|
||||
''' % _('action|_Edit...') # to use sgettext()
|
||||
''' % _('_Edit...', 'action') # to use sgettext()
|
||||
]
|
||||
|
||||
def get_handle_from_gramps_id(self, gid):
|
||||
|
@ -319,7 +319,7 @@ class PlaceBaseView(ListView):
|
||||
<attribute name="label" translatable="yes">_Merge...</attribute>
|
||||
</item>
|
||||
</section>
|
||||
''' % _("action|_Edit..."), # to use sgettext()
|
||||
''' % _("_Edit...", "action"), # to use sgettext()
|
||||
'''
|
||||
<placeholder id='otheredit'>
|
||||
<item>
|
||||
@ -454,7 +454,7 @@ class PlaceBaseView(ListView):
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
''' % _('action|_Edit...')] # to use sgettext()
|
||||
''' % _('_Edit...', 'action')] # to use sgettext()
|
||||
|
||||
map_ui_menu = '''
|
||||
<menu id="MapBtnMenu">
|
||||
|
@ -47,8 +47,8 @@ from gramps.gen.proxy import LivingProxyDb
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
|
||||
RECORDS = [
|
||||
|
@ -38,39 +38,39 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.sgettext
|
||||
ngettext = glocale.translation.ngettext # else "nearby" comments are ignored
|
||||
|
||||
fname_map = {'all': _('Filtering_on|all'),
|
||||
'Inverse Person': _('Filtering_on|Inverse Person'),
|
||||
'Inverse Family': _('Filtering_on|Inverse Family'),
|
||||
'Inverse Event': _('Filtering_on|Inverse Event'),
|
||||
'Inverse Place': _('Filtering_on|Inverse Place'),
|
||||
'Inverse Source': _('Filtering_on|Inverse Source'),
|
||||
'Inverse Repository': _('Filtering_on|Inverse Repository'),
|
||||
'Inverse Media': _('Filtering_on|Inverse Media'),
|
||||
'Inverse Note': _('Filtering_on|Inverse Note'),
|
||||
'all people': _('Filtering_on|all people'),
|
||||
'all families': _('Filtering_on|all families'),
|
||||
'all events': _('Filtering_on|all events'),
|
||||
'all places': _('Filtering_on|all places'),
|
||||
'all sources': _('Filtering_on|all sources'),
|
||||
'all repositories': _('Filtering_on|all repositories'),
|
||||
'all media': _('Filtering_on|all media'),
|
||||
'all notes': _('Filtering_on|all notes'),
|
||||
'males': _('Filtering_on|males'),
|
||||
'females': _('Filtering_on|females'),
|
||||
fname_map = {'all': _('all', 'Filtering_on'),
|
||||
'Inverse Person': _('Inverse Person', 'Filtering_on'),
|
||||
'Inverse Family': _('Inverse Family', 'Filtering_on'),
|
||||
'Inverse Event': _('Inverse Event', 'Filtering_on'),
|
||||
'Inverse Place': _('Inverse Place', 'Filtering_on'),
|
||||
'Inverse Source': _('Inverse Source', 'Filtering_on'),
|
||||
'Inverse Repository': _('Inverse Repository', 'Filtering_on'),
|
||||
'Inverse Media': _('Inverse Media', 'Filtering_on'),
|
||||
'Inverse Note': _('Inverse Note', 'Filtering_on'),
|
||||
'all people': _('all people', 'Filtering_on'),
|
||||
'all families': _('all families', 'Filtering_on'),
|
||||
'all events': _('all events', 'Filtering_on'),
|
||||
'all places': _('all places', 'Filtering_on'),
|
||||
'all sources': _('all sources', 'Filtering_on'),
|
||||
'all repositories': _('all repositories', 'Filtering_on'),
|
||||
'all media': _('all media', 'Filtering_on'),
|
||||
'all notes': _('all notes', 'Filtering_on'),
|
||||
'males': _('males', 'Filtering_on'),
|
||||
'females': _('females', 'Filtering_on'),
|
||||
'people with unknown gender':
|
||||
_('Filtering_on|people with unknown gender'),
|
||||
_('people with unknown gender', 'Filtering_on'),
|
||||
'incomplete names':
|
||||
_('Filtering_on|incomplete names'),
|
||||
_('incomplete names', 'Filtering_on'),
|
||||
'people with missing birth dates':
|
||||
_('Filtering_on|people with missing birth dates'),
|
||||
'disconnected people': _('Filtering_on|disconnected people'),
|
||||
'unique surnames': _('Filtering_on|unique surnames'),
|
||||
'people with media': _('Filtering_on|people with media'),
|
||||
'media references': _('Filtering_on|media references'),
|
||||
'unique media': _('Filtering_on|unique media'),
|
||||
'missing media': _('Filtering_on|missing media'),
|
||||
'media by size': _('Filtering_on|media by size'),
|
||||
'list of people': _('Filtering_on|list of people')}
|
||||
_('people with missing birth dates', 'Filtering_on'),
|
||||
'disconnected people': _('disconnected people', 'Filtering_on'),
|
||||
'unique surnames': _('unique surnames', 'Filtering_on'),
|
||||
'people with media': _('people with media', 'Filtering_on'),
|
||||
'media references': _('media references', 'Filtering_on'),
|
||||
'unique media': _('unique media', 'Filtering_on'),
|
||||
'missing media': _('missing media', 'Filtering_on'),
|
||||
'media by size': _('media by size', 'Filtering_on'),
|
||||
'list of people': _('list of people', 'Filtering_on')}
|
||||
|
||||
def run(database, document, filter_name, *args, **kwargs):
|
||||
"""
|
||||
|
@ -59,8 +59,8 @@ import gramps.plugins.lib.libholiday as libholiday
|
||||
from gramps.gen.datehandler import displayer as date_displayer
|
||||
|
||||
# _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh
|
||||
def _T_(value): # enable deferred translations (see Python docs 22.1.3.4)
|
||||
return value
|
||||
def _T_(value, context=''): # enable deferred translations
|
||||
return "%s\x04%s" % (context, value) if context else value
|
||||
|
||||
_TITLE0 = _T_("Birthday and Anniversary Report")
|
||||
_TITLE1 = _T_("My Birthday Report")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user