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

Deploy all used locales #28922

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

AntonEvers
Copy link
Contributor

@AntonEvers AntonEvers commented Jun 29, 2020

Description (*)

bin/magento setup:static-content:deploy --language=all currently only
deploys en_US, instead of the requested "all". This pull request aims to deploy all used languages for the frontend and all configured languages by admin users, when no language parameter is given. en_US is always additionally deployed by default.

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Configure multiple store views with different locales.
  2. Configure a locale other than en_US for your admin user.
  3. run bin/magento setup:static-content:deploy --language=all and verify that all configured languages, plus en_US are deployed.
  4. run bin/magento setup:static-content:deploy --language=all --exclude-language=en_US and verify that en_US is skipped.
  5. run bin/magento setup:static-content:deploy en_US and verify that only en_US is deployed
  6. run bin/magento setup:static-content:deploy --language=en_US and verify that only en_US is deployed
  7. run bin/magento setup:static-content:deploy -l en_US and verify that only en_US is deployed
  8. run bin/magento setup:static-content:deploy --language=en_US en_UK and verify that only en_UK is deployed as the languages argument precedes over the language option

Questions or comments

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 are green)

Resolved issues:

  1. resolves [Issue] Deploy all used locales #29218: Deploy all used locales

@m2-assistant
Copy link

m2-assistant bot commented Jun 29, 2020

Hi @AntonEvers. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

@AntonEvers
Copy link
Contributor Author

@magento run all tests

@AntonEvers
Copy link
Contributor Author

@magento run Unit Tests

@AntonEvers
Copy link
Contributor Author

@magento run all tests

@VladimirZaets VladimirZaets added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Jul 8, 2020
@VladimirZaets VladimirZaets added this to the 2.4.1 milestone Jul 8, 2020
@VladimirZaets
Copy link
Contributor

VladimirZaets commented Jul 9, 2020

Hi @AntonEvers. Thanks for collaboration. This PR was reviewed on Community Contribution Triage meeting. The recording of the meeting you can look by the link

@ihor-sviziev ihor-sviziev self-assigned this Jul 14, 2020
@ihor-sviziev ihor-sviziev added Award: complex Award: bug fix Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Jul 14, 2020
Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

@AntonEvers thank you so much for your contribution!
This is really important improvement!

app/code/Magento/Deploy/Package/PackagePool.php Outdated Show resolved Hide resolved
app/code/Magento/Deploy/Package/PackagePool.php Outdated Show resolved Hide resolved
app/code/Magento/Deploy/Package/PackagePool.php Outdated Show resolved Hide resolved
@ghost ghost moved this from Pending Review to Changes Requested in Pull Requests Dashboard Jul 14, 2020
@AntonEvers AntonEvers force-pushed the lang-deploy branch 2 times, most recently from e2b1fcb to 8d2376b Compare July 14, 2020 13:49
@AntonEvers
Copy link
Contributor Author

@ihor-sviziev please let me know if this needs some cleaning up / relocation of logic. I can imagine that the coupling of objects is getting larger than desirable at the moment.

@AntonEvers
Copy link
Contributor Author

@magento run all tests

@AntonEvers
Copy link
Contributor Author

@ihor-sviziev please let me know if this needs some cleaning up / relocation of logic. I can imagine that the coupling of objects is getting larger than desirable at the moment.

I went ahead and cleaned up a little. Please let me know if you see any issues with this.

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Good job! Thank you so much for this improvement!

@ghost ghost moved this from Pending Review to Ready for Testing in Pull Requests Dashboard Jul 17, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7853 has been created to process this Pull Request

@engcom-Alfa engcom-Alfa self-assigned this Jul 21, 2020
@engcom-Alfa engcom-Alfa moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Jul 21, 2020
@engcom-Alfa
Copy link
Contributor

@magento create issue

@m2-assistant m2-assistant bot mentioned this pull request Jul 21, 2020
4 tasks
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

  1. Configure multiple store views with different locales ( in my case en_US, de_DE and fr_FR);
  2. Configure a locale other than en_US for your admin user.
  3. Run in console: bin/magento setup:static-content:deploy --language=all;

Before: ✖️ only en_US are deployed;

2020-07-21_11-31

After: ✔️ All configured languages are deployed

2020-07-21_12-41

  1. Run in console:bin/magento setup:static-content:deploy --language=all --exclude-language=en_US

After: ✔️ All configured languages except English are deployed

2020-07-21_12-54

  1. Run in console: bin/magento setup:static-content:deploy en_US

After: ✔️ Only en_US is deployed

Screenshot from 2020-07-21 12-59-55

  1. Run in console: bin/magento setup:static-content:deploy -l en_US

After: ✔️ Only en_US is deployed

Screenshot from 2020-07-21 12-59-55

  1. Run in console: bin/magento setup:static-content:deploy --language=en_US de_DE

After: ✔️ Only de_DE is deployed as the languages argument precedes over the language option

Screenshot from 2020-07-21 13-07-53

@engcom-Alfa engcom-Alfa moved this from Testing in Progress to Extended Testing (optional) in Pull Requests Dashboard Jul 21, 2020
@engcom-Charlie engcom-Charlie self-assigned this Jul 21, 2020
@engcom-Charlie engcom-Charlie added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label Jul 21, 2020
@engcom-Alfa engcom-Alfa added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jul 22, 2020
@engcom-Charlie engcom-Charlie moved this from Extended Testing (optional) to Merge in Progress in Pull Requests Dashboard Jul 22, 2020
@magento-engcom-team magento-engcom-team merged commit 2eb0fe6 into magento:2.4-develop Jul 23, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 23, 2020

Hi @AntonEvers, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: complex Award: test coverage Component: Deploy Component: Setup Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

[Issue] Deploy all used locales
6 participants