updated strings, called gnome.init

svn: r1301
This commit is contained in:
Don Allingham 2003-02-13 05:15:39 +00:00
parent 2acb5440f6
commit 7e22c866a6
6 changed files with 74 additions and 78 deletions

View File

@ -147,16 +147,16 @@ class GladeExtractor:
def __init__(self,msgs): def __init__(self,msgs):
self.strings = msgs self.strings = msgs
def add_string(self, string, lineno): def add_string(self, str, lineno):
if string == "": if str.strip() == "":
return return
if _ignore.has_key(string): if _ignore.has_key(str):
return return
entry = (self.file, lineno) entry = (self.file, lineno)
if self.strings.has_key(string): if self.strings.has_key(str):
self.strings[string][entry] = 0 self.strings[str][entry] = 0
else: else:
self.strings[string] = {entry: 0} self.strings[str] = {entry: 0}
def parse(self,file): def parse(self,file):
self.p = make_parser() self.p = make_parser()

View File

@ -1886,7 +1886,7 @@
<child> <child>
<widget class="GtkButton" id="fam_back"> <widget class="GtkButton" id="fam_back">
<property name="visible">True</property> <property name="visible">True</property>
<property name="tooltip" translatable="yes">Make the selected child the active family</property> <property name="tooltip" translatable="yes">Make the selected child the active person</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>

View File

@ -1,5 +1,11 @@
#! /usr/bin/python -O #! /usr/bin/python -O
import const
import sys
import os
import locale
import intl
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Cope with versioned pygtk installation. # Cope with versioned pygtk installation.
@ -11,54 +17,36 @@ try:
except ImportError: except ImportError:
pass pass
import gtk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Load internationalization setup # Load internationalization setup
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import os
import locale
import gtk.glade
import intl
if os.environ.has_key("GRAMPSI18N"): if os.environ.has_key("GRAMPSI18N"):
loc = os.environ["GRAMPSI18N"] loc = os.environ["GRAMPSI18N"]
else: else:
loc = "locale" loc = "locale"
intl.bindtextdomain("gramps",loc)
intl.bind_textdomain_codeset("gramps",'UTF-8')
intl.textdomain("gramps")
locale.setlocale(locale.LC_NUMERIC,"C")
#-------------------------------------------------------------------------
#
# Standard python modules
#
#-------------------------------------------------------------------------
import sys
#-------------------------------------------------------------------------
#
# GNOME/GTK libraries
#
#-------------------------------------------------------------------------
import gtk
import gnome.ui
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# gramps libraries # gramps libraries
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gramps_main import gramps_main
import const
if len(sys.argv) > 1: if len(sys.argv) > 1:
arg = sys.argv[1] arg = sys.argv[1]
else: else:
arg = None arg = None
intl.bindtextdomain("gramps",loc)
intl.bind_textdomain_codeset("gramps",'UTF-8')
intl.textdomain("gramps")
locale.setlocale(locale.LC_NUMERIC,"C")
try: try:
import StartupDialog import StartupDialog

View File

@ -41,6 +41,7 @@ from intl import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gobject import gobject
import gtk import gtk
import gnome
import gnome.ui import gnome.ui
import gtk.glade import gtk.glade
@ -49,7 +50,6 @@ import gtk.glade
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
#from RelLib import *
import RelLib import RelLib
import PedView import PedView
import MediaView import MediaView
@ -527,19 +527,24 @@ class Gramps:
def on_contents_activate(self,obj): def on_contents_activate(self,obj):
"""Display the GRAMPS manual""" """Display the GRAMPS manual"""
import gnome.help
url = gnome.help.file_find_file("gramps-manual","gramps-manual.sgml") WarningDialog('HELP currently not available')
if url: # url = gnome.help_display_with_doc_id(self.program,
url = "gnome-help:"+url # "",
gnome.help.goto(url) # "gramps-manual.sgml",
# "")
# if url:
# url = "gnome-help:"+url
# gnome.help.goto(url)
def on_writing_extensions_activate(self,obj): def on_writing_extensions_activate(self,obj):
"""Display the Extending GRAMPS manual""" """Display the Extending GRAMPS manual"""
import gnome.help WarningDialog('HELP currently not available')
url = gnome.help.file_find_file("extending-gramps","extending-gramps.sgml") # import gnome.help
if url: # url = gnome.help.file_find_file("extending-gramps","extending-gramps.sgml")
url = "gnome-help:"+url # if url:
gnome.help.goto(url) # url = "gnome-help:"+url
# gnome.help.goto(url)
def on_new_clicked(self,obj): def on_new_clicked(self,obj):
"""Prompt for permission to close the current database""" """Prompt for permission to close the current database"""
@ -1431,5 +1436,8 @@ def set_panel(obj):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
if __name__ == '__main__': if __name__ == '__main__':
import gnome
import sys
Gramps(None) Gramps(None)
gtk.mainloop() gtk.mainloop()

View File

@ -19,7 +19,7 @@
# #
""" """
TimeLine report Timeline report
""" """
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -63,8 +63,8 @@ class TimeLine:
def __init__(self,database,person,output,document,filter,title,sort_func): def __init__(self,database,person,output,document,filter,title,sort_func):
""" """
Creates the TimeLine object that produces the report. This class Creates the Timeline object that produces the report. This class
is used by the TimeLineDialog class. The arguments are: is used by the TimelineDialog class. The arguments are:
database - the GRAMPS database database - the GRAMPS database
person - currently selected person person - currently selected person
@ -312,7 +312,7 @@ class TimeLineDialog(Report.DrawReportDialog):
def get_target_browser_title(self): def get_target_browser_title(self):
"""The title of the window created when the 'browse' button is """The title of the window created when the 'browse' button is
clicked in the 'Save As' frame.""" clicked in the 'Save As' frame."""
return _("TimeLine File") return _("Timeline File")
def get_report_generations(self): def get_report_generations(self):
"""No generation options.""" """No generation options."""
@ -443,7 +443,7 @@ def get_description():
register_report( register_report(
task=report, task=report,
name=_("TimeLine Graph"), name=_("Timeline Graph"),
status=(_("Beta")), status=(_("Beta")),
category=_("Graphical Reports"), category=_("Graphical Reports"),
author_name="Donald N. Allingham", author_name="Donald N. Allingham",

View File

@ -4,8 +4,8 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: GRAMPS VERSION\n"
"POT-Creation-Date: Tue Feb 11 21:17:51 2003\n" "POT-Creation-Date: Wed Feb 12 22:07:04 2003\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -237,7 +237,7 @@ msgstr ""
msgid "from %(start_date)s to %(stop_date)s" msgid "from %(start_date)s to %(stop_date)s"
msgstr "" msgstr ""
#: DbPrompter.py:99 gramps_main.py:730 gramps_main.py:983 gramps_main.py:995 #: DbPrompter.py:99 gramps_main.py:735 gramps_main.py:988 gramps_main.py:1000
msgid "No Comment Provided" msgid "No Comment Provided"
msgstr "" msgstr ""
@ -329,7 +329,7 @@ msgid "unknown"
msgstr "" msgstr ""
#: EditPerson.py:802 EditPerson.py:813 Marriage.py:399 gramps_main.py:497 #: EditPerson.py:802 EditPerson.py:813 Marriage.py:399 gramps_main.py:497
#: gramps_main.py:943 #: gramps_main.py:948
msgid "Abandon Changes" msgid "Abandon Changes"
msgstr "" msgstr ""
@ -457,7 +457,7 @@ msgstr ""
#: FamilyView.py:412 Plugins.py:404 Plugins.py:405 Plugins.py:406 #: FamilyView.py:412 Plugins.py:404 Plugins.py:405 Plugins.py:406
#: Plugins.py:418 Plugins.py:419 Plugins.py:420 const.py:137 const.py:412 #: Plugins.py:418 Plugins.py:419 Plugins.py:420 const.py:137 const.py:412
#: const.py:420 gramps.glade:3534 gramps.glade:3729 gramps.glade:4283 #: const.py:420 gramps.glade:3534 gramps.glade:3729 gramps.glade:4283
#: gramps.glade:4489 gramps.glade:6211 gramps.glade:6477 gramps_main.py:1156 #: gramps.glade:4489 gramps.glade:6211 gramps.glade:6477 gramps_main.py:1161
#: plugins/WebPage.py:288 #: plugins/WebPage.py:288
msgid "Unknown" msgid "Unknown"
msgstr "" msgstr ""
@ -977,7 +977,7 @@ msgid ""
msgstr "" msgstr ""
#: RelImage.py:70 RelImage.py:73 RelImage.py:134 RelImage.py:137 #: RelImage.py:70 RelImage.py:73 RelImage.py:134 RelImage.py:137
#: gramps_main.py:751 gramps_main.py:755 gramps_main.py:763 #: gramps_main.py:756 gramps_main.py:760 gramps_main.py:768
#: plugins/AncestorChart.py:113 plugins/DesGraph.py:210 #: plugins/AncestorChart.py:113 plugins/DesGraph.py:210
#: plugins/DesGraph.py:219 plugins/WriteGedcom.py:486 #: plugins/DesGraph.py:219 plugins/WriteGedcom.py:486
#: plugins/WriteGedcom.py:491 #: plugins/WriteGedcom.py:491
@ -2370,7 +2370,7 @@ msgid "<b>Children</b>"
msgstr "" msgstr ""
#: gramps.glade:1889 #: gramps.glade:1889
msgid "Make the selected child the active family" msgid "Make the selected child the active person"
msgstr "" msgstr ""
#: gramps.glade:1915 #: gramps.glade:1915
@ -2621,85 +2621,85 @@ msgid ""
"Do you wish to save the changes?" "Do you wish to save the changes?"
msgstr "" msgstr ""
#: gramps_main.py:547 #: gramps_main.py:552
msgid "Do you want to close the current database and create a new one?" msgid "Do you want to close the current database and create a new one?"
msgstr "" msgstr ""
#: gramps_main.py:548 #: gramps_main.py:553
msgid "New Database" msgid "New Database"
msgstr "" msgstr ""
#: gramps_main.py:676 #: gramps_main.py:681
msgid "" msgid ""
"An autosave file exists for %s.\n" "An autosave file exists for %s.\n"
"Should this be loaded instead of the last saved version?" "Should this be loaded instead of the last saved version?"
msgstr "" msgstr ""
#: gramps_main.py:681 #: gramps_main.py:686
msgid "Autosave File" msgid "Autosave File"
msgstr "" msgstr ""
#: gramps_main.py:709 gramps_main.py:745 #: gramps_main.py:714 gramps_main.py:750
msgid "%s is not a directory" msgid "%s is not a directory"
msgstr "" msgstr ""
#: gramps_main.py:712 #: gramps_main.py:717
msgid "Loading %s ..." msgid "Loading %s ..."
msgstr "" msgstr ""
#: gramps_main.py:738 #: gramps_main.py:743
msgid "Saving %s ..." msgid "Saving %s ..."
msgstr "" msgstr ""
#: gramps_main.py:797 #: gramps_main.py:802
msgid "autosaving..." msgid "autosaving..."
msgstr "" msgstr ""
#: gramps_main.py:800 #: gramps_main.py:805
msgid "autosave complete" msgid "autosave complete"
msgstr "" msgstr ""
#: gramps_main.py:802 #: gramps_main.py:807
msgid "autosave failed" msgid "autosave failed"
msgstr "" msgstr ""
#: gramps_main.py:829 #: gramps_main.py:834
msgid "Do you really wish to delete %s?" msgid "Do you really wish to delete %s?"
msgstr "" msgstr ""
#: gramps_main.py:831 #: gramps_main.py:836
msgid "Delete Person" msgid "Delete Person"
msgstr "" msgstr ""
#: gramps_main.py:940 #: gramps_main.py:945
msgid "Do you wish to abandon your changes and revert to the last saved database?" msgid "Do you wish to abandon your changes and revert to the last saved database?"
msgstr "" msgstr ""
#: gramps_main.py:945 #: gramps_main.py:950
msgid "Cannot revert to a previous database, since one does not exist" msgid "Cannot revert to a previous database, since one does not exist"
msgstr "" msgstr ""
#: gramps_main.py:1247 #: gramps_main.py:1252
msgid "Loading %s..." msgid "Loading %s..."
msgstr "" msgstr ""
#: gramps_main.py:1342 #: gramps_main.py:1347
msgid "No default/home person has been set" msgid "No default/home person has been set"
msgstr "" msgstr ""
#: gramps_main.py:1348 #: gramps_main.py:1353
msgid "%s has been bookmarked" msgid "%s has been bookmarked"
msgstr "" msgstr ""
#: gramps_main.py:1351 #: gramps_main.py:1356
msgid "Bookmark could not be set because no one was selected" msgid "Bookmark could not be set because no one was selected"
msgstr "" msgstr ""
#: gramps_main.py:1363 #: gramps_main.py:1368
msgid "Do you wish to set %s as the home person?" msgid "Do you wish to set %s as the home person?"
msgstr "" msgstr ""
#: gramps_main.py:1365 #: gramps_main.py:1370
msgid "Set Home Person" msgid "Set Home Person"
msgstr "" msgstr ""
@ -4161,7 +4161,7 @@ msgid "Timeline"
msgstr "" msgstr ""
#: plugins/TimeLine.py:315 #: plugins/TimeLine.py:315
msgid "TimeLine File" msgid "Timeline File"
msgstr "" msgstr ""
#: plugins/TimeLine.py:337 #: plugins/TimeLine.py:337
@ -4173,7 +4173,7 @@ msgid "Generates a timeline graph."
msgstr "" msgstr ""
#: plugins/TimeLine.py:446 #: plugins/TimeLine.py:446
msgid "TimeLine Graph" msgid "Timeline Graph"
msgstr "" msgstr ""
#: plugins/Verify.py:290 #: plugins/Verify.py:290