* apt-pkg/indexfile.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 3 May 2010 08:07:13 +0000 (10:07 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 3 May 2010 08:07:13 +0000 (10:07 +0200)
  - 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

apt-pkg/indexfile.cc
debian/changelog

index 34fd71b..5a82b7b 100644 (file)
@@ -127,6 +127,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;
   }
index 5211fc6..7c00241 100644 (file)
@@ -36,6 +36,11 @@ apt (0.7.25.4) UNRELEASED; urgency=low
       the right cache control headers
   * apt-pkg/depcache.cc:
     - fix incorrect std::cout usage for debug output
+  * 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
 
   [ Robert Collins ]
   * Change the package index Info methods to allow apt-cache policy to be