From 41a1bc68b5b24f323aa89e39ec586b3c02935bee Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Wed, 16 Nov 2022 12:12:11 +0100 Subject: replace String.format(Messages.getString with Messages.formatString( --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java | 2 +- .../src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java index 792b2414..22e52467 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SWTUtils.java @@ -57,7 +57,7 @@ public final class SWTUtils { } } public static void setLocalizedText(Object o, String messageKey) { genericSetText(o, Messages.getString(messageKey)); } - public static void setLocalizedText(Object o, String formatMessageKey, Object... formatArgs) { genericSetText(o, String.format(Messages.getString(formatMessageKey), formatArgs)); } + public static void setLocalizedText(Object o, String formatMessageKey, Object... formatArgs) { genericSetText(o, Messages.formatString(formatMessageKey, formatArgs)); } private static void genericSetToolTipText(Object swtObj, String text) { try { diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java index 095704b7..168f5b18 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/UpdateCheckManager.java @@ -63,7 +63,7 @@ public final class UpdateCheckManager { shell.getDisplay().asyncExec(() -> { Dialog info = new Dialog(shell, Messages.getString("version_check.UpdateTitle"), - String.format(Messages.getString("version_check.UpdateText"), version), + Messages.formatString("version_check.UpdateText", version), BUTTONS.OK_CANCEL, ICON.INFORMATION); if (info.open() == SWT.OK) -- cgit v1.2.3