Use “gettext” instead of “locale” for L10N

As the documentation on the “locale” module states, the “gettext” module
should be used instead. Therefore adjust the localization calls to use
gettext instead.

Additionally fix one button label which did not use localization at all
and update the message catalogues.
This commit is contained in:
coderkun 2019-02-17 00:03:57 +01:00
commit 202bfb424c
6 changed files with 27 additions and 26 deletions

View file

@ -3,7 +3,7 @@
import gi
gi.require_version('Gtk', '3.0')
import locale
import gettext
import logging
import urllib
@ -123,7 +123,8 @@ class Application(Gtk.Application):
def _setup_locale(self):
relpath = Environment.get_locale()
locale.bindtextdomain(Application.DOMAIN, relpath)
gettext.bindtextdomain(Application.DOMAIN, relpath)
gettext.textdomain(Application.DOMAIN)
def _load_ui(self):