[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Re: [PATCH] I18n flag for msgfmt]
From: |
Behdad Esfahbod |
Subject: |
Re: address@hidden: Re: [PATCH] I18n flag for msgfmt] |
Date: |
Wed, 7 Jan 2004 06:46:18 -0500 |
On Tue, 6 Jan 2004, Paul Eggert wrote:
> Behdad Esfahbod <address@hidden> writes:
> > Note: As a consequence, software developers should call gettext
> > on all of their singleton "%d" format strings too.
>
> That goes a bit too far, as "%d" is sometimes correct regardless of
> locale. For example, POSIX requires that plain "diff" must use %d for
> line numbers, regardless of locale. This makes it easier for a user
> in one locale to send a patch to a user in another locale.
Actually I don't agree here for a few reasons:
* Diff is a text utility, and <b>when using diff with Persian
messages</b> better you get Persian digits.
* Patches should be made by LANG=C diff. You already get the
date in Persian.
> > The question is where should we start the fix? Bottom-up, adding
> > support in glibc first, or no way, we should go the hard way, add it
> > in POSIX first, glic later?
>
> I'd say glibc first. %I isn't in POSIX yet, is it? At any rate the
> POSIX folks prefer to have implementations first.
So patches would come in :).
> On a related issue, many applications do not use %d to print numbers,
> so %Id won't suffice for them. For example, there's no portable way
> to print off_t values using printf (until we can assume C99
> everywhere), so many applications use their own code that divide by 10
> and print the off_t values directly. If gettext were to support the
> C99 printf formats (even on non-C99 hosts), that would address much of
> this problem, but it raises other problems and I worry that we may be
> trying to fold too much functionality into gettext.
Well, of course it's not, but those applications can be assumed
as needing internationalization work. And I can't find any
reasonable example that you want to write such a weird variable
type (off_t, ...) with Persian numerals. They should rarely
happen in typical applications that people like to see
translated.
behdad