mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Better fix for the curses UTF-8 bug, thanks to Konrad Schöbel!
This commit is contained in:
@@ -76,13 +76,10 @@ CURSES_REV=wpath.curses_revision
|
|||||||
|
|
||||||
# Fix strings in wicd-curses
|
# Fix strings in wicd-curses
|
||||||
from wicd.translations import language
|
from wicd.translations import language
|
||||||
from wicd.translations import _ as orig_
|
from wicd.translations import _
|
||||||
for i in language.keys():
|
for i in language.keys():
|
||||||
language[i] = language[i].decode('utf8')
|
language[i] = language[i].decode('utf8')
|
||||||
|
|
||||||
def _(s):
|
|
||||||
return orig_(s).decode('utf8')
|
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
##### SUPPORT CLASSES
|
##### SUPPORT CLASSES
|
||||||
########################################
|
########################################
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ def get_gettext():
|
|||||||
langs += ["en_US"]
|
langs += ["en_US"]
|
||||||
lang = gettext.translation('wicd', local_path, languages=langs,
|
lang = gettext.translation('wicd', local_path, languages=langs,
|
||||||
fallback=True)
|
fallback=True)
|
||||||
_ = lang.gettext
|
_ = lang.ugettext
|
||||||
return _
|
return _
|
||||||
|
|
||||||
_ = get_gettext()
|
_ = get_gettext()
|
||||||
|
|||||||
Reference in New Issue
Block a user