Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-41576

SelectableDropdown list items cannot be translated without hacks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Hosts
    • None
    • None
    • None
    • None

      Description of problem:

      SelectableDropdown is a custom object introduced for Katello which allows the user to select from multiple strings. It currently does not support translation without using hackey translated-strings-as-keys logic which is a bad idea for many reasons.

      This fix would modify the items field (or add a new field) to accept a key field and a "display text" field. The SelectableDropdown will render the display text as a translated string, while the page can use the key field for page logic.

      SelectableDropdown is currently used in 15 places:

      • `/home/vagrant/katello/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js` (1)
      • `/home/vagrant/katello/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js` (2)
      • `/home/vagrant/katello/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js` (2)
      • `/home/vagrant/katello/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js` (2)
      • `/home/vagrant/katello/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js` (2)
      • `/home/vagrant/katello/webpack/scenes/Content/Table/ContentTable.js` (1)
      • `/home/vagrant/katello/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js` (1)
      • `/home/vagrant/katello/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js` (1)
      • `/home/vagrant/katello/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js` (1)
      • `/home/vagrant/katello/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js` (2)

      How reproducible:

      Always

      Is this issue a regression from an earlier version:

      No

      Steps to Reproduce:

      1. Create a user with a different language.

      2. Navigate to any page with a SelectableDropdown (see above) and note that none of the options in any dropdowns are translated.

      Actual behavior:
      No translations are supported in dropdowns without hacks.

      Expected behavior:
      We should support translations in these dropdowns.

      Business Impact / Additional info:

       

              Unassigned Unassigned
              rhn-engineering-qjames Quinn James
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: