add deferred translation to "living people" option
This commit is contained in:
parent
723d8ea1f6
commit
2ac7c5baa7
@ -36,6 +36,10 @@ from gramps.gen.plug.menu import (EnumeratedListOption, BooleanOption,
|
||||
NumberOption)
|
||||
from gramps.gen.proxy import PrivateProxyDb, LivingProxyDb
|
||||
|
||||
# _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
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# StandardReportOptions
|
||||
@ -162,16 +166,21 @@ def add_living_people_option(menu, category,
|
||||
|
||||
living_people = EnumeratedListOption(_("Living People"), mode)
|
||||
living_people.add_item(LivingProxyDb.MODE_INCLUDE_ALL,
|
||||
_("Include living people and their data"))
|
||||
_T_("Include living people and their data"),
|
||||
xml_item=True)
|
||||
if process_names:
|
||||
living_people.add_item(LivingProxyDb.MODE_INCLUDE_FULL_NAME_ONLY,
|
||||
_("Include full names but no data"))
|
||||
_T_("Include full names but no data"),
|
||||
xml_item=True)
|
||||
living_people.add_item(LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY,
|
||||
_("Replace given names and include no data"))
|
||||
_T_("Replace given names and include no data"),
|
||||
xml_item=True)
|
||||
living_people.add_item(LivingProxyDb.MODE_REPLACE_COMPLETE_NAME,
|
||||
_("Replace complete names and include no data"))
|
||||
_T_("Replace complete names and include no data"),
|
||||
xml_item=True)
|
||||
living_people.add_item(LivingProxyDb.MODE_EXCLUDE_ALL,
|
||||
_("Do not include living people"))
|
||||
_T_("Do not include living people"),
|
||||
xml_item=True)
|
||||
living_people.set_help(_("How to handle living people"))
|
||||
menu.add_option(category, "living_people", living_people)
|
||||
living_people.connect('value-changed', living_people_changed)
|
||||
|
@ -759,7 +759,7 @@ class StatisticsChart(Report):
|
||||
gender = get_value('gender')
|
||||
|
||||
living_value = get_value('living_people')
|
||||
for (value, description) in living_opt.get_items():
|
||||
for (value, description) in living_opt.get_items(xml_items=True):
|
||||
if value == living_value:
|
||||
self.living_desc = '(%s)' % self._(description)
|
||||
break
|
||||
|
@ -112,7 +112,7 @@ class TimeLine(Report):
|
||||
self.fil_name = self.filter.get_name(rlocale)
|
||||
|
||||
living_value = menu.get_option_by_name('living_people').get_value()
|
||||
for (value, description) in living_opt.get_items():
|
||||
for (value, description) in living_opt.get_items(xml_items=True):
|
||||
if value == living_value:
|
||||
self.living_desc = self._(description)
|
||||
break
|
||||
|
@ -90,7 +90,7 @@ class PlaceReport(Report):
|
||||
living_opt = stdoptions.run_living_people_option(self, menu, rlocale)
|
||||
|
||||
self._lv = menu.get_option_by_name('living_people').get_value()
|
||||
for (value, description) in living_opt.get_items():
|
||||
for (value, description) in living_opt.get_items(xml_items=True):
|
||||
if value == self._lv:
|
||||
self.living_desc = '(%s)' % self._(description)
|
||||
break
|
||||
|
@ -79,7 +79,7 @@ class RecordsReport(Report):
|
||||
self._locale)
|
||||
|
||||
self._lv = menu.get_option_by_name('living_people').get_value()
|
||||
for (value, description) in living_opt.get_items():
|
||||
for (value, description) in living_opt.get_items(xml_items=True):
|
||||
if value == self._lv:
|
||||
self.living_desc = self._(description)
|
||||
break
|
||||
|
@ -90,7 +90,7 @@ class TagReport(Report):
|
||||
living_opt = stdoptions.run_living_people_option(self, menu, rlocale)
|
||||
|
||||
self._lv = menu.get_option_by_name('living_people').get_value()
|
||||
for (value, description) in living_opt.get_items():
|
||||
for (value, description) in living_opt.get_items(xml_items=True):
|
||||
if value == self._lv:
|
||||
self.living_desc = '(%s)' % self._(description)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user