Skip to content

Commit

Permalink
MID-9610 custom column action localization fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 25, 2024
1 parent 3239222 commit 7493105
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2110,9 +2110,16 @@ public static List<InlineMenuItem> createMenuItemsFromActions(@NotNull List<GuiA
if (StringUtils.isEmpty(templateOid)) {
return;
}
String label = action.getDisplay() != null && PolyStringUtils.isNotEmpty(action.getDisplay().getLabel()) ?
action.getDisplay().getLabel().getOrig() : action.getIdentifier();
menuItems.add(new InlineMenuItem(Model.of(label)) {

IModel<String> label = () -> {
DisplayType display = action.getDisplay();
if (display == null || display.getLabel() == null) {
return action.getIdentifier();
}

return com.evolveum.midpoint.gui.api.util.LocalizationUtil.translatePolyString(display.getLabel());
};
menuItems.add(new InlineMenuItem(label) {
@Serial private static final long serialVersionUID = 1L;

@Override
Expand Down

0 comments on commit 7493105

Please sign in to comment.