Bug #2495
closedPaginator does not properly pluralize when more than one organization exists.
Description
Description of problem:
If more than one org exists, and user goes to org view in foreman, the counter on the org view reads incorrectly.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create a new org in katello, "Second_Org"
2. Navigate to Org view in /foreman
3. View summary box below the org list
Actual results:
Displaying all 2 Organization
Expected results:
Displaying all 2 Organization(s)
Additional info:
Updated by Bryan Kearney over 11 years ago
- Target version changed from Bug scrub to 1.3.0
Updated by Dominic Cleal over 11 years ago
There are a number of issues with will_paginate, as both the strings we pass to it (i.e. model names, "Selected" etc) need translation with pluralisation, as do the strings it uses internally.
In case it helps the next person, I was looking into the internal strings it uses, which are based on Rails i18n (we use gettext_i18n_rails instead). I was trying to extract them with gettext by adding the i18n keys to a ruby file underneath locale/, which the extractor would then find, e.g.
# TRANSLATORS: ← Previous N_('will_paginate.previous_label')
And also adding the English to the en/foreman.po file.
It didn't work though with pluralisation in the way I expected and I didn't solve this at the time. The plural support had only just been added to the Rails i18n to gettext_i18n_rails bridge inside the latter project, so note that you need the very latest version I think for it to even work. I was trying to do this:
# TRANSLATORS: 0: "No %{model} found" # 1: "Displaying 1 %{model}" # 2+: "Displaying all %{count} %{model}" Nn_('will_paginate.page_entries_info.single_page', 'will_paginate.page_entries_info.single_page.plural')
And then adding the originals to en/foreman.po again.
Updated by Dominic Cleal over 11 years ago
- Subject changed from Foreman UI does not properly pluralize when more than one organization exists. to Paginator does not properly pluralize when more than one organization exists.
Updated by Dominic Cleal over 11 years ago
- Status changed from New to Ready For Testing
- Assignee set to Amos Benari
Updated by Dominic Cleal over 11 years ago
- Target version changed from 1.3.0 to 1.2.0
Updated by Amos Benari over 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 1bf7cc358e00092d2cee38cc83cb753ed31ffa89.