]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.export.ui/src/org/simantics/export/ui/ExportCoreWizard.java
Externalize strings in org.simantics.export.ui
[simantics/platform.git] / bundles / org.simantics.export.ui / src / org / simantics / export / ui / ExportCoreWizard.java
index ea2cb05dc9c1bdaaf9755dfcb3176f8d8e567705..cc4b3092d432c2ed28c013372b97a2e9cbf7d0be 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IExportWizard;
 import org.eclipse.ui.IWorkbench;
 import org.osgi.service.prefs.BackingStoreException;
@@ -36,7 +37,7 @@ public class ExportCoreWizard extends Wizard implements IExportWizard {
        OptionsPage optionsPage;
 
        public ExportCoreWizard() {
-               setWindowTitle("Export PDF files");
+               setWindowTitle(Messages.ExportCoreWizard_ExportPDFFiles);
                setNeedsProgressMonitor(true);
        }
 
@@ -83,7 +84,7 @@ public class ExportCoreWizard extends Wizard implements IExportWizard {
                        if ( !exportProblems.isEmpty() ) {
                                CollectionUtils.unique(exportProblems);
                                WizardPage cp = (WizardPage) getContainer().getCurrentPage();
-                               String str = CollectionUtils.toString(exportProblems, "\n");
+                               String str = CollectionUtils.toString(exportProblems, "\n"); //$NON-NLS-1$
                                cp.setErrorMessage( str );
                                return false;
                        }
@@ -106,7 +107,7 @@ public class ExportCoreWizard extends Wizard implements IExportWizard {
                        try {
                                ctx.store.flush();
                        } catch (BackingStoreException e) {
-                               ErrorLogger.defaultLogError("Failed to persist wizard preferences.", e);
+                               ErrorLogger.defaultLogError(Messages.ExportCoreWizard_FailedToSavePreferences, e);
                                ExceptionUtils.logError(e);
                        }
                } catch (InvocationTargetException e) {
@@ -119,13 +120,13 @@ public class ExportCoreWizard extends Wizard implements IExportWizard {
                        }
 
                        if (canceled[0]) {
-                               cp.setErrorMessage("Export canceled.");
+                               cp.setErrorMessage(Messages.ExportCoreWizard_FailedToPersistWizardPrefs);
                        } else if (t instanceof IOException) {
-                               ErrorLogger.defaultLogError("An I/O problem occurred while exporting the model. See exception for details.", t);
-                               cp.setErrorMessage("An I/O problem occurred while exporting the model.\nMessage: " + t.getMessage());
+                               ErrorLogger.defaultLogError("An I/O problem occurred while exporting the model. See exception for details.", t); //$NON-NLS-1$
+                               cp.setErrorMessage(NLS.bind(Messages.ExportCoreWizard_IOProblem, t.getMessage()));
                        } else {
-                               ErrorLogger.defaultLogError("Unexpected exception while exporting the model. See exception for details.", t);
-                               cp.setErrorMessage("Unexpected exception while exporting the model. See error log for details.\nMessage: " + t.getMessage());
+                               ErrorLogger.defaultLogError("Unexpected exception while exporting the model. See exception for details.", t); //$NON-NLS-1$
+                               cp.setErrorMessage(NLS.bind(Messages.ExportCoreWizard_UnexpectedException, t.getMessage()));
                        }
                        return false;
                } catch (InterruptedException e) {