Skip to content

Javascript translation issue on modal buttons when removing items from product compare page #19705

@mfickers

Description

@mfickers

Preconditions

  1. Magento 2.3.0 Open Source
  2. At least one product available in store
  3. A translation file for the luma theme and storefront locale containing the phrase "Cancel","Test"
  4. Static Content is deployed for the right locale and the translation cache is cleaned

Steps to reproduce

  1. Add an item to product compare list
  2. Go to product compare page
  3. Click on the remove item icon

Expected result

  1. A modal pops up asking to confirm the removal
  2. The left button of this modal should have the text "Test" on it

Actual result

  1. The text of the left modal button is "Cancel"

Additional information

The very first item in my js-translation.json is "Cancel":"Test", so this is not the issue.

When mage/translate.js is called from modal/confirm.js the _data[] array is empty:

bildschirmfoto 2018-12-11 um 15 03 42

During the same page load, it will be loaded containing all phrases from the js-translation.json including the right phrase:

bildschirmfoto 2018-12-11 um 15 04 07

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Framework/TranslateUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to translation in Catalog use just CatalogComponent: TranslationFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions