I have a language specific question about the checks in Pootle/Verbatim.
Currently the problem is in the AMO translation but it can happen anywhere.
An example is https://localize.mozilla.org/ku/amo/translate.html?unit=815354
The original string is "{0} star" in singular and "{0} stars" in plural.
The correct Kurdish translation for the singular would be "Stêrkek" for the
singular and "{0} stêrk" for the plural.
The problem is the singular, there would be no number ("1") in the
translation, therefore I'd leave the variable {0} out. Verbatim of course
tells me that all kinds of checks fail in this case. Since this is XML I am
unsure whether this may break something seriously.
Who knows more?
Erdal
--
Mozilla Firefox 4 a kurdî:
https://www.mozilla.com/en-US/firefox/all-beta.html#ku. Niha daxe.
Dwayne
This means: the {0} can't be dropped, we need to have it somehow in the
translation, right?
Erdal
I'm afraid so. Would you mind commenting in bug 628746 [1] with your
specific case of "1 star" not needing the number?
I also wonder if that's an l10n bug. If the singular is "{0} star"
then {0} is bound to be equal to 1, and so this could be written simply
as "1 star".
I'll try to file a bug for that.
-stas
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=628746
--
Staś Małolepszy
+48 600 462 291
It does get written like 1 star, for Crissake, it's the language rule
that does it. It's not a bug, it's a feature.
If one could write 1 star, then in SL (N=4 rule) one could just as
well ask to be allowed 2 zvezdi in dual instead of {0} zvezdi, and 3
zvezde, 4 zvezde plus the finall {0} zvezd in plural. That would make
all those language-rules implementors mad (because they would have to
adjust) and maybe happy too (because they would have something to do
again).
Let's be reasonable. I use editor to propagate the alternatives:
msgstr[0] "{0} zvezda"
msgstr[1] "{0} zvezdi"
msgstr[2] "{0} zvezde"
msgstr[3] "{0} zvezde"
msgstr[4] "{0} zvezd"
Check the suggested alternative:
msgstr[0] "1 zvezda"
msgstr[1] "2 zvezdi"
msgstr[2] "3 zvezde"
msgstr[3] "4 zvezde"
msgstr[4] "{0} zvezd"
Regards
smo
smo, Wed Feb 02 07:20:57 +0100 2011:
> On Jan 31, 8:16 pm, Staś Małolepszy <s...@mozilla.com> wrote:
> > Erdal Ronahi, Mon Jan 31 17:53:49 +0100 2011:
> >
> > > This means: the {0} can't be dropped, we need to have it somehow in
> > > the translation, right?
> >
> > I'm afraid so. Would you mind commenting in bug 628746 [1] with your
> > specific case of "1 star" not needing the number?
> >
> > I also wonder if that's an l10n bug. If the singular is "{0} star"
> > then {0} is bound to be equal to 1, and so this could be written simply
> > as "1 star".
>
> It does get written like 1 star, for Crissake, it's the language rule
> that does it. It's not a bug, it's a feature.
It ends up being displayed as "1 star" thanks to the language's plural
rule, but the string reads "{0} star". What I was wondering out loud
is, whether it would make sense to make the string simply read "1 star"
in the singular form, because {0} is always 1.
The goal here would be to prevent Verbatim from showing you errors
about the mgid having a number ("0") and the translation missing it
(Erdal's example).
However, I'd have to test this first and see how Verbatim would handle
such strings.
> If one could write 1 star, then in SL (N=4 rule) one could just as
> well ask to be allowed 2 zvezdi in dual instead of {0} zvezdi, and 3
> zvezde, 4 zvezde plus the finall {0} zvezd in plural. That would make
> all those language-rules implementors mad (because they would have to
> adjust) and maybe happy too (because they would have something to do
> again).
>
> Let's be reasonable. I use editor to propagate the alternatives:
>
> msgstr[0] "{0} zvezda"
> msgstr[1] "{0} zvezdi"
> msgstr[2] "{0} zvezde"
> msgstr[3] "{0} zvezde"
> msgstr[4] "{0} zvezd"
>
> Check the suggested alternative:
>
> msgstr[0] "1 zvezda"
> msgstr[1] "2 zvezdi"
> msgstr[2] "3 zvezde"
> msgstr[3] "4 zvezde"
> msgstr[4] "{0} zvezd"
Hmm, that's not exactly how the plurals macro works, actually. Given
a number (here, that would be the number of stars), it returns the
index of the plurals form to be used. In case of Slovene (n=4), 0 is
the singular, 1 is the dual, 2 is the plural form for 3 and 4, and 3 is
the plural from for other numbers.
A correct example would be something like this:
msgstr[0] "{0} zvezda"
msgstr[1] "{0} zvezdi"
msgstr[2] "{0} zvezde"
msgstr[3] "{0} zvezd"
Now, the point I was making was that in some of the forms, we don't
actually need the placable {0}, so the above could be just as well
rewritten as follows:
msgstr[0] "1 zvezda"
msgstr[1] "2 zvezdi"
msgstr[2] "{0} zvezde"
msgstr[3] "{0} zvezd"
Similarily, for en-US, that could be:
msgid "1 star"
msgid_plural "{0} stars"
However, like I said before, I don't know if that's a good way of
achiveing the goal I defined above. I'll test and report back here.
Thanks,
-stas