This is the mail archive of the gcc@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]

Re: Problems with message translations (was: c++/7765)


Wolfgang Bangerth <bangerth@ticam.utexas.edu> writes:

|> The problem with c++/7765 was that in the original and the translated 
|> message, not the same %-formats were used (in fact, the format in the 
|> translation was invalid). I thought this might happen more often, so wrote 
|> a small script (appended) that checks whether the same formats are used in 
|> both messages, and whether they are in the same order. The result is 
|> somewhat negative: there are about 2000 violations in the translations :-(
|> I guess that at least of them could lead to errors like PR 7765.
|> 
|> I don't think that I can do more about it, but maybe someone can use the 
|> script for further investigations.
|> 
|> Regards
|>   Wolfgang
|> 
|> PS1: Here's the script. Call it like "perl check.pl da.po" or whatever 
|> message catalog you want to check.
|> 
|> $filename = $ARGV[0];
|> open (IN, $filename);
|> 
|> $line = 0;
|> while (<IN>) {
|>     ++$line;
|> 
|>     # get a msgid line and the corresponding msgstr
|>     next if (! (/^msgid\s*\"(.*)\"/));

Note that msgids can be split across lines, so this probably won't catch
all of them.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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