diff --git a/gramps/gen/plug/report/_reportbase.py b/gramps/gen/plug/report/_reportbase.py index 0ce0fd045..b412a4e82 100644 --- a/gramps/gen/plug/report/_reportbase.py +++ b/gramps/gen/plug/report/_reportbase.py @@ -69,7 +69,7 @@ class Report(object): if language == GrampsLocale.DEFAULT_TRANSLATION_STR: language = None locale = GrampsLocale(lang=language) - self._ = locale.translation.gettext + self._ = locale.translation.sgettext self._get_date = locale.get_date self._get_type = locale.get_type self._ldd = locale.date_displayer diff --git a/gramps/plugins/drawreport/statisticschart.py b/gramps/plugins/drawreport/statisticschart.py index e35f7264e..b818180b8 100644 --- a/gramps/plugins/drawreport/statisticschart.py +++ b/gramps/plugins/drawreport/statisticschart.py @@ -751,7 +751,7 @@ class StatisticsChart(Report): filter_opt = get_option_by_name('filter') self.filter = filter_opt.get_filter() - self.fil_name = self.filter.get_name(rlocale) + self.fil_name = "(%s)" % self.filter.get_name(rlocale) self.bar_items = get_value('bar_items') year_from = get_value('year_from') @@ -761,8 +761,10 @@ class StatisticsChart(Report): living_value = get_value('living_people') for (value, description) in living_opt.get_items(xml_items=True): if value == living_value: - self.living_desc = '(%s)' % self._(description) + living_desc = self._(description) break + self.living_desc = self._("(Living people: %(option_name)s)" + % {'option_name': living_desc}) # title needs both data extraction method name + gender name if gender == Person.MALE: diff --git a/gramps/plugins/drawreport/timeline.py b/gramps/plugins/drawreport/timeline.py index f91a642ab..e31d22f97 100644 --- a/gramps/plugins/drawreport/timeline.py +++ b/gramps/plugins/drawreport/timeline.py @@ -103,19 +103,20 @@ class TimeLine(Report): lang = options.menu.get_option_by_name('trans').get_value() rlocale = self.set_locale(lang) - self._ = rlocale.translation.sgettext stdoptions.run_private_data_option(self, menu) living_opt = stdoptions.run_living_people_option(self, menu, rlocale) self.filter = menu.get_option_by_name('filter').get_filter() - self.fil_name = self.filter.get_name(rlocale) + self.fil_name = "(%s)" % self.filter.get_name(rlocale) living_value = menu.get_option_by_name('living_people').get_value() for (value, description) in living_opt.get_items(xml_items=True): if value == living_value: - self.living_desc = self._(description) + living_desc = self._(description) break + self.living_desc = self._("(Living people: %(option_name)s)" + % {'option_name': living_desc}) stdoptions.run_name_format_option(self, menu) @@ -261,11 +262,11 @@ class TimeLine(Report): Draws the title for the page. """ width = self.doc.get_usable_width() - title = self._("Timeline Chart") - title3 = "%(str1)s -- %(str2)s" % { - 'str1' : self.living_desc, + title = "%(str1)s -- %(str2)s" % { + 'str1' : self._("Timeline Chart"), # feature request 2356: avoid genitive form 'str2' : self._("Sorted by %s") % self.sort_name } + title3 = self.living_desc mark = None if toc: mark = IndexMark(title, INDEX_TYPE_TOC, 1) diff --git a/gramps/plugins/textreport/placereport.py b/gramps/plugins/textreport/placereport.py index f12973c74..7090179c9 100644 --- a/gramps/plugins/textreport/placereport.py +++ b/gramps/plugins/textreport/placereport.py @@ -84,7 +84,6 @@ class PlaceReport(Report): lang = menu.get_option_by_name('trans').get_value() rlocale = self.set_locale(lang) - self._ = rlocale.translation.sgettext stdoptions.run_private_data_option(self, menu) living_opt = stdoptions.run_living_people_option(self, menu, rlocale) @@ -92,8 +91,10 @@ class PlaceReport(Report): self._lv = menu.get_option_by_name('living_people').get_value() for (value, description) in living_opt.get_items(xml_items=True): if value == self._lv: - self.living_desc = '(%s)' % self._(description) + living_desc = self._(description) break + self.living_desc = self._("(Living people: %(option_name)s)" + % {'option_name': living_desc}) places = menu.get_option_by_name('places').get_value() self.center = menu.get_option_by_name('center').get_value() diff --git a/gramps/plugins/textreport/recordsreport.py b/gramps/plugins/textreport/recordsreport.py index c8449c2ad..1af81cd03 100644 --- a/gramps/plugins/textreport/recordsreport.py +++ b/gramps/plugins/textreport/recordsreport.py @@ -81,8 +81,10 @@ class RecordsReport(Report): self._lv = menu.get_option_by_name('living_people').get_value() for (value, description) in living_opt.get_items(xml_items=True): if value == self._lv: - self.living_desc = self._(description) + living_desc = self._(description) break + self.living_desc = self._("(Living people: %(option_name)s)" + % {'option_name': living_desc}) filter_option = menu.get_option_by_name('filter') self.filter = filter_option.get_filter() @@ -119,8 +121,7 @@ class RecordsReport(Report): self.doc.end_paragraph() if self._lv != LivingProxyDb.MODE_INCLUDE_ALL: self.doc.start_paragraph('REC-Subtitle') - self.doc.write_text(self._("(Living people: %(option_name)s)" - % {'option_name': self.living_desc})) + self.doc.write_text(self.living_desc) self.doc.end_paragraph() for (text, varname, top) in records: diff --git a/gramps/plugins/textreport/tagreport.py b/gramps/plugins/textreport/tagreport.py index 09edfe63a..8b7bb4939 100644 --- a/gramps/plugins/textreport/tagreport.py +++ b/gramps/plugins/textreport/tagreport.py @@ -92,8 +92,10 @@ class TagReport(Report): self._lv = menu.get_option_by_name('living_people').get_value() for (value, description) in living_opt.get_items(xml_items=True): if value == self._lv: - self.living_desc = '(%s)' % self._(description) + living_desc = self._(description) break + self.living_desc = self._("(Living people: %(option_name)s)" + % {'option_name': living_desc}) self.tag = menu.get_option_by_name('tag').get_value() if not self.tag: