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,33 +327,29 @@ class ConfigManager:
filename = self.filename
if filename:
try:
head = os.path.split( filename )[0]
os.makedirs( head )
head = os.path.split(filename)[0]
os.makedirs(head)
except OSError as exp:
if exp.errno != errno.EEXIST:
raise
try:
with open(filename, "w", encoding="utf-8") as key_file:
key_file.write(";; Gramps key file\n")
key_file.write((";; Automatically created at %s" %
time.strftime("%Y/%m/%d %H:%M:%S")) + "\n\n")
sections = sorted(self.data)
for section in sections:
key_file.write(("[%s]\n") % section)
keys = sorted(self.data[section])
for key in keys:
key_file.write(";; Automatically created at %s" %
time.strftime("%Y/%m/%d %H:%M:%S") + "\n\n")
for section in sorted(self.data):
key_file.write("[%s]\n" % section)
for key in sorted(self.data[section]):
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 value == self.get_default("%s.%s" % (section, key)):
if value == self.get_default("%s.%s"
% (section, key)):
default = ";;"
else:
default = ""
if isinstance(value, int):
value = int(value)
key_file.write(("%s%s=%s\n")% (default,
key,
repr(value)))
if isinstance(value, int):
value = int(value) # TODO why is this needed?
key_file.write("%s%s=%s\n" % (default, key,
repr(value)))
key_file.write("\n")
# else, no filename given; nothing to save so do nothing quietly
except IOError as err:

View File

@ -545,8 +545,8 @@ class ManagedWindow:
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_position()
self.clean_up()
self.uistate.gwm.close_track(self.track)
self.opened = False
@ -596,16 +596,19 @@ class ManagedWindow:
vert_position = config.get(self.vert_position_key)
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
(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)
if self.horiz_position_key is not None:
(horiz_position, vert_position) = self.window.get_position()
config.set(self.horiz_position_key, horiz_position)
config.set(self.vert_position_key, vert_position)
config.save()
if save_config:
config.save()
def setup_configs(self, config_base,
default_width, default_height,

View File

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

View File

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

View File

@ -61,7 +61,8 @@ class DisplayBuf(ManagedWindow):
buttons=(_('_Close'),
Gtk.ResponseType.CLOSE)),
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.set_policy(Gtk.PolicyType.AUTOMATIC,Gtk.PolicyType.AUTOMATIC)
document.text_view = Gtk.TextView()

View File

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

View File

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

View File

@ -173,7 +173,7 @@ class Check(tool.BatchTool):
# We only do this for the dbdir backend.
if self.db.__class__.__name__ == 'DbBsddb':
if cross_table_duplicates(self.db, uistate):
Report(uistate, _(
CheckReport(uistate, _(
"Your Family Tree contains cross table duplicate handles."
"\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)
if errs:
Report(uistate, checker.text.getvalue(), cli)
CheckReport(uistate, checker.text.getvalue(), cli)
# -------------------------------------------------------------------------
@ -2667,7 +2667,7 @@ class CheckIntegrity:
# Display the results
#
# -------------------------------------------------------------------------
class Report(ManagedWindow):
class CheckReport(ManagedWindow):
""" Report out the results """
def __init__(self, uistate, text, cli=0):
if cli:
@ -2686,6 +2686,7 @@ class Report(ManagedWindow):
# topdialog.get_widget("title"),
topdialog.get_object("title"),
_("Integrity Check Results"))
self.setup_configs('interface.checkreport', 450, 400)
self.show()

View File

@ -639,7 +639,7 @@ class BasePage:
@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
"""
family_list = sorted(individual.get_family_handle_list())
family_list = individual.get_family_handle_list()
if not family_list:
return None
@ -3533,11 +3533,11 @@ class FamilyPages(BasePage):
handle_list, key=self.sort_on_name_and_grampsid):
person = self.r_db.get_person_from_handle(person_handle)
if person:
family_list = sorted(pers_fam_dict[person_handle],
key=lambda x: x.get_gramps_id()
)
family_list = person.get_family_handle_list()
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")
tbody += trow
@ -9605,10 +9605,13 @@ class NavWebOptions(MenuReportOptions):
@param: menu -- The menu for which we add options
"""
self.__add_report_options(menu)
self.__add_report_options_2(menu)
self.__add_page_generation_options(menu)
self.__add_images_generation_options(menu)
self.__add_privacy_options(menu)
self.__add_download_options(menu)
self.__add_advanced_options(menu)
self.__add_advanced_options_2(menu)
self.__add_place_map_options(menu)
self.__add_others_options(menu)
@ -9658,6 +9661,15 @@ class NavWebOptions(MenuReportOptions):
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")
for etype in _WEB_EXT:
ext.add_item(etype, etype)
@ -9718,10 +9730,12 @@ class NavWebOptions(MenuReportOptions):
self.__graphgens.set_help(_("The number of generations to include in "
"the ancestor graph"))
addopt("graphgens", self.__graphgens)
stdoptions.add_localization_option(menu, category_name)
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):
"""
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"))
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"),
True)
self.__gallery.set_help(_('Whether to include '
@ -9807,10 +9828,6 @@ class NavWebOptions(MenuReportOptions):
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):
"""
Options on the "Privacy" tab.
@ -9909,6 +9926,13 @@ class NavWebOptions(MenuReportOptions):
"step-siblings with the parents and siblings"))
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(
_('Sort all children in birth order'), False)
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