From a3b64f6987968d343176f596af0e3f2f4653639b Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 31 Oct 2012 16:36:56 +0000 Subject: Externalize path exceptions git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12747 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../composites/AdvancedConfigurationComposite.java | 8 +-- .../at/asit/pdfover/gui/messages.properties | 74 +++++++++++----------- 2 files changed, 41 insertions(+), 41 deletions(-) (limited to 'trunk/pdf-over-gui/src/main') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java index 8e70f502..72e047c4 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java @@ -455,16 +455,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { String foldername = this.configurationContainer.getOutputFolder(); - if (foldername != null && !foldername.equals("")) { + if (foldername != null && !foldername.equals("")) { //$NON-NLS-1$ File outputFolder = new File(foldername); if (!outputFolder.exists()) { - throw new Exception("Path " + outputFolder.getAbsolutePath() - + " doesnot exists!"); + throw new Exception(String.format(Messages.getString("exception.PathNotExist"), outputFolder.getAbsolutePath())); //$NON-NLS-1$ } if (!outputFolder.isDirectory()) { - throw new Exception("Path " + outputFolder.getAbsolutePath() - + " is not a directory!"); + throw new Exception(String.format(Messages.getString("exception.PathNotDirectory"), outputFolder.getAbsolutePath())); //$NON-NLS-1$ } } } diff --git a/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index 35d33c01..e2b4246a 100644 --- a/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -8,7 +8,7 @@ TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure netw advanced_config.AutoPosition=Automatic positioning advanced_config.Signature_Title=Signature advanced_config.BKUSelection_Title=BKU Selection -advanced_config.OutputFolder=Default output folder\: +advanced_config.OutputFolder=Default output folder: advanced_config.OutputFolder.Dialog=Select a folder advanced_config.OutputFolder.Dialog_Title=Select Output folder advanced_config.OutputFolder_Title=Output location @@ -16,26 +16,26 @@ advanced_config.SigPHTransparency=Signature placeholder transparency advanced_config.SigPHTransparencyMax=Opaque advanced_config.SigPHTransparencyMin=Invisible argument.error.output=is not a directory -argument.help.bku=Select the BKU to use values are\: LOCAL, MOBILE (example\: -b