Re: Change atoi to strtol in same place
От | Alvaro Herrera |
---|---|
Тема | Re: Change atoi to strtol in same place |
Дата | |
Msg-id | 20191004153308.GA8828@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: Change atoi to strtol in same place (Joe Nelson <joe@begriffs.com>) |
Ответы |
Re: Change atoi to strtol in same place
|
Список | pgsql-hackers |
On 2019-Oct-03, Joe Nelson wrote: > Kyotaro Horiguchi wrote: > > > pg_standby: -k keepfiles could not parse 'hoge' as integer > > > > I didn't checked closely, but -k of pg_standby's message looks > > somewhat strange. Needs a separator? > > Good point, how about this: > > pg_standby: -k keepfiles: <localized error message> The wording is a bit strange. How about something like pg_standy: invalid argument to -k: %s where the %s is the error message produced like you propose: > I could have pg_strtoint64_range() wrap its error messages in _() so > that translators could customize the messages prior to concatenation. > > *error = psprintf(_("could not parse '%s' as integer"), str); ... except that they would rather be more explicit about what the problem is. "insufficient digits" or "extraneous character", etc. > Would this suffice? I hope that no callers would like to have the messages not translated, because that seems like it would become a mess. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: