[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] .po files and xrc: % vs. %%



Hi Alex,

Alex Bligh wrote:
>> msgid   "Compressed, retaining #1%d% of image quality<BR>\\r\\n"
>>     <label>Compressed, retaining #1%d%% of image
I'll add this to the bugreport.

>> "#, c-format" flag before those lines.
>> Please make sure that all printf statements contain such a flag as
>> msgfmt can use this for error checking.
> I don't control those. wxrc puts them in. It isn't printf anyway,
> they are passed /to/ MakeMsg and there is no way from the resources
> alone of knowing which strings are passed to MakeMsg and which aren't.
> So (for instance) "100%%" might be a literal, or might be passed
> to MakeMsg.
Well, this is the reason msgfmt only checks those with "#, c-format".

> But it should not present a problem: the output string needs the same
> number of percent signs as the input string!
Yes, but while translating it is easy to overlook a "%s" or mix "%d" and
"%s" etc.
Thus the msgfmt checking is nice. But this only happens for "#,
c-format" flagged strings.
Having a .po file with 5692 strings doesn't make things easier for
checking manually.
But granted, this is only a nice-to-have whereas the %%-to-% issue is
really a bug.

> It looks like rewriting wxrc is the easiest route (sigh). Sadly I'm
> not going
> to have the time to do that for a few days.
No problem. When it is solved, one has only to correct a few fuzzy msgstrs.

Tobias