GNOME Bugzilla – Bug 656652
Bad strings for translation
Last modified: 2013-08-05 12:05:02 UTC
Messages "%s second" and "%s seconds" (pitivi/ui/previewer.py) are improper for some non English languages. Some languages has more complicated rules then "1 and more". And fraction (e.g 1/4 second) may require different form too. As these messages are relatively few separated translations for all messages are better solution.
Ugh, so are you basically asking for the reverse of bug #651186 ? Otherwise how would you do it exactly?
Created attachment 193954 [details] [review] Patch
FPS is abbreviation so hasn't plural form and "%d fps" is useful. Full words requires ngettext but it available for integers (e.g. %d) only. Not for fractions. I have attached patch. It would be also possible to use one message for fractions ... (_("%s second") % "1/100", gst.SECOND/100), (_("%s second") % "1/10", gst.SECOND/10), (_("%s second") % "1/4", gst.SECOND/4), (_("%s second") % "1/2", gst.SECOND/2), ... and ... (ngettext ("%d second", "%d seconds", gst.SECOND), gst.SECOND), (ngettext ("%d second", "%d seconds", 5*gst.SECOND), 5*gst.SECOND), (ngettext ("%d second", "%d seconds", 10*gst.SECOND), 10*gst.SECOND), ... But I don't know if one message for all fractions is correct for all languages. And third solution is using abbreviations 1/100 s ... 10 s 1 min
+1 for Marek patch
Review of attachment 193954 [details] [review]: This is just a workaround. If you insist to add it, please add a comment and explain why it should be done this way. For example, add a TODO:, and explain that this should be changed when there is ngettext support for fractions..
Yes, a comment would be welcome, but I doubt that ngettext will ever support the fractions...
From the gettext manual: "Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, there is no need to use ngettext..." http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html
Such case is 1/4 s, 1 s, 10 s or 1/4 sec, 1 sec, 10 sec "Second" is regular word. My native language is Czech and so I can say confidently: These messages require plural forms for Czech.
I was maybe unclear in my previous message, but I _agree_ with Marek's comment 3. The cases with whole (integer) seconds definitely need plurals, but for the fractions, I think we can go without. In other words, we only need to change the cases for 1, 5 and 10 seconds to use the plurals.
*** Bug 660724 has been marked as a duplicate of this bug. ***
Okay, added an explanatory comment and pushed the fix to master. Sorry for the wait guys. commit f79ccb2113200e9806540792bf13fa35085954c3 Author: Marek Černocký <marek@manet.cz> Date: Sun Oct 2 19:45:06 2011 -0400 Use separate translatable strings for thumbnail periods Fixes bug 656652