-
-
Notifications
You must be signed in to change notification settings - Fork 237
BUGFIX: Translate label for childNodes #5667
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
…f it has no EelExpression, removed some overlooked comments
Sebobo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, works great. Just one small change necessary, which basically everyone forgets when doing something with nodetype configs ;)
| { | ||
| $nodeTypeLabelIdPrefix = $this->generateNodeTypeLabelIdPrefix($nodeTypeName); | ||
| foreach ($configuration['childNodes'] as $childNodeName => &$childNodeConfiguration) { | ||
| if ($this->shouldFetchTranslation($childNodeConfiguration)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if ($this->shouldFetchTranslation($childNodeConfiguration)) { | |
| if ($childNodeConfiguration && $this->shouldFetchTranslation($childNodeConfiguration)) { |
Nodetype settings are always nullable in subtypes f.e.. So we always have to catch this case. Currently this would lead to an exception and make it impossible to overwrite a child node from a subtype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for catching this! Comitted a fix where I also removed an unnecessary function argument
…ument in setChildNodeLabels
Sebobo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, thx!
dlubitz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. Looks good by reading. I left two suggestions to make it more type safe.
Neos.Neos/Classes/Aspects/NodeTypeConfigurationEnrichmentAspect.php
Outdated
Show resolved
Hide resolved
Neos.Neos/Classes/Aspects/NodeTypeConfigurationEnrichmentAspect.php
Outdated
Show resolved
Hide resolved
This change relies on the feature introduced into Neos 8.4 and requires neos/neos-development-collection#5667
This change relies on the feature introduced into Neos 8.4 and requires neos/neos-development-collection#5667
Co-authored-by: Denny Lubitz <[email protected]>
Added translation support for labels of autocreated childNodes
Example:
yaml-File:
xlf-file:
Changes:
Added childNode labels in addLabelsToNodeTypeConfiguration in NodeConfigurationEnrichmentAspect and implemented function for transforming i18n to a later translated id
Implemented translating of said id to the actual translation in ExpressionBasedNodeLabelGenerator in function getLabel
resolved: #5643
Environment
Checklist
FEATURE|TASK|BUGFIX!!!and have upgrade-instructions