Skip to content

Commit

Permalink
weblocopenercore-273 (Fix translation in UpdateInfo): Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
benchdoos committed Mar 4, 2023
1 parent 44bbda2 commit fc581d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public HtmlTag prepareUpdateInfoHtmlPage(final UpdateInfo updateInfo) {
final List<ExtendedModificationInfo> modifications = prepareRawList(updateInfo);

final Locale locale = Translation.getSelectedLocale();
final String localeName = locale.getLanguage().toLowerCase();
return TagCreator.html(
TagCreator.body(
TagCreator.table(
Expand All @@ -35,8 +36,7 @@ public HtmlTag prepareUpdateInfoHtmlPage(final UpdateInfo updateInfo) {

final Map<String, String> description =
value.modification().description();
final String srcMessage =
description.get(locale.getLanguage().toLowerCase());
final String srcMessage = description.get(localeName);
final String message;
if (StringUtils.isNotBlank(srcMessage)) {
message = srcMessage;
Expand Down

0 comments on commit fc581d9

Please sign in to comment.