Need to set locale.textdomain under linux (#1198)

_build_popup_ui() ignores translated strings without locale.textdomain set.
This commit is contained in:
romjerome 2021-04-13 08:53:04 +02:00 committed by GitHub
parent b4b6d52306
commit c8fc88cfe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -525,6 +525,8 @@ class GrampsLocale:
# with locale instead of gettext. Win32 doesn't support bindtextdomain.
if self.localedir:
if not sys.platform == 'win32':
# bug12278, _build_popup_ui() under linux and macOS
locale.textdomain(self.localedomain)
locale.bindtextdomain(self.localedomain, self.localedir)
else:
self._win_bindtextdomain(self.localedomain.encode('utf-8'),