some missing internationalization in pg_basebackup

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема some missing internationalization in pg_basebackup
Дата
Msg-id 1312889891.24721.27.camel@vanquo.pezone.net
обсуждение исходный текст
Ответы Re: some missing internationalization in pg_basebackup  (Magnus Hagander <magnus@hagander.net>)
Список 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 по дате отправления:

Предыдущее
От: Shigeru Hanada
Дата:
Сообщение: Re: per-column FDW options, v5
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)