Skip to content

Commit

Permalink
Address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
znjameswu committed May 8, 2023
1 parent 70f70b3 commit e988934
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def __init__(self, engine):
locale.setlocale(locale.LC_ALL, "")
localedir = os.getenv("IBUS_LOCALEDIR")
gettext.bindtextdomain("ibus-pinyin", localedir)
# Python's gettext module doesn't provide all methods in
# new Python version since Python 3.10
try:
gettext.bind_textdomain_codeset("ibus-pinyin", "UTF-8")
except AttributeError:
pass

self.__bus = IBus.Bus()
self.__config = self.__bus.get_config()
Expand Down

0 comments on commit e988934

Please sign in to comment.