diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index 1961f822e..9761f2e35 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -147,6 +147,14 @@ class GrampsLocale(object): """ return self.localedomain + def get_language_list(self): + """ + Return the list of configured languages. Used by + ViewManager.check_for_updates to select the language for the + addons descriptions. + """ + return self.language + def _get_translation(self, domain = None, localedir = None, languages=None): diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 5db4e885c..f5543f5c6 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -372,13 +372,7 @@ class ViewManager(CLIManager): from urllib.request import urlopen import locale LOG.debug("Checking for updated addons...") - langs = [] - lang = locale.getlocale()[0] # not None - if lang: - langs.append(lang) - if "_" in lang: - lang, variation = lang.split("_", 1) - langs.append(lang) + langs = glocale.get_language_list() langs.append("en") # now we have a list of languages to try: fp = None