[dash] no singular/plural option for "See %1 more results"

Bug #759189 reported by Florian Greinus
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unity-2d
Fix Released
High
Florian Boucault

Bug Description

There is no option to discern between singular and plural in the phrase "See %1 more results".
This isn't the case in normal unity, see:
https://translations.launchpad.net/ubuntu/natty/+source/unity/+pots/unity/de/+translate?batch=10&show=all&search=Ergebnisse

That's needed, because the grammar is different when you have 1 result or multiple results.

The link to the buggy version:
https://translations.launchpad.net/ubuntu/natty/+source/unity-2d/+pots/unity-2d/de/+translate?batch=10&show=all&search=Ergebnisse

Related branches

Revision history for this message
Dennis Baudys (thecondordb) wrote :

I can confirm this! This needs to be fixed in the original english string.

Changed in unity-2d:
status: New → Confirmed
Revision history for this message
Aritchie (aritchie) wrote :

How about this idea - how about dropping the word result / results altogether and then you do not have to worry about singular vs plural. Just say "See fewer" and "See %1 more"?

Revision history for this message
Aritchie (aritchie) wrote :

One screenshot:

Revision history for this message
Aritchie (aritchie) wrote :

...and a second screenshot.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the suggestion Adam. However at present the goal is to be as similar as Unity, so we’ll stick with their wording.
On top of that, your suggestion works quite nicely in English, but may not work with other languages.

Revision history for this message
Aritchie (aritchie) wrote :

Okay - than I will go to Plan B. :)

What about this:
In the GroupHeader.qml file at Line 85, replace this:

text: groupHeader.folded ? u2d.tr("See %1 more results").arg(availableCount) : u2d.tr("See fewer results")

with this:
text: if (availableCount > 1) {
  groupHeader.folded ? u2d.tr("See %1 more results").arg(availableCount) : u2d.tr("See fewer results")
  } else {
  text: groupHeader.folded ? u2d.tr("See %1 more result").arg(availableCount) : u2d.tr("See fewer results")
  }

There is probably a more optimized way of showing this logic - but I have tested it and it works. Sorry I don't have a Plan C - yet. :)

Changed in unity-2d:
importance: Undecided → High
summary: - no singular/plural option for "See %1 more results"
+ [dash] no singular/plural option for "See %1 more results"
Revision history for this message
Florian Boucault (fboucault) wrote :

Thanks for the good suggestions Aritchie. I submitted a merge request that fixes the bug. Tell me what you think.

Changed in unity-2d:
milestone: none → 3.8.4
assignee: nobody → Florian Boucault (fboucault)
status: Confirmed → In Progress
Revision history for this message
Aritchie (aritchie) wrote :

Florian, I just downloaded the new build. I kind of thought their was a more optimized if statement to do that but I was just looking to get it working. There is one thing, I noticed you used the word "one" instead of the number 1. Was there a reason for that? The other results use a number and not a word representing the count. It is working fine here. :)

Changed in unity-2d:
status: In Progress → Fix Committed
Changed in unity-2d:
status: Fix Committed → Fix Released
Revision history for this message
Florian Boucault (fboucault) wrote :

Aritchie, thanks for reporting back here. The reason for "one" is to be exactly in sync with Unity 3D which uses that particular string.

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.