Explorar o código

* apt-pkg/contrib/strutl.cc:
- fix TimeToStr i18n (LP: #289807)

Michael Vogt %!s(int64=17) %!d(string=hai) anos
pai
achega
38e00525e6
Modificáronse 2 ficheiros con 11 adicións e 5 borrados
  1. 9 5
      apt-pkg/contrib/strutl.cc
  2. 2 0
      debian/changelog

+ 9 - 5
apt-pkg/contrib/strutl.cc

@@ -331,23 +331,27 @@ string TimeToStr(unsigned long Sec)
    {
       if (Sec > 60*60*24)
       {
-	 sprintf(S,"%lid %lih%limin%lis",Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60);
+	 //d means days, h means hours, min means minutes, s means seconds
+	 sprintf(S,_("%lid %lih %limin %lis"),Sec/60/60/24,(Sec/60/60) % 24,(Sec/60) % 60,Sec % 60);
 	 break;
       }
       
       if (Sec > 60*60)
       {
-	 sprintf(S,"%lih%limin%lis",Sec/60/60,(Sec/60) % 60,Sec % 60);
+	 //h means hours, min means minutes, s means seconds
+	 sprintf(S,_("%lih %limin %lis"),Sec/60/60,(Sec/60) % 60,Sec % 60);
 	 break;
       }
       
       if (Sec > 60)
       {
-	 sprintf(S,"%limin%lis",Sec/60,Sec % 60);
+	 //min means minutes, s means seconds
+	 sprintf(S,_("%limin %lis"),Sec/60,Sec % 60);
 	 break;
       }
-      
-      sprintf(S,"%lis",Sec);
+
+      //s means seconds
+      sprintf(S,_("%lis"),Sec);
       break;
    }
    

+ 2 - 0
debian/changelog

@@ -33,6 +33,8 @@ apt (0.7.21) UNRELEASED; urgency=low
       and show a message (LP: #202219)
   * apt-pkg/deb/debsystem.cc:
     - make strings i18n able 
+  * apt-pkg/contrib/strutl.cc:
+    - fix TimeToStr i18n (LP: #289807)
 
   [ Dereck Wonnacott ]
   * apt-ftparchive might write corrupt Release files (LP: #46439)