This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 3.0 branch: POTFILES.in broken


On 12 Jun 2001, Tom Tromey wrote:

> In general it is probably better to just rewrite the code.
> Uli wrote a paper describing the various problems one might
> encounter here.  I forget where it is though.
>
> Another problem with this approach, beyond declensions and the like,
> is that it is still hard for a translator: in the PO file there will
> be a string like `%s ignored with %s in %s format', and then somewhere
> else there will be `length modifier'.  The difficulty arises when the
> translator isn't easily able to discover that these two phrases are
> related.

The point of doing things this way, rather than the 2.95

        warning ("`0' flag ignored with precision specifier and `%c' format",
                 format_char);

is that, to support extensible format checking eventually, all the
information about a particular kind of format needs to go in data
structures rather than code.  This means tables of what the flags are,
which can occur in which cases, etc..  Adding several explicit error
messages to these tables seems very ugly compared to fixing gettext.  (It
would also complicate further the specification people will eventually
have to provide in their source code for custom formats, to be translated
to the compiler's internal data structures, when extensible format
checking is implemented.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]