diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-10-12 22:28:46 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-10-12 22:28:46 +0200 |
commit | 0e7c33134cd32410eb8b344c6b6577826238bbbc (patch) | |
tree | c3084e6e2fe1383d9ba0d88c52135c1e2af8e3ba /apt-pkg | |
parent | 5a8e963bbbbc689d7b1a1ebfa4ab5c6ec1f716bb (diff) |
* apt-pkg/pkgcache.cc:
- always prefer "en" over "" for "en"-language regardless of cache-order
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/pkgcache.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 40b99891a..c854249e4 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -894,11 +894,22 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const { pkgCache::DescIterator Desc = DescriptionList(); for (; Desc.end() == false; ++Desc) - if (*l == Desc.LanguageCode() || - (*l == "en" && strcmp(Desc.LanguageCode(),"") == 0)) + if (*l == Desc.LanguageCode()) break; if (Desc.end() == true) - continue; + { + if (*l == "en") + { + Desc = DescriptionList(); + for (; Desc.end() == false; ++Desc) + if (strcmp(Desc.LanguageCode(), "") == 0) + break; + if (Desc.end() == true) + continue; + } + else + continue; + } return Desc; } for (pkgCache::DescIterator Desc = DescriptionList(); |