magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Cannot translate meta descriptions added via XML instructions. #35191

Open ioweb-gr opened 2 years ago

ioweb-gr commented 2 years ago

Preconditions (*)

  1. 2.4.3-p1
  2. A custom controller
  3. A custom layout.xml with a meta description content
  4. 2 store views

Steps to reproduce (*)

In your layout.xml add a meta description like this

<meta name="description" content="my english content" translate="content" />

In your i18n/el_GR file for example add a translation for the content.

Incidentally I've tried adding the description like this

<meta name="description" content="my english content" translate="true"/>
<meta name="description" content="my english content" />

Neither way seems to work to make it translateable.

However the phrase is properly collected using i18n:collect-phrases

Expected result (*)

1.The content is translated

Actual result (*)

The content is not translated


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 2 years ago

Hi @ioweb-gr. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 2 years ago

Hi @engcom-Dash. 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: :point_down:


engcom-Dash commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Dash, here is your Magento Instance: https://28a1987dfc30981e1b420c7e7b6c0ee0.instances.magento-community.engineering Admin access: https://28a1987dfc30981e1b420c7e7b6c0ee0.instances.magento-community.engineering/admin_67b2 Login: 992f7a73 Password: 4b80d197a259

engcom-Dash commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Dash, here is your Magento Instance: https://28a1987dfc30981e1b420c7e7b6c0ee0.instances.magento-community.engineering Admin access: https://28a1987dfc30981e1b420c7e7b6c0ee0.instances.magento-community.engineering/admin_c666 Login: 52f053e0 Password: 6d463ebb416f

m2-assistant[bot] commented 2 years ago

Hi @engcom-Charlie. 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: :point_down:

engcom-Charlie commented 2 years ago

Hi @ioweb-gr,

In order to reproduce the issue, can you please guide me on below points.

  1. Have you missed to add something after “Incidentally I've tried adding the description like this” in your comment?
  2. Can you please provide some detailed information in order to investigate it further. Eg. Are you trying to see the translated content from i18n/el_GR for the added tag in .xml file? Or kindly provide all steps to reproduce in order to investigate this issue further.

Thank you in advance!

ioweb-gr commented 2 years ago

Hi, it seems github treated the text as tags so they wouldn't appear. I've added the content that was missing in codeblock.

It seems the translate=true tag is not allowed for the above mentioned tags.

engcom-Charlie commented 2 years ago

:heavy_check_mark: Issue Confirmed

Tried to reproduce the issue on magento 2.4-develop and its reproducible.

Manual testing scenario:

  1. Created one custom module
  2. In order to do translations, we can either install Greek language pack in app/i18n or we can add el_GR.csv file in respective custom modules’s i18n folder. I have tested using both ways.
  3. In layout file(.xml) file added below lines for meta description.

<meta name="description" content="my english content" translate="true"/>

Also tried with below options

<meta name="description" content="my english content" />
<meta name="my_custom_type" content="my english content" translate="true"/>
  1. Change the Locale from Stores >> Settings >> Configuration >> General >> Local Options >> to Greek Note: We can also create 2 different store views and set Greek language for one of the store view.

Expected Result: The content should get translated

Actual Result: Meta tag content is not getting translated.

As per above findings confirming the issue.

github-jira-sync-bot commented 2 years ago

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5940 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 years ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.