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]
Other format: [Raw text]

[PATCH] gettext support for GCC 4.0 internal format, fix for PR translation/21364


(Resent with bzipped patch, wonder if it is otherwise considered spam):

On Tue, May 17, 2005 at 01:46:30PM +0000, Joseph S. Myers wrote:
> Once there's a gettext release supporting GCC 4 formats (NB that %' is a 
> format which is not expected to appear in the translated messages, only 
> the untranslated ones, and as %< %> %' don't format any arguments it 
> doesn't really matter whether they match in translated/untranslated 
> formats; they can be handled like %%), I see no problem with updating 
> install.texi regarding the required gettext version, patching exgettext 
> (mainline and 4.0) and regenerating gcc.pot.

Ok, I wrote the necessary gettext support for the newly intoduced format
string stuff and then run it over current po/ files.

The second attachment is the gettext patch.

ftp://sunsite.mff.cuni.cz/private/gcc-l10n/l10n-bugs.bz2
contains all errors it found (well, if there is already one bug reported
for a msgid/msgstr pair, I have not included the rest of bugs), including
fuzzy strings.  Note that I have just used --language=GCC-source and
current --keyword= machinery, so it won't catch bugs where a msgid used
in varargish functions, but not using any va_arg, is translated into a
format string that needs va_arg.

The first patch is a patch against current GCC CVS (applies to both
HEAD and 4.0 branch), that fixes bugs that happen in non-fuzzy strings.
These are very serious bugs, as they usually crash the compiler, so IMHO we
should apply this immediately, then talk to @li.org teams.
Where the solution was obvious, I have fixed the format string, where
it was not obvious, I have added ", fuzzy", so that it will not be
used in *.gmo files and translators can check it out.

BTW, shouldn't we implement %n$ style arguments in addition to % ones?
It seems e.g. several turkish translations relied on this...

2005-05-18  Jakub Jelinek  <jakub@redhat.com>

        PR translation/21364
        * de.po: Fix errors in format specifiers or make translations
        fuzzy if non-obvious.
        * es.po: Likewise.
        * tr.po: Likewise.
        * zh_CN.po: Likewise.

	Jakub

Attachment: gcc41-po-fixes.patch.bz2
Description: BZip2 compressed data

Attachment: gettext-0.14.3-gcc4-internal-format.patch
Description: Text document


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