After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656652 - Bad strings for translation
Bad strings for translation
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: Preferences
0.14.2
Other All
: Normal normal
: 0.91
Assigned To: Pitivi maintainers
Pitivi maintainers
: 660724 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-16 13:01 UTC by Marek Černocký
Modified: 2013-08-05 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.06 KB, patch)
2011-08-16 14:27 UTC, Marek Černocký
none Details | Review

Description Marek Černocký 2011-08-16 13:01:45 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.
Comment 1 Jean-François Fortin Tam 2011-08-16 13:30:49 UTC
Ugh, so are you basically asking for the reverse of bug #651186 ?
Otherwise how would you do it exactly?
Comment 2 Marek Černocký 2011-08-16 14:27:46 UTC
Created attachment 193954 [details] [review]
Patch
Comment 3 Marek Černocký 2011-08-16 14:45:51 UTC
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
Comment 4 Claude Paroz 2011-08-16 15:25:07 UTC
+1 for Marek patch
Comment 5 Alex Băluț 2011-08-16 15:31:27 UTC
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..
Comment 6 Claude Paroz 2011-08-16 15:34:54 UTC
Yes, a comment would be welcome, but I doubt that ngettext will ever support the fractions...
Comment 7 F Wolff 2011-08-23 13:27:30 UTC
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
Comment 8 Marek Černocký 2011-08-23 13:42:32 UTC
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.
Comment 9 F Wolff 2011-09-01 05:43:50 UTC
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.
Comment 10 Jean-François Fortin Tam 2011-10-02 23:18:00 UTC
*** Bug 660724 has been marked as a duplicate of this bug. ***
Comment 11 Jean-François Fortin Tam 2011-10-02 23:50:35 UTC
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