Explorar o código

* apt-pkg/indexfile.cc:
- fix problem overwriting APT::Acquire::Translation
* doc/examples/configure-index:
- document APT::Acquire::Translation

Michael Vogt %!s(int64=19) %!d(string=hai) anos
pai
achega
90ff41f8a6
Modificáronse 5 ficheiros con 11 adicións e 7 borrados
  1. 2 2
      apt-pkg/indexfile.cc
  2. 0 3
      apt-pkg/init.cc
  3. 4 0
      debian/changelog
  4. 3 0
      doc/examples/configure-index
  5. 2 2
      po/apt-all.pot

+ 2 - 2
apt-pkg/indexfile.cc

@@ -75,7 +75,7 @@ string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
 /* */
 bool pkgIndexFile::TranslationsAvailable()
 {
-  const string Translation = _config->Find("APT::Acquire::Translation");
+  const string Translation = _config->Find("APT::Acquire::Translation", "environment");
   
   if (Translation.compare("none") != 0)
     return CheckLanguageCode(LanguageCode().c_str());
@@ -107,7 +107,7 @@ bool pkgIndexFile::CheckLanguageCode(const char *Lang)
 /* return the language code */
 string pkgIndexFile::LanguageCode()
 {
-  const string Translation = _config->Find("APT::Acquire::Translation");
+  const string Translation = _config->Find("APT::Acquire::Translation", "environment");
 
   if (Translation.compare("environment") == 0) 
   {

+ 0 - 3
apt-pkg/init.cc

@@ -106,9 +106,6 @@ bool pkgInitConfig(Configuration &Cnf)
    }
 #endif
 
-   // Translation
-   Cnf.Set("APT::Acquire::Translation", "environment");
-   
    return true;
 }
 									/*}}}*/

+ 4 - 0
debian/changelog

@@ -11,6 +11,10 @@ apt (0.6.46.4ubuntu9) feisty; urgency=low
     - fix version output in autoremove list (LP#68941)
   * apt-pkg/packagemanager.cc:
     - do not spin 100% cpu in FixMissing() (LP#84476)
+  * apt-pkg/indexfile.cc:
+    - fix problem overwriting APT::Acquire::Translation
+  * doc/examples/configure-index:
+    - document APT::Acquire::Translation
   
  -- 
 

+ 3 - 0
doc/examples/configure-index

@@ -191,6 +191,9 @@ Acquire
    // mirror failure reporting url
    ReportFailures "http://example.com/mirror-failure"; 
   };
+
+  // translations can be set here to "none", "environment" or "$locale"
+  Translation "none";
 };
 
 // Directory layout

+ 2 - 2
po/apt-all.pot

@@ -2294,12 +2294,12 @@ msgstr ""
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgstr ""
 
-#: apt-pkg/init.cc:126
+#: apt-pkg/init.cc:123
 #, c-format
 msgid "Packaging system '%s' is not supported"
 msgstr ""
 
-#: apt-pkg/init.cc:142
+#: apt-pkg/init.cc:139
 msgid "Unable to determine a suitable packaging system type"
 msgstr ""