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

Use translations and a custom icon for the roles #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

erkenes
Copy link

@erkenes erkenes commented Mar 1, 2021

It should be possible to give a role a real name and change the icon.

* @param string $roleName
* @return array
*/
protected function getDataByFullName(string $packageName, string $roleName): array
Copy link
Member

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.

Copy link
Author

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
@erkenes
Copy link
Author

erkenes commented Mar 29, 2021

I've adjusted the Policy.yaml because my previous change could lead to problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants