]> git.saurik.com Git - apt.git/commitdiff
* fix languages like pt_PT, pt_BR, zh_CN by special casing
authorMichael Vogt <egon@bottom>
Tue, 6 Jun 2006 17:38:22 +0000 (19:38 +0200)
committerMichael Vogt <egon@bottom>
Tue, 6 Jun 2006 17:38:22 +0000 (19:38 +0200)
BUGS
apt-pkg/indexfile.cc
debian/changelog

diff --git a/BUGS b/BUGS
index 6bbc6f839961bbd98f528781e8b457e59708414a..a7b6b111472666382e282317168bb39024bf2f40 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -6,3 +6,4 @@ DDTP problems:
   enviroment or Translations apt variable
 - there needs to be a list of locales (pt, sv, en) that need
   both language and country code to get the right file
+  (is in the code in indexfile::LanguageCode(), just a bit ugly 
index 496e68b8bbd3945a9db2215c9c192caaddf9e763..bb2210bf677cebcaf64516fa86bd0ce1b9d1c62c 100644 (file)
@@ -113,11 +113,14 @@ string pkgIndexFile::LanguageCode()
   {
      string lang = std::setlocale(LC_MESSAGES,NULL);
 
-     // FIXME: this needs to be added
      // we have a mapping of the language codes that contains all the language
      // codes that need the country code as well 
      // (like pt_BR, pt_PT, sv_SE, zh_*, en_*)
-
+     char *need_full_langcode[] = { "pt","sv","zh","en", NULL };
+     for(char **s = need_full_langcode;*s != NULL; s++)
+       if(lang.find(*s) == 0)
+          return lang.substr(0,5);
+     
      if(lang.size() > 2)
        return lang.substr(0,2);
      else
index 2f7e5f872bb6124e8bccea5fd57c4b9e005f5598..83135ec08d2065ae05ee03bbf3d794cd440474cb 100644 (file)
@@ -3,8 +3,10 @@ apt (0.6.44.1exp1) experimental; urgency=low
   * added support for i18n of the package descriptions
   * synced with the http://people.debian.org/~mvo/bzr/apt/debian-sid branch
   * build from http://people.debian.org/~mvo/bzr/apt/debian-experimental
+  * merged patch from Otavio (thanks!) to better support translations
+    that need the full language-code (like pt_BR)
   
- -- Michael Vogt <mvo@debian.org>  Wed,  1 Mar 2006 13:34:15 +0100
+ -- Michael Vogt <mvo@debian.org>  Tue,  6 Jun 2006 19:31:31 +0200
 
 apt (0.6.44.1) unstable; urgency=low
 
@@ -313,7 +315,6 @@ apt (0.6.38) unstable; urgency=low
   
  -- Matt Zimmerman <mdz@debian.org>  Sat, 25 Jun 2005 09:51:00 -0700
 
->>>>>>> MERGE-SOURCE
 apt (0.6.37) breezy; urgency=low
 
   * Merge bubulle@debian.org--2005/apt--main--0 up to patch-81