Project

General

Profile

Actions

Bug #2495

closed

Paginator does not properly pluralize when more than one organization exists.

Added by Bryan Kearney almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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:

See https://bugzilla.redhat.com/show_bug.cgi?id=961595


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #2534: paginator has i18n issuesDuplicateAmos Benari05/21/2013Actions
Actions #1

Updated by Bryan Kearney almost 11 years ago

  • Target version changed from Bug scrub to 1.3.0
Actions #2

Updated by Dominic Cleal almost 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.

Actions #3

Updated by Dominic Cleal almost 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.
Actions #4

Updated by Dominic Cleal almost 11 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Amos Benari
Actions #5

Updated by Dominic Cleal almost 11 years ago

  • Target version changed from 1.3.0 to 1.2.0
Actions #6

Updated by Amos Benari almost 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF