diff --git a/ChangeLog b/ChangeLog index 8831baeac..daf001d85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,11 @@ * src/plugins/Ancestors.py (event_info): Check whether place exists before getting its title (#1014412). + * src/docgen/AbiWord2Doc.py, src/docgen/AsciiDoc.py, + src/docgen/HtmlDoc.py, src/docgen/KwordDoc.py, + src/docgen/OpenOfficeDoc.py, src/docgen/PdfDoc.py, + src/docgen/RTFDoc.py: Translate type descriptions; correct print_label. + 2004-08-23 Tim Waugh * install-sh: Removed this generated file. diff --git a/src/docgen/AbiWord2Doc.py b/src/docgen/AbiWord2Doc.py index 2852c4f2a..005613875 100644 --- a/src/docgen/AbiWord2Doc.py +++ b/src/docgen/AbiWord2Doc.py @@ -324,9 +324,9 @@ try: mtype = GrampsMime.get_description('application/x-abiword') if Utils.search_for(prog[0]): - print_label=_("Open in %s" % prog[1]) + print_label=_("Open in %s") % prog[1] else: print_label=None Plugins.register_text_doc(mtype,AbiWordDoc,1,1,1,".abw", print_label) except: - Plugins.register_text_doc('AbiWord document',AbiWordDoc,1,1,1,".abw", None) + Plugins.register_text_doc(_('AbiWord document'),AbiWordDoc,1,1,1,".abw", None) diff --git a/src/docgen/AsciiDoc.py b/src/docgen/AsciiDoc.py index e6b123000..f4924e6b5 100644 --- a/src/docgen/AsciiDoc.py +++ b/src/docgen/AsciiDoc.py @@ -363,11 +363,11 @@ try: mtype = GrampsMime.get_description('text/plain') if Utils.search_for(mprog[0]): - print_label=_("Open in %s" % mprog[1]) + print_label=_("Open in %s") % mprog[1] else: print_label=None Plugins.register_text_doc(mtype,AsciiDoc,1,1,1,".txt", print_label) except: - Plugins.register_text_doc("Plain Text",AsciiDoc,1,1,1,".txt", None) + Plugins.register_text_doc(_("Plain Text"),AsciiDoc,1,1,1,".txt", None) diff --git a/src/docgen/HtmlDoc.py b/src/docgen/HtmlDoc.py index 29bbfa0fd..ab80cb2df 100644 --- a/src/docgen/HtmlDoc.py +++ b/src/docgen/HtmlDoc.py @@ -489,4 +489,4 @@ try: print_label=None Plugins.register_text_doc(mtype,HtmlDoc,1,0,1,".html", print_label) except: - Plugins.register_text_doc('HTML',HtmlDoc,1,0,1,".html", None) + Plugins.register_text_doc(_('HTML'),HtmlDoc,1,0,1,".html", None) diff --git a/src/docgen/KwordDoc.py b/src/docgen/KwordDoc.py index bc710cbdb..31248c6f3 100644 --- a/src/docgen/KwordDoc.py +++ b/src/docgen/KwordDoc.py @@ -497,5 +497,5 @@ try: print_label=None Plugins.register_text_doc(mtype, KwordDoc, 1, 0, 1, ".kwd", print_label) except: - Plugins.register_text_doc('KWord', KwordDoc, 1, 0, 1, ".kwd", print_label) + Plugins.register_text_doc(_('KWord'), KwordDoc, 1, 0, 1, ".kwd", print_label) diff --git a/src/docgen/OpenOfficeDoc.py b/src/docgen/OpenOfficeDoc.py index eb68abecb..515586364 100644 --- a/src/docgen/OpenOfficeDoc.py +++ b/src/docgen/OpenOfficeDoc.py @@ -976,6 +976,7 @@ def pt2cm(val): # Register plugins # #-------------------------------------------------------------------------- +print_label = None try: import Utils @@ -987,17 +988,10 @@ try: else: print_label = None - Plugins.register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw", print_label) + Plugins.register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw",print_label) Plugins.register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw") + Plugins.register_draw_doc(mtype,OpenOfficeDoc,1,1, ".sxd",print_label); except: - Plugins.register_text_doc('OpenOffice.org Writer', OpenOfficeDoc,1,1,1,".sxw", None) - Plugins.register_book_doc("OpenOffice.org Writer", OpenOfficeDoc,1,1,1,".sxw") - - -Plugins.register_draw_doc( - _("OpenOffice.org Draw"), - OpenOfficeDoc, - 1, - 1, - ".sxd", - print_label); + Plugins.register_text_doc(_('OpenOffice.org Writer'), OpenOfficeDoc,1,1,1,".sxw", None) + Plugins.register_book_doc(_("OpenOffice.org Writer"), OpenOfficeDoc,1,1,1,".sxw") + Plugins.register_draw_doc(_("OpenOffice.org Draw"), OpenOfficeDoc,1,1,".sxd",None); diff --git a/src/docgen/PdfDoc.py b/src/docgen/PdfDoc.py index 4747f763b..1ae9b74d5 100644 --- a/src/docgen/PdfDoc.py +++ b/src/docgen/PdfDoc.py @@ -583,24 +583,17 @@ print_label = None try: import Utils - prog = GrampsMime.get_application("application/pdf") - type = GrampsMime.get_description("application/pdf") + mprog = GrampsMime.get_application("application/pdf") + mtype = GrampsMime.get_description("application/pdf") - if Utils.search_for(prog[0]): - print_label=_("Open in %s") % prog[1] + if Utils.search_for(mprog[0]): + print_label=_("Open in %s") % mprog[1] else: print_label=None - Plugins.register_text_doc(type, PdfDoc, 1, 0, 1, ".pdf", print_label) - Plugins.register_draw_doc(type, PdfDoc, 1, 1, ".pdf", print_label) + Plugins.register_text_doc(mtype, PdfDoc, 1, 0, 1, ".pdf", print_label) + Plugins.register_draw_doc(mtype, PdfDoc, 1, 1, ".pdf", print_label) + Plugins.register_book_doc(mtype,classref=PdfDoc,table=1,paper=1,style=1,ext=".pdf",print_label) except: - Plugins.register_text_doc('PDF document', PdfDoc, 1, 0, 1,".pdf", None) - Plugins.register_draw_doc('PDF document', PdfDoc, 1, 1, ".pdf", None) - -Plugins.register_book_doc( - name=_("PDF"), - classref=PdfDoc, - table=1, - paper=1, - style=1, - ext=".pdf" - ) + Plugins.register_text_doc(_('PDF document'), PdfDoc, 1, 0, 1,".pdf", None) + Plugins.register_draw_doc(_('PDF document'), PdfDoc, 1, 1, ".pdf", None) + Plugins.register_book_doc(name=_("PDF document"),classref=PdfDoc,table=1,paper=1,style=1,ext=".pdf") diff --git a/src/docgen/RTFDoc.py b/src/docgen/RTFDoc.py index 7443ee6f2..54c277d8b 100644 --- a/src/docgen/RTFDoc.py +++ b/src/docgen/RTFDoc.py @@ -431,4 +431,4 @@ try: print_label=None Plugins.register_text_doc(mtype, RTFDoc, 1, 0, 1, ".rtf", print_label) except: - Plugins.register_text_doc('RTF document', RTFDoc, 1, 0, 1, ".rtf", None) + Plugins.register_text_doc(_('RTF document'), RTFDoc, 1, 0, 1, ".rtf", None)