Re: Pasword expiration warning
| От | Peter Eisentraut |
|---|---|
| Тема | Re: Pasword expiration warning |
| Дата | |
| Msg-id | 1f4d0b80-3fea-4f4d-8d33-a652ea23e90b@eisentraut.org обсуждение исходный текст |
| Ответ на | Re: Pasword expiration warning (Nathan Bossart <nathandbossart@gmail.com>) |
| Ответы |
Re: Pasword expiration warning
|
| Список | pgsql-hackers |
On 03.02.26 16:28, Nathan Bossart wrote:
> + detail = psprintf(_("The password for role \"%s\" will expire in "
> + INT64_FORMAT " day(s), " INT64_FORMAT
> + " hour(s), " INT64_FORMAT " minute(s)."),
> + role, days, hours, minutes);
You cannot use INT64_FORMAT inside translatable messages. But you can
use PRId64.
Using the type TimestampTz for what are essentially interval/duration
quantities is a bit weird and confusing. So maybe another placeholder
would be more appropriate.
That said, I find writing plurals with "(s)" kind of lame. It's not a
good look.
It's a bit difficult to do this correctly when you have three separate
values in one string. I would consider for example just showing the
number of days if the value is larger than one day, number hours if it's
larger than one hour, else minutes. I don't think you need
minute-precision when the expiration time is several days out.
Alternatively, just print the actual expiration timestamp.
В списке pgsql-hackers по дате отправления: