Remove INT64_FORMAT in translatable strings

Поиск
Список
Период
Сортировка
Искать

Remove INT64_FORMAT in translatable strings

От:
Japin Li <japinli@hotmail.com>
Дата:
Вложения:

Hi,

I found the following lines in pg_backup_tar.c.

    if (len != th->fileLen)
    {
        char        buf1[32],
                    buf2[32];

        snprintf(buf1, sizeof(buf1), INT64_FORMAT, (int64) len);
        snprintf(buf2, sizeof(buf2), INT64_FORMAT, (int64) th->fileLen);
        fatal("actual file length (%s) does not match expected (%s)",
              buf1, buf2);
    }

we can rely on %lld/%llu and we decided to use them in translatable strings.
See 6a1cd8b.

However, I am not sure how to update the *.po files under the pg_dump/po
directory. Any suggestions?

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

Re: Remove INT64_FORMAT in translatable strings

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Japin Li  writes:
> we can rely on %lld/%llu and we decided to use them in translatable strings.

Seems like good cleanup, so pushed.  I think though that project style
is to use "long long" or "unsigned long long", without the unnecessary
"int" --- it certainly makes little sense to do it both ways in the
same patch.

> However, I am not sure how to update the *.po files under the pg_dump/po
> directory. Any suggestions?

The translation team manages those files.  We don't normally touch them
during code development.

			regards, tom lane


Re: Remove INT64_FORMAT in translatable strings

От:
Justin Pryzby <pryzby@telsasoft.com>
Дата:
On Fri, Mar 18, 2022 at 01:12:40PM -0400, Tom Lane wrote:
> Japin Li  writes:
> > we can rely on %lld/%llu and we decided to use them in translatable strings.
> 
> Seems like good cleanup, so pushed.  I think though that project style
> is to use "long long" or "unsigned long long", without the unnecessary
> "int" --- it certainly makes little sense to do it both ways in the
> same patch.

This seemed familiar - it's about the same thing I sent here, while fixing
ftello().

https://www.postgresql.org/message-id/flat/20210104025321.GA9712@telsasoft.com
0002-Fix-broken-error-message-on-unseekable-input.patch

-- 
Justin


Re: Remove INT64_FORMAT in translatable strings

От:
Japin Li <japinli@hotmail.com>
Дата:

On Sat, 19 Mar 2022 at 01:12, Tom Lane  wrote:
> Japin Li  writes:
>> we can rely on %lld/%llu and we decided to use them in translatable strings.
>
> Seems like good cleanup, so pushed.  I think though that project style
> is to use "long long" or "unsigned long long", without the unnecessary
> "int" --- it certainly makes little sense to do it both ways in the
> same patch.
>
>> However, I am not sure how to update the *.po files under the pg_dump/po
>> directory. Any suggestions?
>
> The translation team manages those files.  We don't normally touch them
> during code development.
>

Thank you for pushing the patch.


--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.


FAQ