some missing internationalization in pg_basebackup - Mailing list pgsql-hackers

From Peter Eisentraut
Subject some missing internationalization in pg_basebackup
Date
Msg-id 1312889891.24721.27.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: some missing internationalization in pg_basebackup
List pgsql-hackers
I noticed that the progress reporting code in pg_basebackup does not
allow for translation.  This would normally be easy to fix, but this
code has a number of tricky issues, including the INT64_FORMAT, possibly
some plural concerns, and some space alignment issues that hidden in
some of those hardcoded numbers.

I'm just posting it here as an open item in case someone has some ideas
in the meantime.


static void
progress_report(int tablespacenum, char *fn)
{   int         percent = (int) ((totaldone / 1024) * 100 / totalsize);
   if (percent > 100)       percent = 100;
   if (verbose)   {       if (!fn)
           /*            * No filename given, so clear the status line (used for last            * call)            */
        fprintf(stderr,                   INT64_FORMAT "/" INT64_FORMAT " kB (100%%) %d/%d tablespaces %35s\r",
         totaldone / 1024, totalsize,                   tablespacenum, tablespacecount, "");       else
fprintf(stderr,                  INT64_FORMAT "/" INT64_FORMAT " kB (%d%%) %d/%d tablespaces (%-30.30s)\r",
     totaldone / 1024, totalsize,                   percent,                   tablespacenum, tablespacecount, fn);   }
 else       fprintf(stderr, INT64_FORMAT "/" INT64_FORMAT " kB (%d%%) %d/%d tablespaces\r",               totaldone /
1024,totalsize,               percent,               tablespacenum, tablespacecount);
 
}



pgsql-hackers by date:

Previous
From: Shigeru Hanada
Date:
Subject: Re: per-column FDW options, v5
Next
From: Heikki Linnakangas
Date:
Subject: Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)