Use gettext pluralization with strings connected with numbers [$15]

Bug #1468049 reported by Jernej Virag
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Wingpanel Notifications Indicator
Fix Released
Medium
Corentin Noël
Wingpanel Power Indicator
Fix Released
Medium
Corentin Noël

Bug Description

Currently all the strings connected with numbers in this indicator (e.g. day/days, minute/minutes, hour/hours, etc.) presume there are only two forms (singular and plural) for the translation. This is not true for many languages and thus a proper translation cannot be made at this time (the strings in those languages like Slovenian look equivalent to english "1 minutes").

Vala (and launchpad) already support proper pluralization tools from gettext (see https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html ) and using them for counting would make good translation possible.

Related branches

Jernej Virag (jernej)
description: updated
Changed in wingpanel-indicator-power:
milestone: none → loki-beta1
status: New → Confirmed
Cody Garver (codygarver)
Changed in wingpanel-indicator-power:
importance: Undecided → Medium
Corentin Noël (tintou)
Changed in wingpanel-indicator-power:
status: Confirmed → Fix Committed
assignee: nobody → Corentin Noël (tintou)
Changed in wingpanel-indicator-power:
milestone: loki-beta1 → loki-alpha1
Revision history for this message
Maxim Taranov (png2378) wrote :

Sorry, this bug remained unresolved.

Changed in wingpanel-indicator-power:
status: Fix Committed → Confirmed
Revision history for this message
Danielle Foré (danrabbit) wrote :
Revision history for this message
Maxim Taranov (png2378) wrote :

Daniel, I tried to understand, but could not. For some reason phrases "*until empty/*until full" not used from translation file. They are present in .pot & .po files (line #81 and below on https://bazaar.launchpad.net/~wingpanel-devs/wingpanel-indicator-power/trunk/view/head:/po/power-indicator.pot), but still it looks like in the screenshot (see attachment).

Revision history for this message
Danielle Foré (danrabbit) wrote :

Ah looks like we needed to "make pot" should be fixed now

Revision history for this message
Maxim Taranov (png2378) wrote :
summary: - Use gettext pluralization with strings connected with numbers
+ Use gettext pluralization with strings connected with numbers [$15]
tags: added: bounty
Changed in wingpanel-indicator-power:
status: Confirmed → In Progress
Revision history for this message
Maxim Taranov (png2378) wrote :

I found a similar problem with notifications-indicator. The day/hour/month strings are translated in po-files, but they are not used in the UI (so they are always in English, no matter what lolcalization you're using). The solution could be the same.

Changed in wingpanel-indicator-power:
status: In Progress → Fix Committed
Corentin Noël (tintou)
Changed in wingpanel-indicator-notifications:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Corentin Noël (tintou)
milestone: none → loki-beta1
milestone: loki-beta1 → loki-alpha1
Cody Garver (codygarver)
Changed in wingpanel-indicator-notifications:
status: Fix Committed → Fix Released
Cody Garver (codygarver)
Changed in wingpanel-indicator-power:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.