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

Make it possible to have not all languages required #16835

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

matthiashamacher
Copy link
Contributor

Changes in this pull request

Resolves #2958

Additional info

This PR adds the core functionality needed to have not all languages mandatory. For that we add a new config node required_languages to the pimcore.general node, which stores similar to the valid_languages all required languages in an array. This data is then also made available to the frontend via the SystemSettingsConfig::prepareSystemConfig() function.
In the checkValidity() function of the Localizedfield we then not check all languages but only the required ones

Signed-off-by: Matthias Hamacher <m.hamacher@basecom.de>
Copy link

github-actions bot commented Mar 23, 2024

Review Checklist

  • Target branch (11.2 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

Signed-off-by: Matthias Hamacher <m.hamacher@basecom.de>
@mcop1 mcop1 self-assigned this Mar 29, 2024
@mcop1
Copy link
Contributor

mcop1 commented Apr 5, 2024

@matthiashamacher nice addition, thank you! Could you please have a look at the conflict?

Signed-off-by: Matthias Hamacher <m.hamacher@basecom.de>

# Conflicts:
#	lib/SystemSettingsConfig.php
Remove the default value of the config and returning all valid languages if there are no required languages set

Signed-off-by: Matthias Hamacher <m.hamacher@basecom.de>
Copy link

sonarcloud bot commented Apr 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
3.0% Duplication on New Code

See analysis details on SonarCloud

matthiashamacher added a commit to matthiashamacher/admin-ui-classic-bundle that referenced this pull request Apr 12, 2024
Signed-off-by: Matthias Hamacher <m.hamacher@basecom.de>
@mcop1
Copy link
Contributor

mcop1 commented Apr 26, 2024

Thanks again, really nice addition 💯

@mcop1 mcop1 merged commit 6c9b718 into pimcore:11.x Apr 26, 2024
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only one language mandatory
4 participants