Просмотр исходного кода

* 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

Michael Vogt лет назад: 16
Родитель
Сommit
93bf52f9fc
2 измененных файлов с 7 добавлено и 0 удалено
  1. 2 0
      apt-pkg/indexfile.cc
  2. 5 0
      debian/changelog

+ 2 - 0
apt-pkg/indexfile.cc

@@ -126,6 +126,8 @@ string pkgIndexFile::LanguageCode()
      
      
      if(lang.find("_") != lang.npos)
      if(lang.find("_") != lang.npos)
 	return lang.substr(0, lang.find("_"));
 	return lang.substr(0, lang.find("_"));
+     else if(lang.find(".") != lang.npos)
+	return lang.substr(0, lang.find("."));
      else
      else
 	return lang;
 	return lang;
   }
   }

+ 5 - 0
debian/changelog

@@ -6,6 +6,11 @@ apt (0.7.25.3ubuntu8) lucid-proposedUNRELEASED; urgency=low
   [ Michael Vogt ]
   [ Michael Vogt ]
   * apt-pkg/deb/debrecords.cc:
   * apt-pkg/deb/debrecords.cc:
     - fix max tag buffer size (LP: #545336, closes: #578959)
     - fix max tag buffer size (LP: #545336, closes: #578959)
+  * 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
 
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 05 May 2010 09:57:53 +0200
  -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 05 May 2010 09:57:53 +0200