[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#223558: /usr/bin/apt-get: [i18n] missing space between numbers and units name



On Wed, Dec 10, 2003 at 02:14:55PM +0100, Mathieu Roy wrote:
> Package: apt
> Version: 0.5.14
> Severity: minor
> File: /usr/bin/apt-get
> 
> There is no space between numbers and units. For instance, I get in French
> 	"Il est nécessaire de prendre 0o/14,0Mo dans les archives."
> instead of 
> 	"Il est nécessaire de prendre 0 o/14,0 Mo dans les archives."
> 				      ^^^    ^^^	
> 
> It may be just an error from the French translator that missed rules of French punctuation (space are required between numbers and units, unlike in English).
> It may be an error from the developer, if the gettext string is just the unit (like gettext("ko")), and not something like gettext(sprintf("%s ko", $value")), like it should be -- the only way to manage correctly punctuation.

AFAIK the space is required in english too: 'According to The Chicago
Manual of Style and the National Institute of Standards and
Technology, "the unit symbol is placed after the numerical value and a
space is left between the numerical value and the unit symbol."'
(thanks to Alexander Winston for this info).

I think this is caused by the SizeToStr() implementation of apt:
-----------------------------8<----------------------------------------
--- strutl.cc.orig      2003-12-11 01:45:59.000000000 +0100
+++ strutl.cc   2003-12-11 01:50:01.000000000 +0100
@@ -264,13 +264,13 @@
    {
       if (ASize < 100 && I != 0)
       {
-         sprintf(S,"%.1f%c",ASize,Ext[I]);
+         sprintf(S,"%.1f %c",ASize,Ext[I]);
         break;
       }
       
       if (ASize < 10000)
       {
-         sprintf(S,"%.0f%c",ASize,Ext[I]);
+         sprintf(S,"%.0f %c",ASize,Ext[I]);
         break;
       }
       ASize /= 1000.0;
-----------------------------8<----------------------------------------

This diff may be enough (not tested).

bye,
 Michael

-- 
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo



Reply to: