def getMissingLangPacks(self): """ return a list of language packs that are not installed but should be installed """ if self._datadir: ls = language_support_pkgs.LanguageSupport( self._cache, os.path.join(self._datadir, "data", "pkg_depends")) else: ls = language_support_pkgs.LanguageSupport(self._cache) return ls.by_locale(self._localeinfo.getSystemDefaultLanguage()[0])
def getMissingLangPacks(self): """ return a list of language packs that are not installed but should be installed """ if self._datadir: ls = language_support_pkgs.LanguageSupport( self._cache, os.path.join(self._datadir, "data", "pkg_depends")) else: ls = language_support_pkgs.LanguageSupport(self._cache) missing = [] for pack in ls.missing(): # ls.missing() returns a set; we need a list missing.append(pack) return missing
def __init__(self, localeinfo, progress): apt.Cache.__init__(self, progress) if self._depcache.broken_count > 0: raise ExceptionPkgCacheBroken() self._localeinfo = localeinfo self.lang_support = language_support_pkgs.LanguageSupport(self)