[Bug 6222]: Get the addons language list from the primary
GrampsLocale instance. svn: r21145
This commit is contained in:
parent
ef6892abbd
commit
ef7e047b4b
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user