Skip to content

Need information about translating issue (Magento Swatches Js) #16079

Closed
@iparmentier

Description

@iparmentier

Preconditions

  1. Magento 2.2.4
  2. PHP 7.1.17-1 & MySQL 5.7.22

Steps to reproduce

  1. You need a Configurable Product with a Swatch Product Attribute in Attribute Set
  2. Swatch attribute have color or image attached to each swatch attribute value
  3. This Parent Product have more than three children configured with the Swatch Attribute
  4. In configuration, you need to have in Catalog > Storefront > Swatches per Product defined to 2
  5. In configuration, you need to have in Catalog > Storefront > Show Swatches in Product List defined to Yes

Expected result

capture d ecran 2018-06-12 a 23 09 21

**String can be translated through i18n string in dictonary.csv**

Actual result

capture d ecran 2018-06-12 a 23 09 21

**String is not translated**

I would like to have some information about this line :

html += '<a href="#" class="' + moreClass + '">' + moreText + '</a>';

Indeed, I do not see any process to translate this string apart to pass a new value to options moreButtonText.

However, you pass the mage/translate to the define module, so a simple :
html += '<a href="#" class="' + moreClass + '">' + $t(moreText) + '</a>';
would be enough.

Could you provide me some information about this line, or we need to create a pull request about it.

Thank you,

Ilan PARMENTIER

Metadata

Metadata

Assignees

Labels

Fixed in 2.1.xThe issue has been fixed in 2.1 release lineFixed 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: Format is validGate 1 Passed. Automatic verification of issue format passed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions