Skip to content

[2.2 develop] [backport #19018] [issue #17833] child theme does not inherit translations from parent theme #19023

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

Conversation

vpodorozh
Copy link
Contributor

@vpodorozh vpodorozh commented Nov 2, 2018

Original pull request ( #19018 )

Description ( #17833 )

Child theme does not inherit translations from parent theme.
Theme inheritance does not work as expected with [translation dictionaries][1]. The child theme does not use any translations defined in it's parent theme's en_US.csv translation dictionary.

Fixed Issues

  1. Child theme does not inherit translations from parent theme #17833: Child theme does not inherit translations from parent theme

Preconditions

I'm working on a Magento ver 2.2.5 installation with two websites & two corresponding theme's. Each with their own [translation dictionary][1], and one theme inheriting from the other.

Manual testing scenarios

  1. Set up a magento instance with two websites and with two theme's, one inheriting from luma and the other inheriting from the other theme you created. See theme structure below.
  2. Add a the translation string "Create New Customer Account","Create New Account" to the parent theme's en_US.csv translation dictionary.
  3. Go to the /customer/account/create/ URL for the website with the child theme applied.

Expected result
The page title should be Create New Account

Actual result
The page title is still Create New Customer Account

  • If go to the /customer/account/create/ URL for the website with the parent theme applied, the page title should is Create New Account. So the child theme is not picking up translations from the parent theme.
  • If you add the translation string "Create New Customer Account","Create New Account" to the Child theme's en_US.csv translation dictionary you can see the translation string applied corectly on the website with the child theme applied.

Is this a bug with Magento or am I doing something wrong?

Is the [translation dictionary][1] documentation incorrect and this is actually the correct behaviour?

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added Partner: ISM eCompany Pull Request is created by partner ISM eCompany partners-contribution Pull Request is created by Magento Partner Component: Framework/Translate USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to translation in Catalog use just Catalog labels Nov 2, 2018
@magento-engcom-team
Copy link
Contributor

Hi @vpodorozh. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

Copy link
Contributor

@vadimjustus vadimjustus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vpodorozh, please check the comments I've just added. There are just a few small changes requests :)

@vpodorozh
Copy link
Contributor Author

Hi guys, I’ve found that in 2.2 develop branch unit test for Trsnslation.php is present and it does not pass - I’m going to take a look into it on Saturday.

… theme

- take into account into "null" locale value
@magento-engcom-team magento-engcom-team added this to the Release: 2.2.8 milestone Nov 22, 2018
@magento-engcom-team
Copy link
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-3527 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @vpodorozh. Thank you for your contribution.
We will aim to release these changes as part of 2.2.8.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Translate USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to translation in Catalog use just Catalog Partner: ISM eCompany Pull Request is created by partner ISM eCompany partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants