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

Language pack inheritance order is incorrect #8691

Closed
koenner01 opened this issue Feb 27, 2017 · 8 comments
Closed

Language pack inheritance order is incorrect #8691

koenner01 opened this issue Feb 27, 2017 · 8 comments
Assignees
Labels
Component: Framework/Translate USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to translation in Catalog use just Catalog Component: Translation Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@koenner01
Copy link
Contributor

koenner01 commented Feb 27, 2017

Direct quote from the Magento 2 documentation:
(http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-i18n.html)

If necessary, you can specify several parent packages. The parent packages are applied on a first listed, first used basis.

And

In the preceding example:

language_package_one descends from en_au_package and en_au_package descends from en_ie_package
language_package_two descends from en_ca_package and en_ca_package descends from en_us_package
If the Magento application cannot find word or phrase in the en_GB package, it looks in other packages in following sequence:

parent-package-one/language_package_one
/en_au_package
/en_ie_package
parent-package-two/language_package_two
/en_ca_package
/en_us_package
Specifying all inheritances between the language packages might result in creating circular inheritance chains. Use Magento\Test\Integrity\App\Language\CircularDependencyTest test to locate and fix such chains.

The documentation clearly states that 'package_one' should be loaded before 'package_two'; However if your 'package_one' name comes after 'package_two' alphabetically the order will not be respected.

Preconditions

  1. Magento 2.4-develop
  2. PHP7.2

Steps to reproduce

  1. Create 2 language packs with package names "pack_a" & "pack_z"
  2. Create a project language pack which uses the previously created packs.
  3. Make sure you add "pack_z" as the first package to use then "pack_a"
<?xml version="1.0"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
   ...
    <use vendor="myvendor" package="pack_z"/>
    <use vendor="myvendor" package="pack_a"/>
</language>

Expected result

  1. Translations should be firstly fetched from "pack_z" then "pack_a"

Actual result

  1. Translations are firstly fetched from "pack_a" then from "pack_z"
@koenner01 koenner01 mentioned this issue Feb 27, 2017
@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Nov 14, 2017
@magento-engcom-team
Copy link
Contributor

@koenner01, thank you for your report.
We've created internal ticket(s) MAGETWO-83802 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Nov 14, 2017
@okorshenko okorshenko removed the 2.1.x label Dec 14, 2017
@milindsingh milindsingh self-assigned this Jan 10, 2019
@magento-engcom-team
Copy link
Contributor

Hi @milindsingh. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

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

  • 2. 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!

  • 3. 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

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@sergiy-v sergiy-v self-assigned this Jan 15, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jan 15, 2020

Hi @sergiy-v. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.4-develop branch

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

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


sergiy-v pushed a commit to sergiy-v/magento2 that referenced this issue Jan 16, 2020
@engcom-Alfa engcom-Alfa self-assigned this Jan 20, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jan 20, 2020

Hi @engcom-Alfa. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.4-develop branch

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

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@engcom-Alfa engcom-Alfa added Component: Translation Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Jan 20, 2020
@engcom-Alfa
Copy link
Contributor

The issue is reproduced on a 2.4-develop instance

Actual Result:
screen

@engcom-Alfa engcom-Alfa added Component: Framework/Translate USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to translation in Catalog use just Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 20, 2020
@ghost ghost unassigned engcom-Alfa Jan 20, 2020
@sergiy-v
Copy link
Contributor

I'm working on the issue.

@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-30628 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

sergiy-v pushed a commit to sergiy-v/magento2 that referenced this issue Jan 22, 2020
@slavvka slavvka added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Feb 9, 2020
@slavvka
Copy link
Member

slavvka commented Feb 9, 2020

Hi @koenner01. Thank you for your report.
The issue has been fixed in #26420 by @sergiy-v in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

@slavvka slavvka closed this as completed Feb 9, 2020
magento-engcom-team added a commit that referenced this issue Feb 9, 2020
 - Merge Pull Request #26420 from sergiy-v/magento2:8691-improved-language-pack-inheritance-order
 - Merged commits:
   1. 8ce0822
   2. 51ddad3
   3. 0237c02
   4. c42ebc1
magento-devops-reposync-svc pushed a commit that referenced this issue Feb 29, 2024
[Bluetooth] Community Pull Requests delivery
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 Component: Translation Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

7 participants