Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Amadeco opened this issue Jun 12, 2018 · 5 comments
Closed

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

Amadeco opened this issue Jun 12, 2018 · 5 comments
Assignees
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@Amadeco
Copy link

Amadeco commented Jun 12, 2018

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

@magento-engcom-team magento-engcom-team added Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Jun 12, 2018
@Karlasa Karlasa self-assigned this Jun 16, 2018
@magento-engcom-team
Copy link
Contributor

Hi @mageho. Thank you for your report.
The issue has been fixed in #16190 by @Karlasa in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.6 release.

@sidolov
Copy link
Contributor

sidolov commented Jul 4, 2018

Hi @mageho. Thank you for your report.
The issue has been fixed in #16229 by @Karlasa in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.15 release.

@sidolov sidolov added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Jul 4, 2018
magento-engcom-team added a commit that referenced this issue Jul 4, 2018
…Text #16229

 - Merge Pull Request #16229 from Karlasa/magento2:2.1-develop-PR-port-16190
 - Merged commits:
   1. d09dbe4
   2. f523032
@magento-engcom-team
Copy link
Contributor

Hi @mageho. Thank you for your report.
The issue has been fixed in #16228 by @Karlasa in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jul 7, 2018
magento-engcom-team added a commit that referenced this issue Jul 7, 2018
…tonText #16228

 - Merge Pull Request #16228 from Karlasa/magento2:2.3-develop-PR-port-16190
 - Merged commits:
   1. abcded5
   2. 988ef89
@menphis89
Copy link

menphis89 commented May 21, 2019

Hi, I looked carefully if it was all correct in my magento as you describe in the following interventions and it is! Except that it doesn't translate this thing troubles me, the More button I can't translate it in any way...
i have magento:
Magento 2.3.0
PHP 7.1
MySQL 5.7

in the file: /vendor/magento/module-swatches/view/frontend/web/js/swatch-renderer.js
moreButtonText: $t('More'),
then this is correct

the config Swatches is correct like point 4 & 5
In configuration, you need to have in Catalog > Storefront > Swatches per Product defined to 2
In configuration, you need to have in Catalog > Storefront > Show Swatches in Product List defined to Yes

i try whit inline translation, not have option for translate,

same not translate whit i18n ind
/app/i18n/magento2translation/it_IT
"More","Altro"

I could kindly clarify and where am I wrong?
thanks

@Karlasa
Copy link
Contributor

Karlasa commented May 21, 2019

@menphis89
I have M2.3-dev branch
created new conf product
created new it_IT language pack
added phrase into app/i18n/Test/it_IT/it_IT.csv file
run setup:upgrade
changed store language into Italy and cleaned cache
works as expected.
Screen Shot 2019-05-22 at 00 45 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

5 participants