-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use translations and a custom icon for the roles #4
base: master
Are you sure you want to change the base?
Conversation
93848ea
to
6e0f036
Compare
* @param string $roleName | ||
* @return array | ||
*/ | ||
protected function getDataByFullName(string $packageName, string $roleName): array |
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.
Hey @enese,
thank you very much for your PR! Having meaningful role names in the selector is an awesome improvement!
The objection that I have here, is that it adds a package special solution for a problem that is at least partially fixed in the core and in general should be fixed there. With Flow 7 I introduced label and description for roles and privileges (see: https://github.com/neos/flow-development-collection/blob/master/Neos.Flow/Configuration/Policy.yaml#L12). If you are already using Flow 7, it would be better to use these labels. What is missing, ist the translation of that labels. That could be added here or added to the core for the next minor version.
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.
Hey @daniellienert ,
sorry for my late response.
I use this package in a customer project (Neos 5.1) where we needed german translations.
My change should make it possible to adjust the label for the role in the inspector as desired.
At the beginning we checked if the label is overwritten somewhere. If this is not the case, a translation should be checked in a central file. The default defined name is used as a fallback.
The policy file cannot be empty
…ault Make it possible to overwrite the default value label and the icon in the selection - use the settings or a default translation source
6e0f036
to
0a42d3f
Compare
I've adjusted the |
It should be possible to give a role a real name and change the icon.