From 2d17423e254230e6dc107441686395ba0b3fbd0f Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 28 Apr 2006 17:02:53 +0000 Subject: [PATCH] (ViewManager._init_lists): Translate menu labels. svn: r6486 --- gramps2/ChangeLog | 1 + gramps2/src/ViewManager.py | 69 +++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index f19e38556..f6ef2191f 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -2,6 +2,7 @@ * src/ScratchPad.py (ScratchPadWindow.__init__): Allow only one instance; translate label; remove unneeded event handlers. * src/ViewManager.py (ViewManager.scratchpad): Catch exception. + (ViewManager._init_lists): Translate menu labels. 2006-04-27 Alex Roitman * src/ViewManager.py (ViewManager.build_plugin_menu): Use unique diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index c10440635..08e270866 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -287,56 +287,57 @@ class ViewManager: def _init_lists(self): self._file_action_list = [ - ('FileMenu', None, '_File'), - ('New', gtk.STOCK_NEW, '_New', "n", None, + ('FileMenu', None, _('_File')), + ('New', gtk.STOCK_NEW, _('_New'), "n", None, self.new_activate), - ('Open', gtk.STOCK_OPEN, '_Open', "o", None, + ('Open', gtk.STOCK_OPEN, _('_Open'), "o", None, self.open_activate), - ('OpenRecent', None, 'Open _Recent'), - ('Quit', gtk.STOCK_QUIT, '_Quit', "q", None, self.quit), - ('ViewMenu', None, '_View'), - ('EditMenu', None, '_Edit'), - ('Preferences', gtk.STOCK_PREFERENCES, '_Preferences', None, None, + ('OpenRecent', None, _('Open _Recent')), + ('Quit', gtk.STOCK_QUIT, _('_Quit'), "q",None,self.quit), + ('ViewMenu', None, _('_View')), + ('EditMenu', None, _('_Edit')), + ('Preferences', gtk.STOCK_PREFERENCES,_('_Preferences'),None,None, self.preferences_activate), - ('HelpMenu', None, '_Help'), + ('HelpMenu', None, _('_Help')), ('HomePage', None, _('GRAMPS _home page'), None, None, self.home_page_activate), ('MailingLists', None, _('GRAMPS _mailing lists'), None, None, self.mailing_lists_activate), ('ReportBug', None, _('_Report a bug'), None, None, self.report_bug_activate), - ('About', gtk.STOCK_ABOUT, '_About', None, None, self.about), - ('PluginStatus', None, '_Plugin status', None, None, + ('About', gtk.STOCK_ABOUT, _('_About'), None, None, self.about), + ('PluginStatus', None,_('_Plugin status'), None, None, self.plugin_status), - ('FAQ', None, '_FAQ', None, None, self.faq_activate), - ('UserManual', gtk.STOCK_HELP, '_User Manual', 'F1', None, + ('FAQ', None, _('_FAQ'), None, None, self.faq_activate), + ('UserManual', gtk.STOCK_HELP, _('_User Manual'), 'F1', None, self.manual_activate), - ('TipOfDay', None, 'Tip of the day', None, None, + ('TipOfDay', None, _('Tip of the day'), None, None, self.tip_of_day_activate), ] self._action_action_list = [ - ('SaveAs', gtk.STOCK_SAVE_AS, '_Save As'), - ('Export', gtk.STOCK_SAVE_AS, '_Export', "e", None, + ('SaveAs', gtk.STOCK_SAVE_AS, _('_Save As')), + ('Export', gtk.STOCK_SAVE_AS, _('_Export')), "e", None, self.export_data), - ('Abandon', gtk.STOCK_REVERT_TO_SAVED, '_Abandon changes and quit'), - ('CmpMerge', None, '_Compare and merge'), - ('FastMerge', None, '_Fast merge'), - ('ScratchPad', gtk.STOCK_PASTE, '_ScratchPad', None, None, + ('Abandon', gtk.STOCK_REVERT_TO_SAVED, + _('_Abandon changes and quit')), + ('CmpMerge', None, _('_Compare and merge')), + ('FastMerge', None, _('_Fast merge')), + ('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), None, None, self.scratchpad), - ('Import', gtk.STOCK_CONVERT, '_Import', "i", None, + ('Import', gtk.STOCK_CONVERT, _('_Import'), "i", None, self.import_data), - ('Reports', gtk.STOCK_DND_MULTIPLE, '_Reports', None, None, + ('Reports', gtk.STOCK_DND_MULTIPLE, _('_Reports'), None, None, self.reports_clicked), - ('Tools', gtk.STOCK_EXECUTE, '_Tools', None, None, + ('Tools', gtk.STOCK_EXECUTE, _('_Tools'), None, None, self.tools_clicked), - ('EditMenu', None, '_Edit'), - ('ColumnEdit', gtk.STOCK_PROPERTIES, '_Column Editor'), - ('GoMenu', None, '_Go'), - ('BookMenu', None, '_Bookmarks'), - ('ReportsMenu', None, '_Reports'), - ('ToolsMenu', None, '_Tools'), - ('WindowsMenu', None, '_Windows'), + ('EditMenu', None, _('_Edit')), + ('ColumnEdit', gtk.STOCK_PROPERTIES, _('_Column Editor')), + ('GoMenu', None, _('_Go')), + ('BookMenu', None, _('_Bookmarks')), + ('ReportsMenu', None, _('_Reports')), + ('ToolsMenu', None, _('_Tools')), + ('WindowsMenu', None, _('_Windows')), ('F2', None, None, "F2", None, self.keypress), ('F3', None, None, "F3", None, self.keypress), ('F4', None, None, "F4", None, self.keypress), @@ -350,18 +351,18 @@ class ViewManager: ] self._file_toggle_action_list = [ - ('Sidebar', None, '_Sidebar', None, None, self.sidebar_toggle, + ('Sidebar', None, _('_Sidebar'), None, None, self.sidebar_toggle, self.show_sidebar ), - ('Toolbar', None, '_Toolbar', None, None, self.toolbar_toggle, + ('Toolbar', None, _('_Toolbar'), None, None, self.toolbar_toggle, self.show_toolbar ), ] self._undo_action_list = [ - ('Undo', gtk.STOCK_UNDO, '_Undo', 'z', None, self.undo), + ('Undo', gtk.STOCK_UNDO, _('_Undo'),'z', None, self.undo), ] self._redo_action_list = [ - ('Redo', gtk.STOCK_REDO, '_Redo', 'z', None, + ('Redo', gtk.STOCK_REDO,_('_Redo'), 'z', None, self.redo), ]