Changeset 40442


Ignore:
Timestamp:
Jan 13, 2010, 10:54:27 PM (15 years ago)
Author:
neteler
Message:

enable more buttons for i18N (indeed needed everywhere for wx.Button()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/gui/wxpython/gui_modules/menuform.py

    r40306 r40442  
    663663            pass
    664664       
     665        # i18N
     666        import gettext
     667        gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
     668
    665669        wx.Frame.__init__(self, parent=parent, id=ID, title=title,
    666670                          pos=wx.DefaultPosition, style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
     
    730734        btnsizer = wx.BoxSizer(orient=wx.HORIZONTAL)
    731735        # cancel
    732         self.btn_cancel = wx.Button(parent=self.panel, id=wx.ID_CLOSE)
     736        self.btn_cancel = wx.Button(parent=self.panel, id=wx.ID_CLOSE, label=_("&Close"))
    733737        self.btn_cancel.SetToolTipString(_("Close this window without executing the command (Ctrl+Q)"))
    734738        btnsizer.Add(item=self.btn_cancel, proportion=0, flag=wx.ALL | wx.ALIGN_CENTER, border=10)
    735739        self.btn_cancel.Bind(wx.EVT_BUTTON, self.OnCancel)
    736740        # help
    737         self.btn_help = wx.Button(parent=self.panel, id=wx.ID_HELP)
     741        self.btn_help = wx.Button(parent=self.panel, id=wx.ID_HELP, label=_("&Help"))
    738742        self.btn_help.SetToolTipString(_("Show manual page of the command (Ctrl+H)"))
    739743        self.btn_help.Bind(wx.EVT_BUTTON, self.OnHelp)
     
    741745            self.btn_help.Hide()
    742746        if self.get_dcmd is not None: # A callback has been set up
    743             btn_apply = wx.Button(parent=self.panel, id=wx.ID_APPLY)
     747            btn_apply = wx.Button(parent=self.panel, id=wx.ID_APPLY, label=_("&Apply"))
    744748            btn_ok = wx.Button(parent=self.panel, id=wx.ID_OK)
    745749            btn_ok.SetDefault()
Note: See TracChangeset for help on using the changeset viewer.