Problems translating some strings
Kevin Godby
godbyk at gmail.com
Mon Mar 24 23:41:27 UTC 2014
Hello, Ibai.
On Mon, Mar 24, 2014 at 6:19 PM, Ibai Oihanguren Sala
<ibai at oihanguren.com> wrote:
> 2.- This one has happened many times, but as an example:
> https://translations.launchpad.net/ubuntu/trusty/+source/transmission/+pots/transmission/eu/279/+translate
>
> As the info text says, %3$s%% is a percentage.
> In Basque, percentages are written this way: %25 (unlike English, or other
> languages, 25%), so, the correct translation of the string should be:
>
> "%1$s %2$setik (%%3$s%)"
>
> But I get this error:
>
> "'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the
> directive number 4, the character ')' is not a valid conversion specifier."
Try (%%%3$s) instead.
The original English string would appear as, for example: 5 of 10 (50%)
%1$s is replaced by the first number (5), %2$s is replaced by the
second number (10), and %3$s is replaced by the third number (50).
The final %% just prints the percent sign (%).
So if you want to print the percent sign before the number, then move
the %% to the beginning: %%%3$s. The first two %% will print a
percent sign, then the remaining %3$s will print the number.
(These format strings get to be pretty confusing, don't they?)
--Kevin
More information about the ubuntu-translators
mailing list