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

Bug #759189 reported by Florian Greinus on 2011-04-12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
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:

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

The link to the buggy version:

Related branches

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
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"?

Aritchie (aritchie) wrote :

One screenshot:

Aritchie (aritchie) wrote :

...and a second screenshot.

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.

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"
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
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
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  Edit
Everyone can see this information.

Other bug subscribers