Translation of plural string in English with spaces
Josep M. Ferrer
txemaq at saragata.net
Thu Jan 6 09:54:56 GMT 2022
El 5/1/22 a les 21:07, Johnny Jazeix ha escrit:
> Hi,
>
> for GCompris we have one complicated sentence to translate:
> "Place %n boy(s) and %n girl(s) in the center. Then split %n pieces of
> candy equally between them." (context in this image:
> https://gcompris.net/screenshots_qt/middle/share.png)
>
> There are mixed plurals and to have the plural correctly translated we
> use:
> //~ singular Place %n boy
> //~ plural Place %n boys
> text = qsTr("Place %n boy(s) ", "First part of Place %n boy(s)
> and %n girl(s) in the center. Then split %n pieces of candy equally
> between them.", boys);
>
> //~ singular and %n girl in the center.
> //~ plural and %n girls in the center.
> text += qsTr("and %n girl(s) in the center. ", "Second part of
> Place %n boy(s) and %n girl(s) in the center. Then split %n pieces of
> candy equally between them.", girls);
>
> //~ singular Then split %n candy equally between them.
> //~ plural Then split %n candies equally between them.
> text += qsTr("Then split %n pieces of candy equally between
> them.", "Third part of Place %n boy(s) and %n girl(s) in the center.
> Then split %n pieces of candy equally between them.", candies);
>
> For American English, it takes the string from the " //~
> singular/plural " lines.
> The issue we have is that we don't manage to have the extra space in
> the English translation at the end of "boy(s) " (same if we put the
> space at the beginning of the other part to translate (" and %n
> girl(s))").
>
> If we add double quotes, they are part of the translation. And if we
> have an extra space at the end, it is removed.
>
> Is there a way to handle it properly in the code or even reformulate
> the sentence to make it work more easily while keeping the meaning?
>
> I'm cc-ing multiple list because, in the ideal, we'd like to fix the
> code without impacting the string for the next release but we can have
> a better string for after.
>
> Cheers,
>
> Johnny
Hi,
Instead "boys" and "girls", can we use a more neutral gender like
"kids"? And then this problem is gone :)
Best regards,
Josep M. Ferrer
More information about the kde-i18n-doc
mailing list