diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-11-16 12:12:11 +0100 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-11-16 12:12:11 +0100 |
commit | 41a1bc68b5b24f323aa89e39ec586b3c02935bee (patch) | |
tree | d1fdec6c0b8b2c3f59015246c72cbb2957f7cfaa /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites | |
parent | 9a705e911485af200937ed4fbbd216f1ecefdea2 (diff) | |
download | pdf-over-41a1bc68b5b24f323aa89e39ec586b3c02935bee.tar.gz pdf-over-41a1bc68b5b24f323aa89e39ec586b3c02935bee.tar.bz2 pdf-over-41a1bc68b5b24f323aa89e39ec586b3c02935bee.zip |
replace String.format(Messages.getString with Messages.formatString(
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites')
3 files changed, 7 insertions, 7 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java index 0bcbdf17..852afecc 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java @@ -205,7 +205,7 @@ public class DataSourceSelectComposite extends StateComposite { // Only taking first file ... File file = new File(files[0]); if (!file.exists()) { - log.error(String.format(Messages.getString("error.FileNotExist"), files[0])); + log.error(Messages.formatString("error.FileNotExist", files[0])); return; } DataSourceSelectComposite.this.setSelected(file); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java index bb21d4b6..96dc3982 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java @@ -295,7 +295,7 @@ public class OutputComposite extends StateComposite { if (targetFile.exists()) { Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), - String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), + Messages.formatString("output.file_ask_overwrite", targetFile.getName()), BUTTONS.OK_CANCEL, ICON.QUESTION); if (dialog.open() == SWT.CANCEL) { @@ -316,7 +316,7 @@ public class OutputComposite extends StateComposite { } catch (FileNotFoundException e) { log.warn("Failed to open output file", e); ErrorDialog dialog = new ErrorDialog(getShell(), - String.format(Messages.getString("output.save_failed"), + Messages.formatString("output.save_failed", targetFile.getName(), e.getLocalizedMessage()), BUTTONS.RETRY_CANCEL); if (dialog.open() == SWT.CANCEL) @@ -325,7 +325,7 @@ public class OutputComposite extends StateComposite { } catch (IOException e) { log.error("I/O Error", e); ErrorDialog dialog = new ErrorDialog(getShell(), - String.format(Messages.getString("output.save_failed"), + Messages.formatString("output.save_failed", targetFile.getName(), e.getLocalizedMessage()), BUTTONS.RETRY_CANCEL); if (dialog.open() == SWT.CANCEL) @@ -412,7 +412,7 @@ public class OutputComposite extends StateComposite { } catch (IOException ex) { log.error("OpenSelectionListener: ", ex); ErrorDialog error = new ErrorDialog(getShell(), - String.format(Messages.getString("error.FailedToOpenDocument"), + Messages.formatString("error.FailedToOpenDocument", ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL); if (error.open() == SWT.RETRY) widgetSelected(e); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java index 61e87b56..a477422e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java @@ -238,8 +238,8 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { showErrorDialog(Messages.getString("error.KeyStore")); } catch (FileNotFoundException ex) { log.error("Error loading keystore", ex); - showErrorDialog(String.format(Messages.getString( - "error.KeyStoreFileNotExist"), f.getName())); + showErrorDialog(Messages.formatString( + "error.KeyStoreFileNotExist", f.getName())); } catch (NoSuchAlgorithmException ex) { log.error("Error loading keystore", ex); showErrorDialog(Messages.getString("error.KeyStore")); |