def on_run_button(self, event): """Handle the event when the user clicks the run button.""" self.print(wx.GetTranslation(_(u"Run button pressed."))) self.continue_command() if self.toggle_run is False: self.toggle_run = True self.continue_button.Enable(True) self.run_command()
def GetSingularString(self, msgid, project=None): if msgid is None or len(msgid.strip()) == 0: return u"" msg = missing = object() if project is None or len(project.strip()) == 0: project = self.i18nMan._DEFAULT_PROJECT msg = self.i18nMan.getText(project, self.i18nMan._DEFAULT_CATALOG, msgid, missing) if msg is missing: msg = wx.GetTranslation(msgid) if self.i18nMan._testing: return self.i18nMan._wrapText(msg) if self.i18nMan._expand: return self.i18nMan._expandText(msg) return msg
def wxTranslate(self, msgid): """ Returns the current locale set translation for the WxWidgets "wxstd" domain. @param msgid: The unicode or ASCII default key to translation @type msgid: ASCII c{str} or c{unicode} @rtype: c{unicode} @return: The translated unicode string for key msgid or msgid if no translation found """ assert self._init if wxIsAvailable(): res = wx.GetTranslation(msgid) else: res = msgid if self._testing: return self._wrapText(res) return res
def test_translation1(self): ldr = wx.FileTranslationsLoader() wx.GetTranslation('hello')
def unicode_translation(message): return wx.GetTranslation(message).encode("utf-8")
def unicode_translation(message): return wx.GetTranslation(message).encode(default_locale)
def _(T): return wx.GetTranslation(T)