diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-14 15:27:46 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-14 15:27:46 +0200 |
commit | 3e3dfc40aa9466ca49665c26cb970e5527c3fb4c (patch) | |
tree | eac6145f22ba8b4006cbd988a4131baea3a22eb0 /apt-pkg/pkgcache.cc | |
parent | c9cc3fab3c71f64aaea1192711efc454f43a78b1 (diff) |
* apt-pkg/pkgcache.cc:
- always prefer "en" over "" for "en"-language regardless of cache-order
(LP: #868977)
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-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 07d85377d..75f925991 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -893,11 +893,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(); |