[Bug 6222]: Get the addons language list from the primary

GrampsLocale instance.

svn: r21145
This commit is contained in:
John Ralls 2013-01-17 19:47:21 +00:00
parent ef6892abbd
commit ef7e047b4b
2 changed files with 9 additions and 7 deletions

View File

@ -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):

View File

@ -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