From a2f2659ab1d821cd8dae855867dbeb067d4b16bb Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Fri, 9 Oct 2015 13:38:34 -0700 Subject: [PATCH] 8888: Gramps Help button User Manual wiki-links --- gramps/gen/const.py | 4 ++++ gramps/gui/editors/addmedia.py | 12 ++++++------ gramps/gui/editors/editaddress.py | 10 +++++----- gramps/gui/editors/editattribute.py | 10 +++++----- gramps/gui/editors/editchildref.py | 10 +++++----- gramps/gui/editors/editcitation.py | 10 +++++----- gramps/gui/editors/editdate.py | 4 ++-- gramps/gui/editors/editevent.py | 8 ++++---- gramps/gui/editors/editeventref.py | 8 ++++---- gramps/gui/editors/editfamily.py | 10 +++++----- gramps/gui/editors/editldsord.py | 10 +++++----- gramps/gui/editors/editlink.py | 8 ++++---- gramps/gui/editors/editmedia.py | 8 ++++---- gramps/gui/editors/editmediaref.py | 6 +++--- gramps/gui/editors/editname.py | 10 +++++----- gramps/gui/editors/editnote.py | 10 +++++----- gramps/gui/editors/editperson.py | 10 +++++----- gramps/gui/editors/editpersonref.py | 10 +++++----- gramps/gui/editors/editplace.py | 10 +++++----- gramps/gui/editors/editplacename.py | 8 ++++---- gramps/gui/editors/editrepository.py | 10 +++++----- gramps/gui/editors/editsource.py | 10 +++++----- gramps/gui/editors/editurl.py | 10 +++++----- gramps/gui/merge/mergecitation.py | 5 ++--- gramps/gui/merge/mergeevent.py | 5 ++--- gramps/gui/merge/mergefamily.py | 5 ++--- gramps/gui/merge/mergemedia.py | 5 ++--- gramps/gui/merge/mergenote.py | 5 ++--- gramps/gui/merge/mergeperson.py | 5 ++--- gramps/gui/merge/mergeplace.py | 5 ++--- gramps/gui/merge/mergerepository.py | 5 ++--- gramps/gui/merge/mergesource.py | 5 ++--- gramps/gui/selectors/selectcitation.py | 10 +++++----- gramps/gui/selectors/selectevent.py | 10 +++++----- gramps/gui/selectors/selectfamily.py | 8 ++++---- gramps/gui/selectors/selectnote.py | 10 +++++----- gramps/gui/selectors/selectobject.py | 10 +++++----- gramps/gui/selectors/selectperson.py | 22 ++++++++++------------ gramps/gui/selectors/selectplace.py | 10 +++++----- gramps/gui/selectors/selectrepository.py | 10 +++++----- gramps/gui/selectors/selectsource.py | 8 ++++---- 41 files changed, 171 insertions(+), 178 deletions(-) diff --git a/gramps/gen/const.py b/gramps/gen/const.py index 8595fd035..a065f42d0 100644 --- a/gramps/gen/const.py +++ b/gramps/gen/const.py @@ -59,6 +59,10 @@ URL_BUGHOME = "http://bugs.gramps-project.org" URL_BUGTRACKER = "http://bugs.gramps-project.org/bug_report_page.php" URL_WIKISTRING = "http://gramps-project.org/wiki/index.php?title=" URL_MANUAL_PAGE = "Gramps_%s_Wiki_Manual" % major_version +URL_MANUAL_DATA = '%s_-_Entering_and_editing_data:_detailed' % URL_MANUAL_PAGE +URL_MANUAL_SECT1 = '%s_-_part_1' % URL_MANUAL_DATA +URL_MANUAL_SECT2 = '%s_-_part_2' % URL_MANUAL_DATA +URL_MANUAL_SECT3 = '%s_-_part_3' % URL_MANUAL_DATA WIKI_FAQ = "FAQ" WIKI_KEYBINDINGS = "Gramps_%s_Wiki_Manual_-_Keybindings" % major_version WIKI_EXTRAPLUGINS= "%s_Addons" % major_version diff --git a/gramps/gui/editors/addmedia.py b/gramps/gui/editors/addmedia.py index c53ba3722..1dc2aa9b9 100644 --- a/gramps/gui/editors/addmedia.py +++ b/gramps/gui/editors/addmedia.py @@ -34,9 +34,6 @@ import os # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext -from gramps.gen.constfunc import conv_to_unicode #------------------------------------------------------------------------- # @@ -50,6 +47,9 @@ from gi.repository import GdkPixbuf # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext +from gramps.gen.constfunc import conv_to_unicode from gramps.gen.const import ICON, THUMBSCALE, USER_HOME from gramps.gen.config import config from gramps.gen.utils.file import (media_path_full, media_path, relative_path, @@ -60,15 +60,15 @@ from ..display import display_help from ..managedwindow import ManagedWindow from ..dialog import ErrorDialog, WarningDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_editing_data:_detailed_-_part_2' % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_a_media_object_selector') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Select_a_media_object_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editaddress.py b/gramps/gui/editors/editaddress.py index 3627a2ebc..e02fad3bf 100644 --- a/gramps/gui/editors/editaddress.py +++ b/gramps/gui/editors/editaddress.py @@ -31,8 +31,6 @@ mechanism for the user to edit address information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # @@ -46,12 +44,14 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from .editsecondary import EditSecondary from gramps.gen.lib import NoteType from ..glade import Glade from .displaytabs import CitationEmbedList, NoteTab from ..widgets import MonitoredDate, MonitoredEntry, PrivacyButton -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 #------------------------------------------------------------------------- # @@ -59,8 +59,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_3') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Address_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT3 +WIKI_HELP_SEC = _('manual|Address_Editor_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editattribute.py b/gramps/gui/editors/editattribute.py index e5789da49..d311ecf17 100644 --- a/gramps/gui/editors/editattribute.py +++ b/gramps/gui/editors/editattribute.py @@ -30,8 +30,6 @@ mechanism for the user to edit attribute information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # @@ -45,12 +43,14 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from .editsecondary import EditSecondary from gramps.gen.lib import NoteType from ..glade import Glade from .displaytabs import CitationEmbedList, NoteTab from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 #------------------------------------------------------------------------- # @@ -58,8 +58,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_3') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Attribute_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT3 +WIKI_HELP_SEC = _('manual|Attribute_Editor_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editchildref.py b/gramps/gui/editors/editchildref.py index 03a264b84..da9668a59 100644 --- a/gramps/gui/editors/editchildref.py +++ b/gramps/gui/editors/editchildref.py @@ -30,8 +30,6 @@ mechanism for the user to edit address information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext import pickle #------------------------------------------------------------------------- @@ -47,6 +45,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from .editsecondary import EditSecondary from gramps.gen.lib import NoteType from gramps.gen.errors import WindowActiveError @@ -56,7 +56,7 @@ from gi.repository import Gdk from .displaytabs import CitationEmbedList, NoteTab from ..widgets import MonitoredDataType, PrivacyButton from gramps.gen.display.name import displayer as name_displayer -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # @@ -64,8 +64,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Child_Reference_Editor') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Child_Reference_Editor') _RETURN = Gdk.keyval_from_name("Return") _KP_ENTER = Gdk.keyval_from_name("KP_Enter") diff --git a/gramps/gui/editors/editcitation.py b/gramps/gui/editors/editcitation.py index 603fe0e0f..52c7c190a 100644 --- a/gramps/gui/editors/editcitation.py +++ b/gramps/gui/editors/editcitation.py @@ -30,8 +30,6 @@ EditCitation class for Gramps. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext import logging LOG = logging.getLogger(".citation") @@ -47,6 +45,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.lib import Citation, NoteType, Source from gramps.gen.db import DbTxn from .editprimary import EditPrimary @@ -57,7 +57,7 @@ from ..widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu, MonitoredDate, MonitoredTagList) from ..dialog import ErrorDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -65,8 +65,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('New_Citation_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|New_Citation_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editdate.py b/gramps/gui/editors/editdate.py index fc8382d23..3f0d523d1 100644 --- a/gramps/gui/editors/editdate.py +++ b/gramps/gui/editors/editdate.py @@ -62,7 +62,7 @@ from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext from gramps.gen.lib.date import Date, DateError, calendar_has_fixed_newyear from gramps.gen.datehandler import displayer -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 from ..display import display_help from ..managedwindow import ManagedWindow from ..glade import Glade @@ -95,7 +95,7 @@ CAL_TO_MONTHS_NAMES = { Date.CAL_ISLAMIC : displayer.islamic, Date.CAL_SWEDISH : displayer.swedish } -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT1 WIKI_HELP_SEC = _('manual|Editing_dates') #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/editevent.py b/gramps/gui/editors/editevent.py index f09718f3c..0729428c8 100644 --- a/gramps/gui/editors/editevent.py +++ b/gramps/gui/editors/editevent.py @@ -25,8 +25,6 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.sgettext #------------------------------------------------------------------------- # @@ -40,7 +38,9 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext +from gramps.gen.const import URL_MANUAL_SECT2 from gramps.gen.lib import Event, NoteType from gramps.gen.db import DbTxn from ..display import display_help @@ -60,7 +60,7 @@ from gramps.gen.utils.db import get_participant_from_event # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_editing_data:_detailed_-_part_2' % URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT2 WIKI_HELP_SEC = _('manual|New_Event_dialog') #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/editeventref.py b/gramps/gui/editors/editeventref.py index e20bf1ed4..b06bb31dd 100644 --- a/gramps/gui/editors/editeventref.py +++ b/gramps/gui/editors/editeventref.py @@ -33,7 +33,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext +_ = glocale.translation.sgettext from gramps.gen.lib import EventType, NoteType from gramps.gen.db import DbTxn from ..glade import Glade @@ -45,7 +45,7 @@ from .editreference import RefTab, EditReference from .objectentries import PlaceEntry -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -53,8 +53,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Event_Reference_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Event_Reference_Editor_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index 875d1dd05..7828dd170 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -41,8 +41,6 @@ log = logging.getLogger(".") # GTK/Gnome modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext from ..ddtargets import DdTargets from gi.repository import Gtk from gi.repository import Gdk @@ -55,6 +53,8 @@ from gi.repository import GLib # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.config import config from gramps.gen.display.name import displayer as name_displayer from gramps.gen.lib import ChildRef, Family, Name, NoteType, Person, Surname @@ -79,7 +79,7 @@ from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback, get_marriage_or_fallback, preset_name, family_name) from ..selectors import SelectorFactory from gramps.gen.utils.id import create_id -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # @@ -87,8 +87,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Family_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Family_Editor_dialog') SelectPerson = SelectorFactory('Person') diff --git a/gramps/gui/editors/editldsord.py b/gramps/gui/editors/editldsord.py index 45bcd995a..f7c043a65 100644 --- a/gramps/gui/editors/editldsord.py +++ b/gramps/gui/editors/editldsord.py @@ -30,8 +30,6 @@ mechanism for the user to edit personal LDS information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # @@ -45,6 +43,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.lib import LdsOrd, NoteType from gramps.gen.display.name import displayer as name_displayer from gramps.gen.utils.lds import TEMPLES @@ -55,7 +55,7 @@ from .displaytabs import CitationEmbedList,NoteTab from ..widgets import (PrivacyButton, MonitoredDate, MonitoredMenu, MonitoredStrMenu) from ..selectors import SelectorFactory -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # @@ -63,8 +63,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('LDS_Ordinance_Editor') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|LDS_Ordinance_Editor') _DATA_MAP = { LdsOrd.BAPTISM : [ diff --git a/gramps/gui/editors/editlink.py b/gramps/gui/editors/editlink.py index 81a726852..f35e71f04 100644 --- a/gramps/gui/editors/editlink.py +++ b/gramps/gui/editors/editlink.py @@ -32,12 +32,12 @@ import re # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext +_ = glocale.translation.sgettext from ..managedwindow import ManagedWindow from ..display import display_help from ..glade import Glade from gramps.gen.simple import SimpleAccess -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -45,8 +45,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Link_Editor') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Link_Editor') WEB, EVENT, FAMILY, MEDIA, NOTE, PERSON, PLACE, REPOSITORY, SOURCE = list(range(9)) OBJECT_MAP = { diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index 3c7346d59..d856aab71 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -41,7 +41,7 @@ from gi.repository import Gdk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext +_ = glocale.translation.sgettext from gramps.gen.constfunc import conv_to_unicode from ..utils import open_file_with_default_application from gramps.gen.lib import MediaObject, NoteType @@ -57,7 +57,7 @@ from .displaytabs import (CitationEmbedList, MediaAttrEmbedList, NoteTab, from .addmedia import AddMediaObject from ..dialog import ErrorDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -65,8 +65,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('New_Media_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|New_Media_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editmediaref.py b/gramps/gui/editors/editmediaref.py index e75d31a7e..2eaf9311d 100644 --- a/gramps/gui/editors/editmediaref.py +++ b/gramps/gui/editors/editmediaref.py @@ -60,7 +60,7 @@ from ..widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton, MonitoredDate, MonitoredTagList, SelectionWidget, Region) from .editreference import RefTab, EditReference from .addmedia import AddMediaObject -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -68,8 +68,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Media_Reference_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Media_Reference_Editor_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editname.py b/gramps/gui/editors/editname.py index 3080a2b88..a8c02330e 100644 --- a/gramps/gui/editors/editname.py +++ b/gramps/gui/editors/editname.py @@ -28,8 +28,6 @@ # #------------------------------------------------------------------------- from gi.repository import GObject -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext from copy import copy #------------------------------------------------------------------------- @@ -44,7 +42,9 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext +from gramps.gen.const import URL_MANUAL_SECT3 from gramps.gen.config import config from gramps.gen.display.name import displayer as name_displayer from .editsecondary import EditSecondary @@ -61,7 +61,7 @@ from gramps.gen.errors import ValidationError # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_3') % URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 class GeneralNameTab(GrampsTab): @@ -160,7 +160,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, - _('Name_Editor')) + _('manual|Name_Editor')) self.define_ok_button(self.top.get_object('button118'), self.save) def _validate_call(self, widget, text): diff --git a/gramps/gui/editors/editnote.py b/gramps/gui/editors/editnote.py index a05dd587f..57ae8c0ad 100644 --- a/gramps/gui/editors/editnote.py +++ b/gramps/gui/editors/editnote.py @@ -27,8 +27,6 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".gui.editors.EditNote") @@ -46,6 +44,8 @@ from gi.repository import Pango # Gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.config import config from .editprimary import EditPrimary from .displaytabs import GrampsTab, NoteBackRefList @@ -55,7 +55,7 @@ from gramps.gen.lib import Note from gramps.gen.db import DbTxn from ..dialog import ErrorDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -63,8 +63,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Editing_information_about_notes') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Editing_information_about_notes') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editperson.py b/gramps/gui/editors/editperson.py index a807ca353..15ab16da3 100644 --- a/gramps/gui/editors/editperson.py +++ b/gramps/gui/editors/editperson.py @@ -32,8 +32,6 @@ to edit information about a particular Person. # #------------------------------------------------------------------------- from copy import copy -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.sgettext import pickle #------------------------------------------------------------------------- @@ -50,6 +48,8 @@ from gi.repository import Pango # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.utils.file import media_path_full from gramps.gen.utils.thumbnails import get_thumbnail_image from ..utils import is_right_click, open_file_with_default_application @@ -75,7 +75,7 @@ from .displaytabs import (PersonEventEmbedList, NameEmbedList, CitationEmbedList WebEmbedList, PersonRefEmbedList, LdsEmbedList, PersonBackRefList, SurnameTab) from gramps.gen.plug import CATEGORY_QR_PERSON -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 from gramps.gen.utils.id import create_id #------------------------------------------------------------------------- @@ -84,7 +84,7 @@ from gramps.gen.utils.id import create_id # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT1 _select_gender = ((True, False, False), (False, True, False), @@ -243,7 +243,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, - _('manpage section id|Editing_information_about_people')) + _('manual|Editing_information_about_people')) self.given.connect("focus_out_event", self._given_focus_out_event) self.top.get_object("editnamebtn").connect("clicked", diff --git a/gramps/gui/editors/editpersonref.py b/gramps/gui/editors/editpersonref.py index 8e85fc973..11acf9dfe 100644 --- a/gramps/gui/editors/editpersonref.py +++ b/gramps/gui/editors/editpersonref.py @@ -30,8 +30,6 @@ mechanism for the user to edit address information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext import pickle @@ -47,6 +45,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.display.name import displayer as name_displayer from .editsecondary import EditSecondary from gramps.gen.lib import NoteType @@ -56,7 +56,7 @@ from .displaytabs import CitationEmbedList, NoteTab from ..glade import Glade from ..ddtargets import DdTargets from gi.repository import Gdk -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # @@ -64,8 +64,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Person_Reference_Editor') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Person_Reference_Editor') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index 9676db27d..9e7e7786c 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -26,8 +26,6 @@ # python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.sgettext import logging log = logging.getLogger(".") @@ -43,6 +41,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.lib import NoteType, Place from gramps.gen.db import DbTxn from .editprimary import EditPrimary @@ -57,7 +57,7 @@ from gramps.gen.display.place import displayer as place_displayer from gramps.gen.config import config from ..dialog import ErrorDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -65,8 +65,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_editing_data:_detailed_-_part_2' % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Place_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Place_Editor_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editplacename.py b/gramps/gui/editors/editplacename.py index fc70367f3..b04683d51 100644 --- a/gramps/gui/editors/editplacename.py +++ b/gramps/gui/editors/editplacename.py @@ -37,16 +37,16 @@ from ..widgets import MonitoredDate, MonitoredEntry from ..dialog import ErrorDialog from gramps.gen.errors import ValidationError from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext -from gramps.gen.const import URL_MANUAL_PAGE +_ = glocale.translation.sgettext +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Place_Name_Editor_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Place_Name_Editor_dialog') ISO_CODES = ( 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', diff --git a/gramps/gui/editors/editrepository.py b/gramps/gui/editors/editrepository.py index 3e5a4bcf2..49f49d9ba 100644 --- a/gramps/gui/editors/editrepository.py +++ b/gramps/gui/editors/editrepository.py @@ -24,8 +24,6 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # @@ -39,6 +37,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.lib import NoteType, Repository from gramps.gen.db import DbTxn @@ -48,7 +48,7 @@ from .displaytabs import AddrEmbedList, WebEmbedList, NoteTab, SourceBackRefList from .editprimary import EditPrimary from ..dialog import ErrorDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -56,8 +56,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_editing_data:_detailed_-_part_2' % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('New_Repositories_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|New_Repositories_dialog') class EditRepository(EditPrimary): diff --git a/gramps/gui/editors/editsource.py b/gramps/gui/editors/editsource.py index d4b6f519a..a238cf3ec 100644 --- a/gramps/gui/editors/editsource.py +++ b/gramps/gui/editors/editsource.py @@ -25,8 +25,6 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext import logging log = logging.getLogger(".") LOG = logging.getLogger(".citation") @@ -43,6 +41,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.lib import NoteType, Source from gramps.gen.db import DbTxn from .editprimary import EditPrimary @@ -52,7 +52,7 @@ from .displaytabs import (NoteTab, GalleryTab, SrcAttrEmbedList, from ..widgets import MonitoredEntry, PrivacyButton, MonitoredTagList from ..dialog import ErrorDialog from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # @@ -60,8 +60,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_editing_data:_detailed_-_part_2' % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('New_Source_dialog') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|New_Source_dialog') #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editurl.py b/gramps/gui/editors/editurl.py index 4af546b5e..924a886ab 100644 --- a/gramps/gui/editors/editurl.py +++ b/gramps/gui/editors/editurl.py @@ -24,18 +24,18 @@ # python modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from .editsecondary import EditSecondary from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType from ..glade import Glade -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # @@ -43,8 +43,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Internet_Address_Editor') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Internet_Address_Editor') #------------------------------------------------------------------------- # diff --git a/gramps/gui/merge/mergecitation.py b/gramps/gui/merge/mergecitation.py index b3e248985..a62c1a45f 100644 --- a/gramps/gui/merge/mergecitation.py +++ b/gramps/gui/merge/mergecitation.py @@ -30,7 +30,7 @@ Provide merge capabilities for citations. #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from gramps.gen.datehandler import get_date @@ -42,8 +42,7 @@ from gramps.gen.merge import MergeCitationQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Citations') _GLADE_FILE = 'mergecitation.glade' diff --git a/gramps/gui/merge/mergeevent.py b/gramps/gui/merge/mergeevent.py index 3c0b72670..339347e01 100644 --- a/gramps/gui/merge/mergeevent.py +++ b/gramps/gui/merge/mergeevent.py @@ -29,7 +29,7 @@ Provide merge capabilities for events. #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from gramps.gen.datehandler import get_date @@ -41,8 +41,7 @@ from gramps.gen.merge import MergeEventQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Events') _GLADE_FILE = 'mergeevent.glade' diff --git a/gramps/gui/merge/mergefamily.py b/gramps/gui/merge/mergefamily.py index d8958412a..058cd8a28 100644 --- a/gramps/gui/merge/mergefamily.py +++ b/gramps/gui/merge/mergefamily.py @@ -30,7 +30,7 @@ Provide merge capabilities for families. from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext from gramps.gen.display.name import displayer as name_displayer -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from gramps.gen.errors import MergeError from ..dialog import ErrorDialog @@ -42,8 +42,7 @@ from gramps.gen.merge import MergePersonQuery, MergeFamilyQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Families') _GLADE_FILE = 'mergefamily.glade' diff --git a/gramps/gui/merge/mergemedia.py b/gramps/gui/merge/mergemedia.py index 601cb3146..d35dc1009 100644 --- a/gramps/gui/merge/mergemedia.py +++ b/gramps/gui/merge/mergemedia.py @@ -29,7 +29,7 @@ Provide merge capabilities for media objects. #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from gramps.gen.datehandler import get_date @@ -40,8 +40,7 @@ from gramps.gen.merge import MergeMediaQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Media_Objects') _GLADE_FILE = 'mergemedia.glade' diff --git a/gramps/gui/merge/mergenote.py b/gramps/gui/merge/mergenote.py index 6d9f9fd40..18966898e 100644 --- a/gramps/gui/merge/mergenote.py +++ b/gramps/gui/merge/mergenote.py @@ -29,7 +29,7 @@ Provide merge capabilities for notes. #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from ..widgets.styledtextbuffer import StyledTextBuffer @@ -40,8 +40,7 @@ from gramps.gen.merge import MergeNoteQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Notes') _GLADE_FILE = 'mergenote.glade' diff --git a/gramps/gui/merge/mergeperson.py b/gramps/gui/merge/mergeperson.py index 72fa30bf2..5c027d7bd 100644 --- a/gramps/gui/merge/mergeperson.py +++ b/gramps/gui/merge/mergeperson.py @@ -41,7 +41,7 @@ _ = glocale.translation.sgettext from gramps.gen.plug.report import utils as ReportUtils from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.place import displayer as place_displayer -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from gramps.gen.datehandler import get_date from gramps.gen.errors import MergeError @@ -54,8 +54,7 @@ from gramps.gen.merge import MergePersonQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = "%s_-_Entering_and_Editing_Data:_Detailed_-_part_3" % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _("manual|Merge_People") _GLADE_FILE = "mergeperson.glade" diff --git a/gramps/gui/merge/mergeplace.py b/gramps/gui/merge/mergeplace.py index 645184c1b..43e503d97 100644 --- a/gramps/gui/merge/mergeplace.py +++ b/gramps/gui/merge/mergeplace.py @@ -37,7 +37,7 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from gramps.gen.merge import MergePlaceQuery @@ -49,8 +49,7 @@ from gramps.gen.config import config # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Places') _GLADE_FILE = 'mergeplace.glade' PLACE_NAME = _('place|Name:') diff --git a/gramps/gui/merge/mergerepository.py b/gramps/gui/merge/mergerepository.py index 2dc2b74af..8b16d497a 100644 --- a/gramps/gui/merge/mergerepository.py +++ b/gramps/gui/merge/mergerepository.py @@ -30,7 +30,7 @@ Provide merge capabilities for repositories. #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from gramps.gen.merge import MergeRepositoryQuery @@ -40,8 +40,7 @@ from gramps.gen.merge import MergeRepositoryQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Repositories') _GLADE_FILE = 'mergerepository.glade' REPO_NAME = _('repo|Name:') diff --git a/gramps/gui/merge/mergesource.py b/gramps/gui/merge/mergesource.py index 3c80e1b45..bbdb59ecf 100644 --- a/gramps/gui/merge/mergesource.py +++ b/gramps/gui/merge/mergesource.py @@ -31,7 +31,7 @@ Provide merge capabilities for sources. #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.sgettext -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT3 from ..display import display_help from ..managedwindow import ManagedWindow from gramps.gen.merge import MergeSourceQuery @@ -41,8 +41,7 @@ from gramps.gen.merge import MergeSourceQuery # Gramps constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_3' % \ - URL_MANUAL_PAGE +WIKI_HELP_PAGE = URL_MANUAL_SECT3 WIKI_HELP_SEC = _('manual|Merge_Sources') _GLADE_FILE = 'mergesource.glade' diff --git a/gramps/gui/selectors/selectcitation.py b/gramps/gui/selectors/selectcitation.py index f822da42c..b696a3ad3 100644 --- a/gramps/gui/selectors/selectcitation.py +++ b/gramps/gui/selectors/selectcitation.py @@ -29,26 +29,26 @@ SelectCitation class for GRAMPS. # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import CitationTreeModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Source_or_Citation_selector') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Select_Source_or_Citation_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectevent.py b/gramps/gui/selectors/selectevent.py index e35556412..49323a735 100644 --- a/gramps/gui/selectors/selectevent.py +++ b/gramps/gui/selectors/selectevent.py @@ -24,26 +24,26 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import EventModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Event_selector') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Select_Event_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectfamily.py b/gramps/gui/selectors/selectfamily.py index 5ad6cd8eb..1c355fd16 100644 --- a/gramps/gui/selectors/selectfamily.py +++ b/gramps/gui/selectors/selectfamily.py @@ -24,14 +24,14 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import FamilyModel from .baseselector import BaseSelector from gramps.gui.display import display_help @@ -42,8 +42,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Categories') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Family_selector') +WIKI_HELP_PAGE = '%s_-_Categories' % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('manual|Select_Family_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectnote.py b/gramps/gui/selectors/selectnote.py index 421550999..7b0eb6db9 100644 --- a/gramps/gui/selectors/selectnote.py +++ b/gramps/gui/selectors/selectnote.py @@ -27,26 +27,26 @@ # Python Modules # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # Gramps Modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import NoteModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Note_selector') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Select_Note_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectobject.py b/gramps/gui/selectors/selectobject.py index e32f51152..4fa2f159e 100644 --- a/gramps/gui/selectors/selectobject.py +++ b/gramps/gui/selectors/selectobject.py @@ -28,8 +28,6 @@ # #------------------------------------------------------------------------- import gc -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # @@ -43,21 +41,23 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from gramps.gen.const import THUMBSCALE from gramps.gen.utils.file import media_path_full from gramps.gen.utils.thumbnails import get_thumbnail_image from ..views.treemodels import MediaModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Media_Object_selector') +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Select_Media_Object_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectperson.py b/gramps/gui/selectors/selectperson.py index 3797d2eca..b8374489f 100644 --- a/gramps/gui/selectors/selectperson.py +++ b/gramps/gui/selectors/selectperson.py @@ -24,8 +24,6 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext from gi.repository import Gdk from gi.repository import Gtk @@ -34,10 +32,12 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import PeopleBaseModel, PersonTreeModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT1 #------------------------------------------------------------------------- # @@ -46,18 +46,16 @@ from gramps.gen.const import URL_MANUAL_PAGE #------------------------------------------------------------------------- # This dialog changes depending on the string pass for the title. - # https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Select_Child_selector -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Child_selector') - # https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Select_Father_selector -WIKI_HELP_PAGE2 = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC2 = _('Select_Father_selector') - # https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_1#Select_Mother_selector -WIKI_HELP_PAGE3 = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE -WIKI_HELP_SEC3 = _('Select_Mother_selector') + +WIKI_HELP_PAGE = URL_MANUAL_SECT1 +WIKI_HELP_SEC = _('manual|Select_Child_selector') +WIKI_HELP_PAGE2 = URL_MANUAL_SECT1 +WIKI_HELP_SEC2 = _('manual|Select_Father_selector') +WIKI_HELP_PAGE3 = URL_MANUAL_SECT1 +WIKI_HELP_SEC3 = _('manual|Select_Mother_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectplace.py b/gramps/gui/selectors/selectplace.py index 6a1604520..3a7c289a6 100644 --- a/gramps/gui/selectors/selectplace.py +++ b/gramps/gui/selectors/selectplace.py @@ -25,26 +25,26 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels.placemodel import PlaceTreeModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Select_Place_selector') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Select_Place_selector') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectrepository.py b/gramps/gui/selectors/selectrepository.py index 0db3b19f7..b877d4aa3 100644 --- a/gramps/gui/selectors/selectrepository.py +++ b/gramps/gui/selectors/selectrepository.py @@ -24,26 +24,26 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import RepositoryModel from .baseselector import BaseSelector from gramps.gui.display import display_help -from gramps.gen.const import URL_MANUAL_PAGE +from gramps.gen.const import URL_MANUAL_SECT2 #------------------------------------------------------------------------- # # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('Repositories') +WIKI_HELP_PAGE = URL_MANUAL_SECT2 +WIKI_HELP_SEC = _('manual|Repositories') #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectsource.py b/gramps/gui/selectors/selectsource.py index 949f1f7ca..33a58631c 100644 --- a/gramps/gui/selectors/selectsource.py +++ b/gramps/gui/selectors/selectsource.py @@ -24,14 +24,14 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext #------------------------------------------------------------------------- # # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.sgettext from ..views.treemodels import SourceModel from .baseselector import BaseSelector from gramps.gui.display import display_help @@ -42,8 +42,8 @@ from gramps.gen.const import URL_MANUAL_PAGE # Constants # #------------------------------------------------------------------------- -WIKI_HELP_PAGE = _('%s_-_xxx') % URL_MANUAL_PAGE -WIKI_HELP_SEC = _('xxxx') +WIKI_HELP_PAGE = '%s_-_xxx' % URL_MANUAL_PAGE # FIXME +WIKI_HELP_SEC = _('manual|xxxx') # FIXME #------------------------------------------------------------------------- #