updated Dutch translation

This commit is contained in:
erikdrgm 2016-12-14 14:45:09 +01:00
commit a27e49cf0e
11 changed files with 6942 additions and 6390 deletions

View File

@ -327,32 +327,28 @@ class ConfigManager:
filename = self.filename filename = self.filename
if filename: if filename:
try: try:
head = os.path.split( filename )[0] head = os.path.split(filename)[0]
os.makedirs( head ) os.makedirs(head)
except OSError as exp: except OSError as exp:
if exp.errno != errno.EEXIST: if exp.errno != errno.EEXIST:
raise raise
try: try:
with open(filename, "w", encoding="utf-8") as key_file: with open(filename, "w", encoding="utf-8") as key_file:
key_file.write(";; Gramps key file\n") key_file.write(";; Gramps key file\n")
key_file.write((";; Automatically created at %s" % key_file.write(";; Automatically created at %s" %
time.strftime("%Y/%m/%d %H:%M:%S")) + "\n\n") time.strftime("%Y/%m/%d %H:%M:%S") + "\n\n")
sections = sorted(self.data) for section in sorted(self.data):
for section in sections: key_file.write("[%s]\n" % section)
key_file.write(("[%s]\n") % section) for key in sorted(self.data[section]):
keys = sorted(self.data[section])
for key in keys:
value = self.data[section][key] value = self.data[section][key]
# If it has a default: default = "" # might be a third-party setting
if self.has_default("%s.%s" % (section, key)): if self.has_default("%s.%s" % (section, key)):
if value == self.get_default("%s.%s" % (section, key)): if value == self.get_default("%s.%s"
% (section, key)):
default = ";;" default = ";;"
else:
default = ""
if isinstance(value, int): if isinstance(value, int):
value = int(value) value = int(value) # TODO why is this needed?
key_file.write(("%s%s=%s\n")% (default, key_file.write("%s%s=%s\n" % (default, key,
key,
repr(value))) repr(value)))
key_file.write("\n") key_file.write("\n")
# else, no filename given; nothing to save so do nothing quietly # else, no filename given; nothing to save so do nothing quietly

View File

@ -545,8 +545,8 @@ class ManagedWindow:
Takes care of closing children and removing itself from menu. Takes care of closing children and removing itself from menu.
""" """
self._save_position(save_config=False) # the next line will save it
self._save_size() self._save_size()
self._save_position()
self.clean_up() self.clean_up()
self.uistate.gwm.close_track(self.track) self.uistate.gwm.close_track(self.track)
self.opened = False self.opened = False
@ -596,15 +596,18 @@ class ManagedWindow:
vert_position = config.get(self.vert_position_key) vert_position = config.get(self.vert_position_key)
self.window.move(horiz_position, vert_position) self.window.move(horiz_position, vert_position)
def _save_position(self): def _save_position(self, save_config=True):
""" """
Save the window's position to the config file Save the window's position to the config file
(You can set save_config False if a _save_size() will instantly follow)
""" """
# self.horiz_position_key is set in the subclass (or in setup_configs) # self.horiz_position_key is set in the subclass (or in setup_configs)
if self.horiz_position_key is not None: if self.horiz_position_key is not None:
(horiz_position, vert_position) = self.window.get_position() (horiz_position, vert_position) = self.window.get_position()
config.set(self.horiz_position_key, horiz_position) config.set(self.horiz_position_key, horiz_position)
config.set(self.vert_position_key, vert_position) config.set(self.vert_position_key, vert_position)
if save_config:
config.save() config.save()
def setup_configs(self, config_base, def setup_configs(self, config_base,

View File

@ -79,7 +79,7 @@ _ExportAssistant_pages = {
'summary' : 5, 'summary' : 5,
} }
class ExportAssistant(Gtk.Assistant, ManagedWindow) : class ExportAssistant(ManagedWindow, Gtk.Assistant):
""" """
This class creates a GTK assistant to guide the user through the various This class creates a GTK assistant to guide the user through the various
Save as/Export options. Save as/Export options.
@ -120,9 +120,8 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
ManagedWindow.__init__(self, uistate, [], self.__class__, modal=True) ManagedWindow.__init__(self, uistate, [], self.__class__, modal=True)
#set_window is present in both parent classes #set_window is present in both parent classes
ManagedWindow.set_window(self, self, None, self.set_window(self, None, self.top_title, isWindow=True)
self.top_title, isWindow=True) self.setup_configs('interface.exportassistant', 760, 500)
self.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
#set up callback method for the export plugins #set up callback method for the export plugins
self.callback = self.pulse_progressbar self.callback = self.pulse_progressbar
@ -155,7 +154,7 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
self.set_forward_page_func(self.forward_func, None) self.set_forward_page_func(self.forward_func, None)
#ManagedWindow show method #ManagedWindow show method
ManagedWindow.show(self) self.show()
def build_menu_names(self, obj): def build_menu_names(self, obj):
"""Override ManagedWindow method.""" """Override ManagedWindow method."""
@ -172,7 +171,6 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
image.set_from_file(SPLASH) image.set_from_file(SPLASH)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.set_size_request(600, -1) # wide enough it won't have to expand
box.pack_start(image, False, False, 5) box.pack_start(image, False, False, 5)
box.pack_start(label, False, False, 5) box.pack_start(label, False, False, 5)
@ -234,7 +232,7 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
def create_page_options(self): def create_page_options(self):
# as we do not know yet what to show, we create an empty page # as we do not know yet what to show, we create an empty page
page = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) page = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
page.set_border_width(12) page.set_border_width(0)
page.set_spacing(12) page.set_spacing(12)
page.show_all() page.show_all()
@ -529,11 +527,6 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
#remember previous page for next time #remember previous page for next time
self.__previous_page = page_number self.__previous_page = page_number
def close(self, *obj) :
#clean up ManagedWindow menu, then destroy window, bring forward parent
Gtk.Assistant.destroy(self)
ManagedWindow.close(self,*obj)
def get_intro_text(self): def get_intro_text(self):
return _('Under normal circumstances, Gramps does not require you ' return _('Under normal circumstances, Gramps does not require you '
'to directly save your changes. All changes you make are ' 'to directly save your changes. All changes you make are '
@ -622,20 +615,17 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
self.writestarted = False self.writestarted = False
def set_busy_cursor(self,value): def set_busy_cursor(self,value):
"""Set or unset the busy cursor while saving data. """
Set or unset the busy cursor while saving data.
Note : self.get_window() is the Gtk.Assistant Gtk.Window, not
a part of ManagedWindow
""" """
BUSY_CURSOR = Gdk.Cursor.new_for_display(Gdk.Display.get_default(), BUSY_CURSOR = Gdk.Cursor.new_for_display(Gdk.Display.get_default(),
Gdk.CursorType.WATCH) Gdk.CursorType.WATCH)
if value: if value:
self.get_window().set_cursor(BUSY_CURSOR) Gtk.Assistant.get_window(self).set_cursor(BUSY_CURSOR)
#self.set_sensitive(0) #self.set_sensitive(0)
else: else:
self.get_window().set_cursor(None) Gtk.Assistant.get_window(self).set_cursor(None)
#self.set_sensitive(1) #self.set_sensitive(1)
while Gtk.events_pending(): while Gtk.events_pending():

View File

@ -275,12 +275,14 @@ class WriterOptionBox:
button.set_size_request(107, -1) button.set_size_request(107, -1)
button.connect("clicked", self.show_preview_data) button.connect("clicked", self.show_preview_data)
button.proxy_name = proxy_name button.proxy_name = proxy_name
colon = _(':') # translators: needed for French, ignore otherwise
if proxy_name == "person": if proxy_name == "person":
# Frame Person: # Frame Person:
self.filter_obj = Gtk.ComboBox() self.filter_obj = Gtk.ComboBox()
label = Gtk.Label(label=_('_Person Filter') + ": ") label = Gtk.Label(label=_('_Person Filter') + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
label.set_use_underline(True) label.set_use_underline(True)
label.set_mnemonic_widget(self.filter_obj) label.set_mnemonic_widget(self.filter_obj)
box = Gtk.Box() box = Gtk.Box()
@ -295,9 +297,10 @@ class WriterOptionBox:
# Frame Note: # Frame Note:
# Objects for choosing a Note filter: # Objects for choosing a Note filter:
self.filter_note = Gtk.ComboBox() self.filter_note = Gtk.ComboBox()
label_note = Gtk.Label(label=_('_Note Filter') + ": ") label_note = Gtk.Label(label=_('_Note Filter') + colon)
label_note.set_halign(Gtk.Align.START) label_note.set_halign(Gtk.Align.START)
label_note.set_size_request(150, -1) label_note.set_size_request(120, -1)
label_note.set_padding(5, 0)
label_note.set_use_underline(True) label_note.set_use_underline(True)
label_note.set_mnemonic_widget(self.filter_note) label_note.set_mnemonic_widget(self.filter_note)
box = Gtk.Box() box = Gtk.Box()
@ -310,18 +313,20 @@ class WriterOptionBox:
button.set_tooltip_text(_("Click to see preview after note filter")) button.set_tooltip_text(_("Click to see preview after note filter"))
elif proxy_name == "privacy": elif proxy_name == "privacy":
# Frame 3: # Frame 3:
label = Gtk.Label(label=_("Privacy Filter") + ":") label = Gtk.Label(label=_("Privacy Filter") + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
box = Gtk.Box() box = Gtk.Box()
box.pack_start(label, False, True, 0) box.pack_start(label, False, True, 0)
box.add(self.private_check) box.add(self.private_check)
button.set_tooltip_text(_("Click to see preview after privacy filter")) button.set_tooltip_text(_("Click to see preview after privacy filter"))
elif proxy_name == "living": elif proxy_name == "living":
# Frame 4: # Frame 4:
label = Gtk.Label(label=_("Living Filter") + ":") label = Gtk.Label(label=_("Living Filter") + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
box = Gtk.Box() box = Gtk.Box()
box.pack_start(label, False, True, 0) box.pack_start(label, False, True, 0)
self.restrict_option = Gtk.ComboBox() self.restrict_option = Gtk.ComboBox()
@ -330,9 +335,10 @@ class WriterOptionBox:
elif proxy_name == "reference": elif proxy_name == "reference":
# Frame 5: # Frame 5:
self.reference_filter = Gtk.ComboBox() self.reference_filter = Gtk.ComboBox()
label = Gtk.Label(label=_('Reference Filter') + ": ") label = Gtk.Label(label=_('Reference Filter') + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
box = Gtk.Box() box = Gtk.Box()
box.pack_start(label, False, True, 0) box.pack_start(label, False, True, 0)
box.pack_start(self.reference_filter, True, True, 0) box.pack_start(self.reference_filter, True, True, 0)

View File

@ -61,7 +61,8 @@ class DisplayBuf(ManagedWindow):
buttons=(_('_Close'), buttons=(_('_Close'),
Gtk.ResponseType.CLOSE)), Gtk.ResponseType.CLOSE)),
None, title, True) None, title, True)
self.window.set_size_request(600,400) self.setup_configs('interface.' + title.lower().replace(' ', ''),
600, 400)
scrolled_window = Gtk.ScrolledWindow() scrolled_window = Gtk.ScrolledWindow()
scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC,Gtk.PolicyType.AUTOMATIC) scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC,Gtk.PolicyType.AUTOMATIC)
document.text_view = Gtk.TextView() document.text_view = Gtk.TextView()

View File

@ -32,6 +32,8 @@ import os
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gi.repository import Gtk from gi.repository import Gtk
import gi
gi.require_version('GExiv2', '0.10')
from gi.repository import GExiv2 from gi.repository import GExiv2
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -4,8 +4,6 @@
<requires lib="gtk+" version="3.10"/> <requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="check"> <object class="GtkDialog" id="check">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="default_width">450</property>
<property name="default_height">400</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<signal name="delete-event" handler="on_delete_event" swapped="no"/> <signal name="delete-event" handler="on_delete_event" swapped="no"/>
<child internal-child="vbox"> <child internal-child="vbox">

View File

@ -173,7 +173,7 @@ class Check(tool.BatchTool):
# We only do this for the dbdir backend. # We only do this for the dbdir backend.
if self.db.__class__.__name__ == 'DbBsddb': if self.db.__class__.__name__ == 'DbBsddb':
if cross_table_duplicates(self.db, uistate): if cross_table_duplicates(self.db, uistate):
Report(uistate, _( CheckReport(uistate, _(
"Your Family Tree contains cross table duplicate handles." "Your Family Tree contains cross table duplicate handles."
"\n " "\n "
"This is bad and can be fixed by making a backup of your\n" "This is bad and can be fixed by making a backup of your\n"
@ -229,7 +229,7 @@ class Check(tool.BatchTool):
errs = checker.build_report(uistate) errs = checker.build_report(uistate)
if errs: if errs:
Report(uistate, checker.text.getvalue(), cli) CheckReport(uistate, checker.text.getvalue(), cli)
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
@ -2667,7 +2667,7 @@ class CheckIntegrity:
# Display the results # Display the results
# #
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
class Report(ManagedWindow): class CheckReport(ManagedWindow):
""" Report out the results """ """ Report out the results """
def __init__(self, uistate, text, cli=0): def __init__(self, uistate, text, cli=0):
if cli: if cli:
@ -2686,6 +2686,7 @@ class Report(ManagedWindow):
# topdialog.get_widget("title"), # topdialog.get_widget("title"),
topdialog.get_object("title"), topdialog.get_object("title"),
_("Integrity Check Results")) _("Integrity Check Results"))
self.setup_configs('interface.checkreport', 450, 400)
self.show() self.show()

View File

@ -639,7 +639,7 @@ class BasePage:
@param: place_lat_long -- for use in Family Map Pages. This will be None @param: place_lat_long -- for use in Family Map Pages. This will be None
if called from Family pages, which do not create a Family Map if called from Family pages, which do not create a Family Map
""" """
family_list = sorted(individual.get_family_handle_list()) family_list = individual.get_family_handle_list()
if not family_list: if not family_list:
return None return None
@ -3533,11 +3533,11 @@ class FamilyPages(BasePage):
handle_list, key=self.sort_on_name_and_grampsid): handle_list, key=self.sort_on_name_and_grampsid):
person = self.r_db.get_person_from_handle(person_handle) person = self.r_db.get_person_from_handle(person_handle)
if person: if person:
family_list = sorted(pers_fam_dict[person_handle], family_list = person.get_family_handle_list()
key=lambda x: x.get_gramps_id()
)
first_family = True first_family = True
for family in family_list: for family_handle in family_list:
get_family = self.r_db.get_family_from_handle
family = get_family(family_handle)
trow = Html("tr") trow = Html("tr")
tbody += trow tbody += trow
@ -9605,10 +9605,13 @@ class NavWebOptions(MenuReportOptions):
@param: menu -- The menu for which we add options @param: menu -- The menu for which we add options
""" """
self.__add_report_options(menu) self.__add_report_options(menu)
self.__add_report_options_2(menu)
self.__add_page_generation_options(menu) self.__add_page_generation_options(menu)
self.__add_images_generation_options(menu)
self.__add_privacy_options(menu) self.__add_privacy_options(menu)
self.__add_download_options(menu) self.__add_download_options(menu)
self.__add_advanced_options(menu) self.__add_advanced_options(menu)
self.__add_advanced_options_2(menu)
self.__add_place_map_options(menu) self.__add_place_map_options(menu)
self.__add_others_options(menu) self.__add_others_options(menu)
@ -9658,6 +9661,15 @@ class NavWebOptions(MenuReportOptions):
stdoptions.add_name_format_option(menu, category_name) stdoptions.add_name_format_option(menu, category_name)
stdoptions.add_localization_option(menu, category_name)
def __add_report_options_2(self, menu):
"""
Continue Options on the "Report Options" tab.
"""
category_name = _("Report Options (2)")
addopt = partial( menu.add_option, category_name )
ext = EnumeratedListOption(_("File extension"), ".html") ext = EnumeratedListOption(_("File extension"), ".html")
for etype in _WEB_EXT: for etype in _WEB_EXT:
ext.add_item(etype, etype) ext.add_item(etype, etype)
@ -9718,10 +9730,12 @@ class NavWebOptions(MenuReportOptions):
self.__graphgens.set_help(_("The number of generations to include in " self.__graphgens.set_help(_("The number of generations to include in "
"the ancestor graph")) "the ancestor graph"))
addopt("graphgens", self.__graphgens) addopt("graphgens", self.__graphgens)
stdoptions.add_localization_option(menu, category_name)
self.__graph_changed() self.__graph_changed()
nogid = BooleanOption(_('Suppress Gramps ID'), False)
nogid.set_help(_('Whether to include the Gramps ID of objects'))
addopt( "nogid", nogid )
def __add_page_generation_options(self, menu): def __add_page_generation_options(self, menu):
""" """
Options on the "Page Generation" tab. Options on the "Page Generation" tab.
@ -9767,6 +9781,13 @@ class NavWebOptions(MenuReportOptions):
footernote.set_help(_("A note to be used as the page footer")) footernote.set_help(_("A note to be used as the page footer"))
addopt("footernote", footernote) addopt("footernote", footernote)
def __add_images_generation_options(self, menu):
"""
Options on the "Page Generation" tab.
"""
category_name = _("Images Generation")
addopt = partial(menu.add_option, category_name)
self.__gallery = BooleanOption(_("Include images and media objects"), self.__gallery = BooleanOption(_("Include images and media objects"),
True) True)
self.__gallery.set_help(_('Whether to include ' self.__gallery.set_help(_('Whether to include '
@ -9807,10 +9828,6 @@ class NavWebOptions(MenuReportOptions):
self.__gallery_changed() self.__gallery_changed()
nogid = BooleanOption(_('Suppress Gramps ID'), False)
nogid.set_help(_('Whether to include the Gramps ID of objects'))
addopt("nogid", nogid)
def __add_privacy_options(self, menu): def __add_privacy_options(self, menu):
""" """
Options on the "Privacy" tab. Options on the "Privacy" tab.
@ -9909,6 +9926,13 @@ class NavWebOptions(MenuReportOptions):
"step-siblings with the parents and siblings")) "step-siblings with the parents and siblings"))
addopt('showhalfsiblings', showallsiblings) addopt('showhalfsiblings', showallsiblings)
def __add_advanced_options_2(self, menu):
"""
Continue options on the "Advanced" tab.
"""
category_name = _("Advanced Options (2)")
addopt = partial(menu.add_option, category_name)
birthorder = BooleanOption( birthorder = BooleanOption(
_('Sort all children in birth order'), False) _('Sort all children in birth order'), False)
birthorder.set_help( birthorder.set_help(

2699
po/cs.po

File diff suppressed because it is too large Load Diff

10478
po/de.po

File diff suppressed because it is too large Load Diff