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

Translation issue send-friend in sendphtml #18779

Closed
Franzld opened this issue Oct 24, 2018 · 12 comments
Closed

Translation issue send-friend in sendphtml #18779

Franzld opened this issue Oct 24, 2018 · 12 comments
Labels
Event: squashtoberfest 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

@Franzld
Copy link

Franzld commented Oct 24, 2018

Preconditions (*)

  1. Magento 2.2.6, , ,
  2. Unix Ubuntu 16.04.5 LTS
  3. php 7.0.30
  4. mysql 5.7.24

Steps to reproduce (*)

  1. install magento 2.2.6 with sample data
  2. add any translation (eg German) with the entry: "Email:,E-Mail:,,"
    Set shop-> config->catalog->"Email to a friend" -> yes
  3. call a Product -> Email to a Friend

Expected result (*)

  1. all labels should been shown right

Actual result (*)

  1. Label "E-Mail" of the invieder is shown wrong like -> "E\u002dMail"

Fixing the issue (*)

/vendor/magento/module-send-friend/view/frontend/templates/send.phtml
remove "escapeJs" in line 34 :
<label for="recipients-email<%- data._index_ %>" class="label"><span><?= $block->escapeJs($block->escapeHtml(__('Email'))) ?></span></label>
change to:
"<label for="recipients-email<%- data._index_ %>" class="label"><span><?= $block->escapeHtmlAttr(__('Email')) ?></span></label>"

@magento-engcom-team
Copy link
Contributor

Hi @Franzld. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@Franzld do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 24, 2018
@Franzld
Copy link
Author

Franzld commented Oct 24, 2018

To reproduce the issue without install a translation, you may edit

/vendor/magento/module-send-friend/view/frontend/templates/send.phtml

replace __('Email') with

  • __('Em#ail') or

  • __('E-Mail')

@hardik-krish hardik-krish self-assigned this Oct 24, 2018
@magento-engcom-team
Copy link
Contributor

Hi @hardik-krish. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@Franzld
Copy link
Author

Franzld commented Oct 24, 2018

I'm sorry, but I'm not a developer and have only rudimentary programming skills.
I just found this problem and tried to fix it myself.

@ghost
Copy link

ghost commented Oct 25, 2018

@Franzld - i checked this and there is no issue. You need to have utf-8 encoding in the csv file.
I think you opened the translation csv file in some text editor, due to this encoding standard of file was changed.
Please check.

@Franzld
Copy link
Author

Franzld commented Oct 25, 2018

Thanks for your answer!
I've checked it and the same issue appears. Both files ( de_DE.csv and send.phtml) are encode to utf-8

please try to replace in
/vendor/magento/module-send-friend/view/frontend/templates/send.phtml at line 34
__('Email') to __('E-mail')
like this:
<label for="recipients-email<%- data._index_ %>" class="label"><span><?= $block->escapeJs($block->escapeHtml(__('E-mail'))) ?></span></label>

if there's no issue at your place, something with my server-config may be wrong.

@ghost
Copy link

ghost commented Oct 26, 2018

@Franzld - Yes, I am able to reproduced the issue even with UTF-8 encoding.

@Franzld Franzld closed this as completed Oct 26, 2018
@ghost
Copy link

ghost commented Oct 26, 2018

#SQUASHTOBERFEST

@ghost ghost assigned ghost and unassigned hardik-krish Oct 26, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Oct 26, 2018

Hi @rahulwebkul. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost
Copy link

ghost commented Oct 28, 2018

#SQUASHTOBERFEST

@magento-engcom-team
Copy link
Contributor

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

The fix will be available with the upcoming 2.2.8 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 29, 2018
@okorshenko okorshenko added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 31, 2018
@okorshenko
Copy link
Contributor

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

The fix will be available with the upcoming 2.3.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Event: squashtoberfest 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

4 participants