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

GrampsLocale instance.

svn: r21393
This commit is contained in:
John Ralls 2013-02-24 00:51:38 +00:00
parent e28e114c95
commit 221c30976f
2 changed files with 9 additions and 7 deletions

View File

@ -147,6 +147,14 @@ class GrampsLocale(object):
""" """
return self.localedomain 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, def _get_translation(self, domain = None,
localedir = None, localedir = None,
languages=None): languages=None):

View File

@ -372,13 +372,7 @@ class ViewManager(CLIManager):
from urllib.request import urlopen from urllib.request import urlopen
import locale import locale
LOG.debug("Checking for updated addons...") LOG.debug("Checking for updated addons...")
langs = [] langs = glocale.get_language_list()
lang = locale.getlocale()[0] # not None
if lang:
langs.append(lang)
if "_" in lang:
lang, variation = lang.split("_", 1)
langs.append(lang)
langs.append("en") langs.append("en")
# now we have a list of languages to try: # now we have a list of languages to try:
fp = None fp = None