-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
EZP-29990: As an Administrator I want to translate ezselection Field Definition options #277
EZP-29990: As an Administrator I want to translate ezselection Field Definition options #277
Conversation
This comment has been minimized.
This comment has been minimized.
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.
There is potential BC break here. SelectionFormMapper
will now add options
or multilingualOptions
form type which means it will break templates if there is form.options
call.
if ($baseLanguage && $language) { | ||
$names[$language->languageCode] = $fieldDef->getName($baseLanguage->languageCode); | ||
$descriptions[$language->languageCode] = $fieldDef->getDescription($baseLanguage->languageCode); | ||
|
||
if (isset($fieldDef->fieldSettings['multilingualOptions'][$baseLanguage->languageCode])) { |
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.
Since it's field specific it should be placed here. You could create an extension point here but I'm not sure if this should happen inside ContentTypeDraftMapper
.
This comment has been minimized.
This comment has been minimized.
69dd3d1
to
50d6f64
Compare
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.
From my side this looks good, but could use a few readability improvements, if you have time:
lib/Form/EventListener/SelectionMultilingualOptionsDataListener.php
Outdated
Show resolved
Hide resolved
tests/RepositoryForms/Data/Mapper/ContentTypeDraftMapperTest.php
Outdated
Show resolved
Hide resolved
…Field Definition options
…Definition options
058696f
to
8cedc46
Compare
Kernel:
ezsystems/ezpublish-kernel#2532
Admin-UI:
ezsystems/ezplatform-admin-ui#824
Checklist:
$ composer fix-cs
)