diff --git a/gramps/gen/plug/report/utils.py b/gramps/gen/plug/report/utils.py index 35e39c27b..d45c062cf 100644 --- a/gramps/gen/plug/report/utils.py +++ b/gramps/gen/plug/report/utils.py @@ -41,7 +41,7 @@ import os from ...const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext from ...datehandler import get_date -from ...display.place import displayer as place_displayer +from ...display.place import displayer as _pd from ...utils.file import media_path_full from ..docgen import IndexMark, INDEX_TYPE_ALP @@ -120,7 +120,7 @@ def roman(num): def place_name(db, place_handle): if place_handle: place = db.get_place_from_handle(place_handle) - name = place_displayer.display(db, place) + name = _pd.display(db, place) else: name = "" return str(name) diff --git a/gramps/plugins/drawreport/statisticschart.py b/gramps/plugins/drawreport/statisticschart.py index 817d33ec7..04a1a0de1 100644 --- a/gramps/plugins/drawreport/statisticschart.py +++ b/gramps/plugins/drawreport/statisticschart.py @@ -58,7 +58,7 @@ from gramps.gen.plug.report import utils from gramps.gen.plug.report import MenuReportOptions from gramps.gen.plug.report import stdoptions from gramps.gen.datehandler import parser -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb #------------------------------------------------------------------------ @@ -437,7 +437,7 @@ class Extract: "return place for given event" place_handle = event.get_place_handle() if place_handle: - place = place_displayer.display_event(self.db, event) + place = _pd.display_event(self.db, event) if place: return [place] return [_T_("Place missing")] @@ -450,7 +450,7 @@ class Extract: event = self.db.get_event_from_handle(event_handle) place_handle = event.get_place_handle() if place_handle: - place = place_displayer.display_event(self.db, event) + place = _pd.display_event(self.db, event) if place: places.append(place) else: diff --git a/gramps/plugins/export/exportgedcom.py b/gramps/plugins/export/exportgedcom.py index 5e5edb7cb..2e530ba54 100644 --- a/gramps/plugins/export/exportgedcom.py +++ b/gramps/plugins/export/exportgedcom.py @@ -54,7 +54,7 @@ from gramps.gen.updatecallback import UpdateCallback from gramps.gen.utils.file import media_path_full from gramps.gen.utils.place import conv_lat_lon from gramps.gen.utils.location import get_main_location -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd #------------------------------------------------------------------------- # @@ -1386,7 +1386,7 @@ class GedcomWriter(UpdateCallback): +1 <> {0:M} """ if place is None: return - place_name = place_displayer.display(self.dbase, place, dateobj) + place_name = _pd.display(self.dbase, place, dateobj) self._writeln(level, "PLAC", place_name.replace('\r', ' '), limit=120) longitude = place.get_longitude() latitude = place.get_latitude() diff --git a/gramps/plugins/graph/gvrelgraph.py b/gramps/plugins/graph/gvrelgraph.py index d6bac6a50..6ed4d3d32 100644 --- a/gramps/plugins/graph/gvrelgraph.py +++ b/gramps/plugins/graph/gvrelgraph.py @@ -59,7 +59,7 @@ from gramps.gen.utils.file import media_path_full, find_file from gramps.gen.utils.thumbnails import get_thumbnail_path from gramps.gen.relationship import get_relationship_calculator from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb #------------------------------------------------------------------------ @@ -633,7 +633,7 @@ class RelGraphReport(Report): empty string """ if event and self.event_choice in [2, 3, 5, 6, 7]: - return place_displayer.display_event(self._db, event) + return _pd.display_event(self._db, event) return '' #------------------------------------------------------------------------ diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index 34368d970..e4f436c2e 100755 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -133,7 +133,7 @@ from gramps.gui.dialog import WarningDialog from gramps.gen.lib.const import IDENTICAL, DIFFERENT from gramps.gen.lib import (StyledText, StyledTextTag, StyledTextTagType) from gramps.plugins.lib.libplaceimport import PlaceImport -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd #------------------------------------------------------------------------- # @@ -2964,7 +2964,7 @@ class GedcomParser(UpdateCallback): sub_state.place.get_placeref_list()) if place is None: place = sub_state.place - place_title = place_displayer.display(self.dbase, place) + place_title = _pd.display(self.dbase, place) location = sub_state.pf.load_place(self.place_import, place, place_title) self.dbase.add_place(place, self.trans) # if 'location was created, then store it, now that we have a handle. @@ -2974,7 +2974,7 @@ class GedcomParser(UpdateCallback): event.set_place_handle(place.get_handle()) else: place.merge(sub_state.place) - place_title = place_displayer.display(self.dbase, place) + place_title = _pd.display(self.dbase, place) location = sub_state.pf.load_place(self.place_import, place, place_title) self.dbase.commit_place(place, self.trans) if location: @@ -4502,7 +4502,7 @@ class GedcomParser(UpdateCallback): state.msg += sub_state.msg if sub_state.place: - place_title = place_displayer.display(self.dbase, sub_state.place) + place_title = _pd.display(self.dbase, sub_state.place) sub_state.place_fields.load_place(self.place_import, sub_state.place, place_title) @@ -5077,7 +5077,7 @@ class GedcomParser(UpdateCallback): state.msg += sub_state.msg if sub_state.place: - place_title = place_displayer.display(self.dbase, sub_state.place) + place_title = _pd.display(self.dbase, sub_state.place) sub_state.place_fields.load_place(self.place_import, sub_state.place, place_title) @@ -5570,7 +5570,7 @@ class GedcomParser(UpdateCallback): else: place.merge(state.place) self.dbase.commit_place(place, self.trans) - place_title = place_displayer.display(self.dbase, place) + place_title = _pd.display(self.dbase, place) state.pf.load_place(self.place_import, place, place_title) # Create the Place Details (it is committed with the event) diff --git a/gramps/plugins/lib/libsubstkeyword.py b/gramps/plugins/lib/libsubstkeyword.py index c4c70a73e..befbe330a 100644 --- a/gramps/plugins/lib/libsubstkeyword.py +++ b/gramps/plugins/lib/libsubstkeyword.py @@ -41,7 +41,7 @@ Mary Smith was born on 3/28/1923. from gramps.gen.lib import EventType, PlaceType, Location from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback from gramps.gen.utils.location import get_main_location -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.const import GRAMPS_LOCALE as glocale @@ -347,7 +347,7 @@ class PlaceFormat(GenericFormat): return None def _default_format(self, place): - return place_displayer.display(self.database, place) + return _pd.display(self.database, place) def parse_format(self, database, place): """ Parse the place """ diff --git a/gramps/plugins/textreport/detancestralreport.py b/gramps/plugins/textreport/detancestralreport.py index 02395283e..b5a29b7ae 100644 --- a/gramps/plugins/textreport/detancestralreport.py +++ b/gramps/plugins/textreport/detancestralreport.py @@ -58,7 +58,7 @@ from gramps.gen.plug.report import utils from gramps.gen.plug.report import MenuReportOptions from gramps.gen.plug.report import stdoptions from gramps.plugins.lib.libnarrate import Narrator -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb #------------------------------------------------------------------------ @@ -431,7 +431,7 @@ class DetAncestorReport(Report): else: date = event.get_date_object().get_year() - place = place_displayer.display_event(self._db, event) + place = _pd.display_event(self._db, event) self.doc.start_paragraph('DAR-MoreDetails') if date and place: diff --git a/gramps/plugins/textreport/detdescendantreport.py b/gramps/plugins/textreport/detdescendantreport.py index 1849b84a6..4bf5fb528 100644 --- a/gramps/plugins/textreport/detdescendantreport.py +++ b/gramps/plugins/textreport/detdescendantreport.py @@ -58,7 +58,7 @@ from gramps.gen.plug.report import utils from gramps.gen.plug.report import MenuReportOptions from gramps.gen.plug.report import stdoptions from gramps.plugins.lib.libnarrate import Narrator -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb #------------------------------------------------------------------------ @@ -440,7 +440,7 @@ class DetDescendantReport(Report): else: date = event.get_date_object().get_year() - place = place_displayer.display_event(self._db, event) + place = _pd.display_event(self._db, event) self.doc.start_paragraph('DDR-MoreDetails') event_name = self._get_type(event.get_type()) diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index e382b9a34..3399273b1 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -48,7 +48,7 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle, TableCellStyle, FONT_SANS_SERIF, FONT_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb #------------------------------------------------------------------------ @@ -120,7 +120,7 @@ class FamilyGroup(Report): descr = "" if event: date = self._get_date(event.get_date_object()) - place = place_displayer.display_event(self.db, event) + place = _pd.display_event(self.db, event) if place is None: place = '' descr = event.get_description() @@ -435,7 +435,7 @@ class FamilyGroup(Report): date = self._get_date(event.get_date_object()) place_handle = event.get_place_handle() if place_handle: - place = place_displayer.display_event(self.db, event) + place = _pd.display_event(self.db, event) if place is None: place = '' diff --git a/gramps/plugins/textreport/indivcomplete.py b/gramps/plugins/textreport/indivcomplete.py index 278c25013..af72a25d9 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -47,7 +47,7 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle, TableCellStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER, PARA_ALIGN_RIGHT) -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.plug.menu import (BooleanOption, FilterOption, PersonOption, BooleanListOption) from gramps.gen.plug.report import Report @@ -172,7 +172,7 @@ class IndivCompleteReport(Report): place_handle = event.get_place_handle() if place_handle: place = self._db.get_place_from_handle(place_handle) - place_name = place_displayer.display_event(self._db, event) + place_name = _pd.display_event(self._db, event) place_endnote = self._cite_endnote(place) # make sure it's translated, so it can be used below, in "combine" ignore = _('%(str1)s in %(str2)s. ') % {'str1':'', 'str2':''} @@ -471,7 +471,7 @@ class IndivCompleteReport(Report): place_handle = lds_ord.get_place_handle() if place_handle: place = self._db.get_place_from_handle(place_handle) - place_name = place_displayer.display_event(self._db, lds_ord) + place_name = _pd.display_event(self._db, lds_ord) place_endnote = self._cite_endnote(place) endnotes = self._cite_endnote(lds_ord, prior=place_endnote) self.doc.start_row() @@ -666,8 +666,7 @@ class IndivCompleteReport(Report): place_handle = lds_ord.get_place_handle() if place_handle: place = self._db.get_place_from_handle(place_handle) - place_name = place_displayer.display_event(self._db, - lds_ord) + place_name = _pd.display_event(self._db, lds_ord) place_endnote = self._cite_endnote(place) endnotes = self._cite_endnote(lds_ord, prior=place_endnote) self.doc.start_row() diff --git a/gramps/plugins/textreport/placereport.py b/gramps/plugins/textreport/placereport.py index 4e9a82cce..b2ef917fb 100644 --- a/gramps/plugins/textreport/placereport.py +++ b/gramps/plugins/textreport/placereport.py @@ -47,7 +47,7 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) from gramps.gen.sort import Sort from gramps.gen.utils.location import get_location_list -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.errors import ReportError from gramps.gen.proxy import LivingProxyDb, CacheProxyDb @@ -193,7 +193,7 @@ class PlaceReport(Report): place_names += ' (%s)' % place_name.get_language() place_details += [self._("places|All Names: %s") % place_names,] self.doc.start_paragraph("PLC-PlaceTitle") - place_title = place_displayer.display(self._db, place) + place_title = _pd.display(self._db, place) self.doc.write_text(("%(nbr)s. %(place)s") % {'nbr' : place_nbr, 'place' : place_title}) self.doc.end_paragraph() diff --git a/gramps/plugins/textreport/tagreport.py b/gramps/plugins/textreport/tagreport.py index 9167e3323..d5498be42 100644 --- a/gramps/plugins/textreport/tagreport.py +++ b/gramps/plugins/textreport/tagreport.py @@ -50,7 +50,7 @@ from gramps.gen.lib import NoteType, UrlType from gramps.gen.filters import GenericFilterFactory, rules from gramps.gen.errors import ReportError from gramps.gen.utils.db import get_participant_from_event -from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import LivingProxyDb, CacheProxyDb #------------------------------------------------------------------------ @@ -437,7 +437,7 @@ class TagReport(Report): for place_handle in place_list: place = self.database.get_place_from_handle(place_handle) - place_title = place_displayer.display(self.database, place) + place_title = _pd.display(self.database, place) self.doc.start_row()