|
@ -1,6 +1,6 @@ |
|
|
import gettext |
|
|
import gettext |
|
|
|
|
|
|
|
|
class _(str): |
|
|
class _(unicode): |
|
|
|
|
|
|
|
|
observers = set() |
|
|
observers = set() |
|
|
lang = None |
|
|
lang = None |
|
@ -15,7 +15,9 @@ class _(str): |
|
|
|
|
|
|
|
|
@staticmethod |
|
|
@staticmethod |
|
|
def translate(s, *args, **kwargs): |
|
|
def translate(s, *args, **kwargs): |
|
|
return _.lang(s).format(args, kwargs) |
|
|
tr = _.lang(s).format(args, kwargs) |
|
|
|
|
|
tr = tr.decode('utf8') |
|
|
|
|
|
return tr |
|
|
|
|
|
|
|
|
@staticmethod |
|
|
@staticmethod |
|
|
def bind(label): |
|
|
def bind(label): |
|
|