Skip to content

Conversation

@massx1
Copy link
Contributor

@massx1 massx1 commented Dec 30, 2025

No description provided.

@ilgrosso ilgrosso changed the title [SYNCOPE-1942] added getString to retrieve the label from localizatio… [SYNCOPE-1942] added getString to retrieve the label from localization properties file Dec 30, 2025
Copy link
Member

@ilgrosso ilgrosso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides what reported above, the same approach should be applied to extPages in the same way

sessionExpiration.header=Session Expiration
sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working.
sessionExpiration.extend=Extend

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These labels shall be provided in the same module where the corresponding page is located, e.g. ``client/idm/console/src/main/resources/...forTopology`

The other two labels are useless and should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed labels for SRA and WA.
It seems that the labels are available only via the BasePage properties file. Creating a Topology properties file does not work, possibly because the IdmPages are dynamic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The menu is shown by all pages, which are all inheriting from BasPage, that's why putting the label in BasePage*.properties works.

You can't put it in Topology*.properties because otherwise all other pages will not know how to translate the Topology label.

There should be a way to move the translations with their own module, especially considering ext pages, which are currently not included in this PR but need to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the BasePage.properties file otherwise, the localized label would be visible only on the selected page. For example, the Home page would show the default label, while the Topology page would show the localized label. I think using BasePage is also a logical choice, since we are referring to the menu.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can have a look at Wicket docs and come up with something that actually solves a general issue rather than just enabling the translation of Topology - because this is all that this PR seems to be about, while there is actually room for some serious improvement.

Summarizing:

  1. come up with a solution which allows to plug-in translations for page menu items, whether such pages are idm, am or ext
  2. find a way to leave the labels in the same source module where the page is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a new version with dynamic property reading. With this approach, the label is read from a property file located in the same package as the page. All pages with these annotations (IdmPages, AmPages, ExtPages) will be managed automatically.

@ilgrosso
Copy link
Member

@massx1 welcome back!
Have you already linked your GitHub and ASF accounts by https://gitbox.apache.org/boxer/ ?

@massx1
Copy link
Contributor Author

massx1 commented Jan 2, 2026

@massx1 welcome back! Have you already linked your GitHub and ASF accounts by https://gitbox.apache.org/boxer/ ?

done

import java.util.HashMap;
import java.util.Map;

public class DynamicMenuRegister {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you place this class under UI commons, I would expect it to be used by both Console and Enduser, which I don't think is the case.

The correct placement would be in client-idrepo-console.

Secondly, there is no need to work with static: Console is a Spring Boot application, you can define a Bean.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes It's used by both...

Static should be necessary to have the same instance Map for all the used classes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants