From 711e25e5bba3f1c54efeabc39508327985cdbf08 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Mon, 31 Dec 2012 15:00:35 +0000 Subject: [PATCH] 6258: Error during start of Gramps for certain LANG values svn: r20908 --- gramps/gen/plug/report/_constants.py | 13 ++++++------- gramps/gui/plug/tool.py | 13 ++++++------- gramps/gui/viewmanager.py | 6 +++--- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/gramps/gen/plug/report/_constants.py b/gramps/gen/plug/report/_constants.py index f822f6720..3771f5c89 100644 --- a/gramps/gen/plug/report/_constants.py +++ b/gramps/gen/plug/report/_constants.py @@ -43,14 +43,13 @@ from .. import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_CODE, CATEGORY_WEB, CATEGORY_BOOK, CATEGORY_GRAPHVIZ) standalone_categories = { - CATEGORY_TEXT : _("Text Reports"), - CATEGORY_DRAW : _("Graphical Reports"), - CATEGORY_CODE : _("Code Generators"), - CATEGORY_WEB : _("Web Pages"), - CATEGORY_BOOK : _("Books"), - CATEGORY_GRAPHVIZ : _("Graphs"), + CATEGORY_TEXT : ("RepText", _("Text Reports")), + CATEGORY_DRAW : ("RepGraph", _("Graphical Reports")), + CATEGORY_CODE : ("RepCode", _("Code Generators")), + CATEGORY_WEB : ("RepWeb", _("Web Pages")), + CATEGORY_BOOK : ("RepBook", _("Books")), + CATEGORY_GRAPHVIZ : ("Graphs", _("Graphs")), } - book_categories = { CATEGORY_TEXT : _("Text"), CATEGORY_DRAW : _("Graphics"), diff --git a/gramps/gui/plug/tool.py b/gramps/gui/plug/tool.py index 50c984a07..0dc767ba4 100644 --- a/gramps/gui/plug/tool.py +++ b/gramps/gui/plug/tool.py @@ -55,14 +55,13 @@ from gramps.gen.plug import (TOOL_DEBUG, TOOL_ANAL, TOOL_DBPROC, TOOL_DBFIX, #------------------------------------------------------------------------- tool_categories = { - TOOL_DEBUG : _("Debug"), - TOOL_ANAL : _("Analysis and Exploration"), - TOOL_DBPROC : _("Family Tree Processing"), - TOOL_DBFIX : _("Family Tree Repair"), - TOOL_REVCTL : _("Revision Control"), - TOOL_UTILS : _("Utilities"), + TOOL_DEBUG : ("ToolDebug", _("Debug")), + TOOL_ANAL : ("ToolAnExp", _("Analysis and Exploration")), + TOOL_DBPROC : ("ToolProc", _("Family Tree Processing")), + TOOL_DBFIX : ("ToolRep", _("Family Tree Repair")), + TOOL_REVCTL : ("ToolRev", _("Revision Control")), + TOOL_UTILS : ("ToolUtil", _("Utilities")), } - #------------------------------------------------------------------------- # # Tool diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 78fc86b39..ef3ca31a6 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -120,7 +120,7 @@ if is_quartz(): else: _GTKOSXAPPLICATION = False -_UNSUPPORTED = _("Unsupported") +_UNSUPPORTED = ("Unsupported", _("Unsupported")) UIDEFAULT = ''' @@ -1804,9 +1804,9 @@ class ViewManager(CLIManager): if item != _UNSUPPORTED) for key in catlist: - new_key = key.replace(' ', '-') + new_key = key[0].replace(' ', '-') ofile.write('' % new_key) - actions.append((new_key, None, key)) + actions.append((new_key, None, key[1])) pdatas = hash_data[key] pdatas.sort(key=lambda x: x.name) for pdata in pdatas: