diff options
-rw-r--r-- | BUGS | 1 | ||||
-rw-r--r-- | apt-pkg/indexfile.cc | 7 | ||||
-rw-r--r-- | debian/changelog | 5 |
3 files changed, 9 insertions, 4 deletions
@@ -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 diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index 496e68b8b..bb2210bf6 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -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 diff --git a/debian/changelog b/debian/changelog index 2f7e5f872..83135ec08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 |