Example #1
0
 def i18n(self, actions=None):
     if not self.tabber.active_editor:
         return
     if not actions:
         actions = self.tabber.active_editor.actions()
     for action in actions:
         if not action.isSeparator():
             action.setText(pyqode_i18n.tr(action.text()))
         if action.menu():
             self.i18n(action.menu().actions())
Example #2
0
 def i18n(self, actions=None):
     if not self.tabber.active_editor:
         return
     if not actions:
         actions = self.tabber.active_editor.actions()
     for action in actions:
         if not action.isSeparator():
             action.setText(pyqode_i18n.tr(action.text()))
         if action.menu():
             self.i18n(action.menu().actions())
Example #3
0
def i18n(s):
    return pyqode_i18n.tr(s)
Example #4
0
def i18n(s):
    lang, encode = locale.getdefaultlocale()
    return pyqode_i18n.tr(s, lang=lang)