On Thu, Jul 19, 2018 at 8:26 PM Junio C Hamano <gits...@pobox.com> wrote:
> > @@ -601,7 +601,7 @@ static void dos_time(timestamp_t *timestamp, int 
> > *dos_date, int *dos_time)
> >       struct tm *t;
> >
> >       if (date_overflows(*timestamp))
> > -             die("timestamp too large for this system: %"PRItime,
> > +             die(_("timestamp too large for this system: %"PRItime),
> >                   *timestamp);
>
> I suspect that this won't do the right "cross-platform" thing.  For
> built-in PRItype formats gettext tool knows about, *.po files let
> translators translate original with "%<PRItype>" into localized text
> with the same "%<PRItype>" left, and the runtime does the right
> thing, but for a custom format like PRItime there is no such
> support.
>

It turns out gettext is smart! I got this in git.pot

msgid "timestamp too large for this system: %<PRIuMAX>"

Your second half about the runtime does cause cross platform problems,
luckily PRItime is always defined as PRIuMAX for all platforms, so
gettext should be able to do the right thing.

Besides, PRItime has already been wrapped in _() and Q_() in many
places. If people have not screamed now, they probably don't care
about l10n on that platform.
-- 
Duy

Reply via email to