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

[2.3-develop] magento/magento2#17833: Child theme does not inherit translations fr… #19018

Conversation

vpodorozh
Copy link
Contributor

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 Release Line: 2.3 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

@magento-engcom-team
Copy link
Contributor

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

@sivaschenko
Copy link
Member

Thank you for your contribution @vpodorozh ! In result of this change, parent theme translation file will be used if there is no translation file in the current (child) theme.

@magento-engcom-team
Copy link
Contributor

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

magento-engcom-team added a commit that referenced this pull request Nov 26, 2018
…me does not inherit translations from parent theme #19023

 - Merge Pull Request #19023 from vpodorozh/magento2:2.2-develop-backport-17833-Child-theme-does-not-inherit-translations-from-parent-theme
 - Merged commits:
   1. caa2fe8
   2. 24330d6
   3. 10d9cc9
   4. a3db8d3
   5. 26ea51e
   6. e8a07c9
magento-engcom-team pushed a commit that referenced this pull request Nov 26, 2018
…me does not inherit translations from parent theme #19023
magento-engcom-team added a commit that referenced this pull request Nov 26, 2018
Accepted Public Pull Requests:
 - #19365: Fixing a test for Magento Newsletter. (by @tiagosampaio)
 - #19358: [Backport] Fix the issue with repetitive "tbody" tag for order items table (by @gelanivishal)
 - #19023: [2.2 develop] [backport #19018] [issue #17833] child theme does not inherit translations from parent theme (by @vpodorozh)


Fixed GitHub Issues:
 - #17833: Child theme does not inherit translations from parent theme (reported by @rossmc) has been fixed in #19023 by @vpodorozh in 2.2-develop branch
   Related commits:
     1. caa2fe8
     2. 24330d6
     3. 10d9cc9
     4. a3db8d3
     5. 26ea51e
     6. e8a07c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Award: bug fix 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.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants