Bug 26979 - Show correctly-pluralized labels on checkouts page tabs
Summary: Show correctly-pluralized labels on checkouts page tabs
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 21156
Blocks: 28877
  Show dependency treegraph
 
Reported: 2020-11-09 18:00 UTC by Owen Leonard
Modified: 2023-06-08 22:26 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 26979: Show correctly-pluralized labels on checkouts page tabs (15.39 KB, patch)
2021-07-30 18:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26979: Show correctly-pluralized labels on checkouts page tabs (15.44 KB, patch)
2021-07-31 11:25 UTC, David Nind
Details | Diff | Splinter Review
Bug 26979: Show correctly-pluralized labels on checkouts page tabs (15.51 KB, patch)
2021-08-18 09:52 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-11-09 18:00:44 UTC
I suggest we modify the way we display counts on the checkouts page tabs (checkouts, holds, claims, etc).

I suggest we use the new pluralization template syntax (Bug 21156) to show counts on the tabs. Example screenshot:

https://zivotdesign.com/p/#1/15980387474009

Besides avoiding parentheses in labels like "10 Checkout(s)," this change would show the count of only unresolved claims and enrolled clubs.
Comment 1 Katrin Fischer 2020-11-09 19:42:02 UTC
+1 :)
Comment 2 Owen Leonard 2021-07-30 18:16:08 UTC Comment hidden (obsolete)
Comment 3 David Nind 2021-07-31 11:25:36 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2021-08-18 09:51:19 UTC
This patch set adds a few warns to the logs, but I believe that these will likely appear on other pages using the plural translations:

Argument "" isn't numeric in subroutine entry at /usr/local/share/perl/5.24.1/Locale/Messages.pm line 285.
Argument "" isn't numeric in subroutine entry at /usr/local/share/perl/5.24.1/Locale/Messages.pm line 285.
Argument "" isn't numeric in subroutine entry at /usr/local/share/perl/5.24.1/Locale/Messages.pm line 285.

So I am moving them to a separate bug 28877.
Comment 5 Katrin Fischer 2021-08-18 09:52:26 UTC
Created attachment 123932 [details] [review]
Bug 26979: Show correctly-pluralized labels on checkouts page tabs

This patch modifies the tabs shown on the checkout and patron detail
page so that counts of checkouts, etc. have the correct pluralization.
This avoids the use of labels like "Checkout(s)"

To test, apply the patch and check out to a patron.

- The tabs showing checkouts, holds, claims, etc. should show the
  correct plural or singular on each label, e.g.:

  14 Checkouts
  20 Holds
  0 Article requests
  1 Club

- Test that each plural/singular changes appropriately when you add
  checkouts, holds, clubs, etc.

To test translation, apply the patch and test that the correct strings
are translatable. In this example I'm testing fr-FR:

- Update a translation:

  > gulp po:update
  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  the templates  e.g.  misc/translator/po/fr-FR-messages.po
- Locate strings pulled from circulation.tt and moremember.tt
  translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt:770
  msgid "Relatives' checkout"
  msgid_plural "Relatives' checkouts"
  msgstr[0] ""
  msgstr[1] ""

- Edit the "msgstr[0]" and "msgstr[1]" strings however you want (it's
  just for testing)
- Install the updated translation:

  > perl translate install fr-FR

In the staff client, switch to the language you're testing. Confirm that
your translated strings appear correctly in singular and plural cases.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-08-18 12:22:26 UTC
Looking at this again I can see that it removes the divided display of unresolved/resolved claims with the colored mark-up. I think as this was explicitly added after the initial feature request, this could be missed. Setting back to FQA for now.

completely different question: should it be 1 checkout or 1 Checkout?
Comment 7 Jonathan Druart 2021-08-18 14:13:24 UTC
You must html filter the tn (not raw).
Comment 8 Martin Renvoize 2022-05-06 11:31:59 UTC
Hmm, I think I actually prefer the consistency of bug 30695 to the pluralisation this introduces personally..

Example

Holds (0)
Holds (5)

vs

0 Holds
1 Hold
2 Holds

Whilst the latter which this introduces is nice enough, given we have the bracketed approach elsewhere fairly consistently I currently prefer that for wider consistency.. I also feel that works better with the (X/Y) approaches (though the `([X] [Y])` block does make me wince a little)
Comment 9 Jonathan Druart 2022-06-07 08:22:33 UTC
(In reply to Martin Renvoize from comment #8)
> Hmm, I think I actually prefer the consistency of bug 30695 to the
> pluralisation this introduces personally..
> 
> Example
> 
> Holds (0)
> Holds (5)
> 
> vs
> 
> 0 Holds
> 1 Hold
> 2 Holds
> 
> Whilst the latter which this introduces is nice enough, given we have the
> bracketed approach elsewhere fairly consistently I currently prefer that for
> wider consistency.. I also feel that works better with the (X/Y) approaches
> (though the `([X] [Y])` block does make me wince a little)

It would be interesting to have end-user's opinions on that.
You certainly prefer "Holds (X)" because of your developer's brain :D
Comment 10 Katrin Fischer 2022-06-07 09:07:36 UTC
I think I have developer's brain too ;)

But from a UX perspective I like it because the more important information is first. You want to know what to click for 'holds' the number is useful, but secondary and we read left to right.