Just in case it might save someone else sometime down the line...
There is a string as follows for translation:
msgid "An exit code of %i was returned from %s."
In Japanese (as well as French, it seems) the translation results in the %s
string coming before the %i number value.
Because the types of these two values are different, and the order changes
in the msgstr, msgfmt -c dies with an error.
Apparently to get around this problem you have to do this:
msgstr "%2$s から終了コード %1$i が返りました"
mark the %s as %2$s, because it was the second variable in the msgid, and
mark the %i as %1$i, because it was the first variable in the msgid.
Then msgfmt -c at least is happy - I haven't tested to see if the
translation does indeed come out correctly, but I'm assuming it will.
David Stevenson, il 21/11/2006 15:22, scrisse:
> In Japanese (as well as French, it seems) the translation results in th=
> string coming before the %i number value.
> Because the types of these two values are different, and the order chan=
> in the msgstr, msgfmt -c dies with an error.
> Apparently to get around this problem you have to do this:
> msgstr "%2$s =E3=81=8B=E3=82=89=E7=B5=82=E4=BA=86=E3=82=B3=E3=83=BC=E3=83=
=89 %1$i =E3=81=8C=E8=BF=94=E3=82=8A=E3=81=BE=E3=81=97=E3=81=9F"
many thanks, david :)
even in italian that string would look better if those variables
were swapped, but I had to reformat it to not hurt msgfmt.
Massimo Maiurana massimo<at>ragusa.linux.it
http://massimo.solira.org GPG keyID #7044D601
Articolo 11 - L'Italia ripudia la guerra come strumento di offesa
alla libert=C3=A0 degli altri popoli e come mezzo di risoluzione delle
Get latest updates about Open Source Projects, Conferences and News.