Bug#703815: i18nspector: Missing plural forms
Hi Guillem, The new upstream version of i18nspector uncomments some and adds other plural forms -- adding plural forms is something that is never going to be 100% complete so working out where to draw the line under this bug is difficult. I've chosen to close it with the upload of version 0.8.2 and I know that Jakub has plans to expand the list of checks and plural forms over time. If you have a specific list of (important? widely spoken?) languages for which i18nspector doesn't have plural forms, please feel free to chime in. cheers Stuart -- Stuart Prescotthttp://www.nanonanonano.net/ stu...@nanonanonano.net Debian Developer http://www.debian.org/ stu...@debian.org GPG fingerprintBE65 FD1E F4EA 08F3 23D4 3C6D 9FE8 B8CD 71C5 D1A8 GPG fingerprint90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7 signature.asc Description: This is a digitally signed message part.
Bug#703815: i18nspector: Missing plural forms
On Thu, 2013-04-11 at 19:24:39 +1000, Stuart Prescott wrote: The new upstream version of i18nspector uncomments some and adds other plural forms -- adding plural forms is something that is never going to be 100% complete so working out where to draw the line under this bug is difficult. I've chosen to close it with the upload of version 0.8.2 and I know that Jakub has plans to expand the list of checks and plural forms over time. If you have a specific list of (important? widely spoken?) languages for which i18nspector doesn't have plural forms, please feel free to chime in. Sure, this looks fine to me. Although I think I'll clone this bug for the suggested check of when the alternative plural forms might be dangerious/bogus. (One small nitpick, when closing bug reports with upstream releases, it's best to explicitly say what was fixed, for example in a subitem, otherwise I think it's common to assume that the requst itself was to package that new upstream release.) Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#703815: i18nspector: Missing plural forms
* Guillem Jover guil...@debian.org, 2013-03-25, 04:52: Given the above, then I think a solution could be to accept both plural-forms as valid (because they are a matter of translation-style). In i18nspector 0.8.2 (just released) it's possible to declare more than one correct Plural-Forms. I added such declarations for Belarusian, Bosnian, Croatian, Hungarian, Russian, Serbian, Turkish and Ukrainian. And ideally, i18nslator would check that if the condensed form is used (nplurals=3), the msgstr matching n==1 contains the same amount of format directives as the msgstr matching f.ex. n==2, to detect the problematic case you brought up before, and to not trip on strings with more than one format directive, for example: msgstr[0] numeral-or-article text-0 %d msgstr[1] %d text-1 %d msgstr[2] %d text-2 %d This would then trigger a warning. This is a good idea, but it's not implemented yet. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#703815: i18nspector: Missing plural forms
Hi! On Sun, 2013-03-24 at 20:51:39 +0100, Jakub Wilk wrote: I initially imported all plural forms that were known to gettext, but then did some reality checking and commented out those that weren't used in practice or were otherwise problematic. If an entry is commented out, it means that I haven't wrapped my head around it yet. :) Sure, makes sense. :) Bosnian (together with Belarusian, Croatian, Russian, Serbian and Ukrainian) is actually an interesting case. According to gettext documentation and Translate Toolkit wiki, the correct Plural-Forms for them is: nplurals=3; plural= \ n%10==1 n%100!=11 ? 0 : \ n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2; This expression has an unpleasant property that plural(1) == plural(21). Why is that a problem? Well, usually it isn't. But sometimes software authors use plural forms in messages like this: Aha, thanks for pointing this out, had missed that when skimming over those sites/docs. msgid an apple msgid_plural apples or like this: msgid an apple msgid_plural %d apples Then in translation you would get singular form, even though the numeral is greater than 1. Ooops! Actually, it does not really matter how the original string was written, as long as the translated string matches the plural-form formula. The argument to the printf-like function will be passed anyway (if it is passed at all), so it can still be translated like this: msgid an apple msgid_plural %d apples msgstr[0] %d poma msgstr[1] %d pomes So to me this seems to end up being a matter of style and how the translators want to translate the strings. Of course, I'm not the first one who noticed this is a problem. In fact, majority of Russian, Serbian and Ukrainian MO files in Debian use this Plural-Forms instead: nplurals=4; plural= \ n==1 ? 3 : \ n%10==1 n%100!=11 ? 0 : \ n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2; This is the same as above, but with special case for 1. Given the above, then I think a solution could be to accept both plural-forms as valid (because they are a matter of translation-style). And ideally, i18nslator would check that if the condensed form is used (nplurals=3), the msgstr matching n==1 contains the same amount of format directives as the msgstr matching f.ex. n==2, to detect the problematic case you brought up before, and to not trip on strings with more than one format directive, for example: msgstr[0] numeral-or-article text-0 %d msgstr[1] %d text-1 %d msgstr[2] %d text-2 %d This would then trigger a warning. Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#703815: i18nspector: Missing plural forms
[With my upstream hat on:] * Guillem Jover guil...@debian.org, 2013-03-24, 02:50: It seems several languages are missing plural forms in i18nspector. Found this while going through the dpkg po files (very useful tool!). The one that triggered this was Bosnian. Looking for details I see these references (the first with explicit field values): http://translate.sourceforge.net/wiki/l10n/pluralforms https://translations.launchpad.net/+languages There are several in i18nspector currently commented out: $ grep '\(\[\|\# plural-forms\)' /usr/share/i18nspector/data/languages but there might be others missing that are present on the sf site. I initially imported all plural forms that were known to gettext, but then did some reality checking and commented out those that weren't used in practice or were otherwise problematic. If an entry is commented out, it means that I haven't wrapped my head around it yet. :) Bosnian (together with Belarusian, Croatian, Russian, Serbian and Ukrainian) is actually an interesting case. According to gettext documentation and Translate Toolkit wiki, the correct Plural-Forms for them is: nplurals=3; plural= \ n%10==1 n%100!=11 ? 0 : \ n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2; This expression has an unpleasant property that plural(1) == plural(21). Why is that a problem? Well, usually it isn't. But sometimes software authors use plural forms in messages like this: msgid an apple msgid_plural apples or like this: msgid an apple msgid_plural %d apples Then in translation you would get singular form, even though the numeral is greater than 1. Ooops! Of course, I'm not the first one who noticed this is a problem. In fact, majority of Russian, Serbian and Ukrainian MO files in Debian use this Plural-Forms instead: nplurals=4; plural= \ n==1 ? 3 : \ n%10==1 n%100!=11 ? 0 : \ n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2; This is the same as above, but with special case for 1. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#703815: i18nspector: Missing plural forms
Package: i18nspector Version: 0.8.1-1 Severity: wishlist Hi! It seems several languages are missing plural forms in i18nspector. Found this while going through the dpkg po files (very useful tool!). The one that triggered this was Bosnian. Looking for details I see these references (the first with explicit field values): http://translate.sourceforge.net/wiki/l10n/pluralforms https://translations.launchpad.net/+languages There are several in i18nspector currently commented out: $ grep '\(\[\|\# plural-forms\)' /usr/share/i18nspector/data/languages but there might be others missing that are present on the sf site. Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org