Browse Source

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

debian/1.8.y
Michael Vogt 11 years ago
parent
commit
64c2bdc9cf
  1. 5
      apt-pkg/deb/debindexfile.cc

5
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);

Loading…
Cancel
Save