-
Notifications
You must be signed in to change notification settings - Fork 199
[SYNCOPE-1942] added getString to retrieve the label from localization properties file #1278
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,7 +187,7 @@ protected void populateItem(final ListItem<Class<? extends BasePage>> item) { | |
| IdMPage ann = item.getModelObject().getAnnotation(IdMPage.class); | ||
|
|
||
| BookmarkablePageLink<Page> link = new BookmarkablePageLink<>("idmPage", item.getModelObject()); | ||
| link.add(new Label("idmPageLabel", ann.label())); | ||
| link.add(new Label("idmPageLabel", getString(ann.label()))); | ||
| if (StringUtils.isNotBlank(ann.listEntitlement())) { | ||
| MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); | ||
| } | ||
|
|
@@ -226,7 +226,7 @@ protected void populateItem(final ListItem<Class<? extends BasePage>> item) { | |
| AMPage ann = item.getModelObject().getAnnotation(AMPage.class); | ||
|
|
||
| BookmarkablePageLink<Page> link = new BookmarkablePageLink<>("amPage", item.getModelObject()); | ||
| link.add(new Label("amPageLabel", ann.label())); | ||
| link.add(new Label("amPageLabel", getString(ann.label()))); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
| if (StringUtils.isNotBlank(ann.listEntitlement())) { | ||
| MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,3 +33,7 @@ endDelegation=End Delegation | |
| sessionExpiration.header=Session Expiration | ||
| sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. | ||
| sessionExpiration.extend=Extend | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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/... The other two labels are useless and should be removed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed labels for SRA and WA.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The menu is shown by all pages, which are all inheriting from You can't put it in 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Summarizing:
|
||
| Topology=Topology | ||
| WA=WA | ||
| SRA=SRA | ||
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.
Use the
getString()variant with default, e.g.so it will work even when the actual translation is not available