-
Notifications
You must be signed in to change notification settings - Fork 698
getEntityDisplayName to get entityID's name for display #1512
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
Reimplement getPreferredTranslation outside of IdPDisco so it's reusable and much more complete. The new method will search the current, default and fallback language for a displayable string in various metadata fields. This should be much more complete and robust than previous approches. Make it a Twig filter so it can also be used there.
|
Would help to close #460 |
|
There's also some related stuff only used in IFrameLogout. Is IFrameLogout something still relevant in 2021? |
Codecov Report
@@ Coverage Diff @@
## master #1512 +/- ##
============================================
+ Coverage 40.51% 40.79% +0.27%
+ Complexity 3503 3501 -2
============================================
Files 142 142
Lines 10501 10498 -3
============================================
+ Hits 4255 4283 +28
+ Misses 6246 6215 -31 |
I'm not sure, I don't so SLO myself... Maybe just leave it as is for now? |
|
I've looked into I see two options:
|
|
Agreed to go with 2. The only reason to fall back to another language is when the translations for the current language are incomplete.. I'd rather put some effort in completing the translations for all languages. |
We could use it everywhere, but it's better to reduce the already big amount of configuration options the admin is confronted with than the small problem this option solves.
Reimplement getPreferredTranslation outside of IdPDisco so it's reusable and much more complete. The new method will search the current, default and fallback language for a displayable string in various metadata fields. This should be much more complete and robust than previous approches. Make it a Twig filter so it can also be used there.
For clarity:
If the approach is deemed OK there are some other places in the code where we can use this so we have a consistent algorithm across the code to find the name of some entity to display.