Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-2077

Pluralization in MyGroupsSidebarItem is handled incorrectly by simply appending "s"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 1.8.0
    • 1.8.0
    • UI
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • RHDH F&UI plugins 3281
    • Low

      Description of problem:

      In the MyGroupsSidebarItem component, pluralization is currently handled by appending an *"s" *to the translated string. This approach does not work for many languages, since pluralization rules differ and cannot be hardcoded.

      <MyGroupsSidebarItem
        key={menuItem.name}
        icon={renderIcon(menuItem.icon ?? '')}
        singularTitle={translatedText}
        pluralTitle={`${translatedText}s`}
      />
      

      Prerequisites (if any, like setup, operators/versions):

      • RHDH with i18n enabled.
      • A language other than English (where pluralization may not use "s").
        Steps to Reproduce
      1. Switch the application language to a non-English locale (e.g., French, German, Japanese).
      2. Navigate to the sidebar where MyGroupsSidebarItem is rendered.
      3. Observe the plural label.

        Actual results:

        Pluralization is done by simply appending "s", which produces incorrect translations in non-English locales.

        Expected results:

        Pluralization should use proper i18n pluralization rules provided by the translation library (e.g., i18next plural forms or backstage ), rather than hardcoding "s".

        Reproducibility (Always/Intermittent/Only Once):

        Always

              rh-ee-mitkumar Mitesh Kumar
              rh-ee-mitkumar Mitesh Kumar
              RHIDP - Frontend Plugins & UI
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: