summaryrefslogtreecommitdiff
path: root/apt-pkg/indexfile.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-05-05 10:16:02 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-05-05 10:16:02 +0200
commit93bf52f9fc5535f6763a50f7d025d83abd11f38e (patch)
tree58a998b5ff7ccc6375826c09b2bb0021734f3a21 /apt-pkg/indexfile.cc
parenteea96cc7c1092f96c5929876608d09d9af292954 (diff)
* apt-pkg/indexfile.cc:
- If no "_" is found in the language code, try to find a "." This is required for languages like Esperanto that have no county associated with them (LP: #560956) Thanks to "Aisano" for the fix
Diffstat (limited to 'apt-pkg/indexfile.cc')
-rw-r--r--apt-pkg/indexfile.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 9b85a8cf8..2f5bc2439 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -126,6 +126,8 @@ string pkgIndexFile::LanguageCode()
if(lang.find("_") != lang.npos)
return lang.substr(0, lang.find("_"));
+ else if(lang.find(".") != lang.npos)
+ return lang.substr(0, lang.find("."));
else
return lang;
}