From: Michael Vogt Date: Thu, 9 Jun 2011 11:24:36 +0000 (+0200) Subject: apt-pkg/deb/debindexfile.cc: remove tests for TranslationsAvailable() as this will... X-Git-Tag: 0.8.15~3^2~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/64c2bdc9cfa77d05143aec6d744a3b65b4bb6cd7?ds=sidebyside;hp=--cc apt-pkg/deb/debindexfile.cc: remove tests for TranslationsAvailable() as this will break adding translations to the cache if the current environment does not include the language (e.g. LANG=C but german translations). testing for existance of the file is the better approach --- 64c2bdc9cfa77d05143aec6d744a3b65b4bb6cd7 diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 1e8c04033..1d828c144 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -468,9 +468,6 @@ string debTranslationsIndex::Info(const char *Type) const /*}}}*/ bool debTranslationsIndex::HasPackages() const /*{{{*/ { - if(!TranslationsAvailable()) - return false; - return FileExists(IndexFile(Language)); } /*}}}*/ @@ -510,7 +507,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const { // Check the translation file, if in use string TranslationFile = IndexFile(Language); - if (TranslationsAvailable() && FileExists(TranslationFile)) + if (FileExists(TranslationFile)) { FileFd Trans(TranslationFile,FileFd::ReadOnlyGzip); debListParser TransParser(&Trans);