directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r721120 [1/3] - in /directory/studio/trunk/schemaeditor/src/main: java/org/apache/directory/studio/schemaeditor/view/wizards/ resources/org/apache/directory/studio/schemaeditor/view/wizards/
Date Thu, 27 Nov 2008 08:41:49 GMT
Author: felixk
Date: Thu Nov 27 00:41:48 2008
New Revision: 721120

URL: http://svn.apache.org/viewvc?rev=721120&view=rev
Log:
Externalize Strings

Added:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/Messages.java   (with props)
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/wizards/
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/wizards/messages.properties   (with props)
Modified:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesInformationWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportCoreSchemasWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportProjectsWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportProjectsWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportSchemasFromOpenLdapWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportSchemasFromOpenLdapWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportSchemasFromXmlWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportSchemasFromXmlWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeContentWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassContentWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassMandatoryAttributesPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassOptionalAttributesPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardConnectionSelectionPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardInformationPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizardSchemasSelectionPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewSchemaWizardPage.java

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java Thu Nov 27 00:41:48 2008
@@ -51,9 +51,9 @@
      */
     protected CommitChangesDifferencesWizardPage()
     {
-        super( "CommitChangesDifferencesWizardPage" );
-        setTitle( "Commit Changes" );
-        setDescription( "Displays the modifications made on the schema." );
+        super( "CommitChangesDifferencesWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "CommitChangesDifferencesWizardPage.CommitChanges" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "CommitChangesDifferencesWizardPage.DisplayModifications" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor( PluginConstants.IMG_COMMIT_CHANGES_WIZARD ) );
     }
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesInformationWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesInformationWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesInformationWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/CommitChangesInformationWizardPage.java Thu Nov 27 00:41:48 2008
@@ -48,9 +48,9 @@
      */
     protected CommitChangesInformationWizardPage()
     {
-        super( "CommitChangesInformationWizardPage" );
-        setTitle( "Commit Changes" );
-        setDescription( "Please read the following information before committing the changes made on the schema." );
+        super( "CommitChangesInformationWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "CommitChangesInformationWizardPage.CommitChanges" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "CommitChangesInformationWizardPage.PleaseReadInformationBeforeCommitting" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor( PluginConstants.IMG_COMMIT_CHANGES_WIZARD ) );
     }
 
@@ -66,9 +66,7 @@
         composite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Information Label
-        String informationString = "You are about to commit changes to Apache Directory Server." + "\n\n"
-            + "Please carefully review the changes made on the schema on the next page." + "\n\n"
-            + "Commiting changes with an inconsistent schema may corrupt you server.";
+        String informationString = Messages.getString( "CommitChangesInformationWizardPage.YouAreAboutToCommit" ); //$NON-NLS-1$
         Label informationLabel = new Label( composite, SWT.WRAP );
         informationLabel.setText( informationString );
         informationLabel.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, true ) );

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizard.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizard.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizard.java Thu Nov 27 00:41:48 2008
@@ -36,6 +36,7 @@
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IExportWizard;
 import org.eclipse.ui.IWorkbench;
 
@@ -86,7 +87,8 @@
             {
                 public void run( IProgressMonitor monitor )
                 {
-                    monitor.beginTask( "Exporting project: ", selectedProjects.length );
+                    monitor.beginTask(
+                        Messages.getString( "ExportProjectsWizard.ExportingProject" ), selectedProjects.length ); //$NON-NLS-1$
                     for ( Project project : selectedProjects )
                     {
                         monitor.subTask( project.getName() );
@@ -94,32 +96,44 @@
                         try
                         {
                             OutputFormat outformat = OutputFormat.createPrettyPrint();
-                            outformat.setEncoding( "UTF-8" );
-                            XMLWriter writer = new XMLWriter( new FileOutputStream( exportDirectory + "/"
-                                + project.getName() + ".schemaproject" ), outformat );
+                            outformat.setEncoding( "UTF-8" ); //$NON-NLS-1$
+                            XMLWriter writer = new XMLWriter( new FileOutputStream( exportDirectory + "/" //$NON-NLS-1$
+                                + project.getName() + ".schemaproject" ), outformat ); //$NON-NLS-1$
                             writer.write( ProjectsExporter.toDocument( project ) );
                             writer.flush();
                         }
                         catch ( UnsupportedEncodingException e )
                         {
-                            PluginUtils.logError(
-                                "An error occured when saving the project " + project.getName() + ".", e );
-                            ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the project "
-                                + project.getName() + "." );
+                            PluginUtils
+                                .logError(
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ExportProjectsWizard.ErrorWhenSavingProject" ), new String[] { project.getName() } ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ExportProjectsWizard.Error" ), NLS.bind( Messages.getString( "ExportProjectsWizard.ErrorWhenSavingProject" ), new String[] { project.getName() } ) ); //$NON-NLS-1$
                         }
                         catch ( FileNotFoundException e )
                         {
-                            PluginUtils.logError(
-                                "An error occured when saving the project " + project.getName() + ".", e );
-                            ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the project "
-                                + project.getName() + "." );
+                            PluginUtils
+                                .logError(
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ExportProjectsWizard.ErrorWhenSavingProject" ), new String[] { project.getName() } ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ExportProjectsWizard.Error" ), NLS.bind( Messages.getString( "ExportProjectsWizard.ErrorWhenSavingProject" ), new String[] { project.getName() } ) ); //$NON-NLS-1$
                         }
                         catch ( IOException e )
                         {
-                            PluginUtils.logError(
-                                "An error occured when saving the project " + project.getName() + ".", e );
-                            ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the project "
-                                + project.getName() + "." );
+                            PluginUtils
+                                .logError(
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ExportProjectsWizard.ErrorWhenSavingProject" ), new String[] { project.getName() } ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ExportProjectsWizard.Error" ), NLS.bind( Messages.getString( "ExportProjectsWizard.ErrorWhenSavingProject" ), new String[] { project.getName() } ) ); //$NON-NLS-1$
                         }
                         monitor.worked( 1 );
                     }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportProjectsWizardPage.java Thu Nov 27 00:41:48 2008
@@ -81,9 +81,9 @@
      */
     protected ExportProjectsWizardPage()
     {
-        super( "ExportProjectsWizardPage" );
-        setTitle( "Export schema projects" );
-        setDescription( "Please select the schema projects to export." );
+        super( "ExportProjectsWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "ExportProjectsWizardPage.ExportSchemaProjects" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "ExportProjectsWizardPage.PleaseSelectSchemaProjects" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor( PluginConstants.IMG_PROJECT_EXPORT_WIZARD ) );
     }
 
@@ -99,13 +99,13 @@
 
         // Projects Group
         Group schemaProjectsGroup = new Group( composite, SWT.NONE );
-        schemaProjectsGroup.setText( "Schema projects" );
+        schemaProjectsGroup.setText( Messages.getString( "ExportProjectsWizardPage.SchemaProjects" ) ); //$NON-NLS-1$
         schemaProjectsGroup.setLayout( new GridLayout( 2, false ) );
         schemaProjectsGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Projects TableViewer
         Label projectsLabel = new Label( schemaProjectsGroup, SWT.NONE );
-        projectsLabel.setText( "Select the schema projects to export:" );
+        projectsLabel.setText( Messages.getString( "ExportProjectsWizardPage.SelectSchemaProjects" ) ); //$NON-NLS-1$
         projectsLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
         projectsTableViewer = new CheckboxTableViewer( new Table( schemaProjectsGroup, SWT.BORDER | SWT.CHECK
             | SWT.FULL_SELECTION ) );
@@ -159,7 +159,7 @@
             }
         } );
         projectsTableSelectAllButton = new Button( schemaProjectsGroup, SWT.PUSH );
-        projectsTableSelectAllButton.setText( "Select All" );
+        projectsTableSelectAllButton.setText( Messages.getString( "ExportProjectsWizardPage.SelectAll" ) ); //$NON-NLS-1$
         projectsTableSelectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         projectsTableSelectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -170,7 +170,7 @@
             }
         } );
         projectsTableDeselectAllButton = new Button( schemaProjectsGroup, SWT.PUSH );
-        projectsTableDeselectAllButton.setText( "Deselect All" );
+        projectsTableDeselectAllButton.setText( Messages.getString( "ExportProjectsWizardPage.DeselectAll" ) ); //$NON-NLS-1$
         projectsTableDeselectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         projectsTableDeselectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -183,12 +183,12 @@
 
         // Export Destination Group
         Group exportDestinationGroup = new Group( composite, SWT.NULL );
-        exportDestinationGroup.setText( "Export Destination" );
+        exportDestinationGroup.setText( Messages.getString( "ExportProjectsWizardPage.ExportDestination" ) ); //$NON-NLS-1$
         exportDestinationGroup.setLayout( new GridLayout( 3, false ) );
         exportDestinationGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         exportDirectoryLabel = new Label( exportDestinationGroup, SWT.NONE );
-        exportDirectoryLabel.setText( "Directory:" );
+        exportDirectoryLabel.setText( Messages.getString( "ExportProjectsWizardPage.Directory" ) ); //$NON-NLS-1$
         exportDirectoryText = new Text( exportDestinationGroup, SWT.BORDER );
         exportDirectoryText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         exportDirectoryText.addModifyListener( new ModifyListener()
@@ -199,7 +199,7 @@
             }
         } );
         exportDirectoryButton = new Button( exportDestinationGroup, SWT.PUSH );
-        exportDirectoryButton.setText( "Browse..." );
+        exportDirectoryButton.setText( Messages.getString( "ExportProjectsWizardPage.Browse" ) ); //$NON-NLS-1$
         exportDirectoryButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -247,9 +247,9 @@
     private void chooseExportDirectory()
     {
         DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
-        dialog.setText( "Choose Folder" );
-        dialog.setMessage( "Select the folder in which export the files." );
-        if ( "".equals( exportDirectoryText.getText() ) )
+        dialog.setText( Messages.getString( "ExportProjectsWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
+        dialog.setMessage( Messages.getString( "ExportProjectsWizardPage.SelectFolderToExportTo" ) ); //$NON-NLS-1$
+        if ( "".equals( exportDirectoryText.getText() ) ) //$NON-NLS-1$
         {
             dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                 PluginConstants.FILE_DIALOG_EXPORT_PROJECTS ) );
@@ -275,15 +275,15 @@
         // Schemas table
         if ( projectsTableViewer.getCheckedElements().length == 0 )
         {
-            displayErrorMessage( "One or several schema projects must be selected." );
+            displayErrorMessage( Messages.getString( "ExportProjectsWizardPage.ErrorNoSchemaSelected" ) ); //$NON-NLS-1$
             return;
         }
 
         // Export Directory
         String directory = exportDirectoryText.getText();
-        if ( ( directory == null ) || ( directory.equals( "" ) ) )
+        if ( ( directory == null ) || ( directory.equals( "" ) ) ) //$NON-NLS-1$
         {
-            displayErrorMessage( "A directory must be selected." );
+            displayErrorMessage( Messages.getString( "ExportProjectsWizardPage.ErrorNoDirectorySelected" ) ); //$NON-NLS-1$
             return;
         }
         else
@@ -291,17 +291,17 @@
             File directoryFile = new File( directory );
             if ( !directoryFile.exists() )
             {
-                displayErrorMessage( "The selected directory does not exist." );
+                displayErrorMessage( Messages.getString( "ExportProjectsWizardPage.SelectedDirectoryNotExists" ) ); //$NON-NLS-1$
                 return;
             }
             else if ( !directoryFile.isDirectory() )
             {
-                displayErrorMessage( "The selected directory is not a directory." );
+                displayErrorMessage( Messages.getString( "ExportProjectsWizardPage.SelectedDirectoryNotDirectory" ) ); //$NON-NLS-1$
                 return;
             }
             else if ( !directoryFile.canWrite() )
             {
-                displayErrorMessage( "The selected directory is not writable." );
+                displayErrorMessage( Messages.getString( "ExportProjectsWizardPage.SelectedDirectoryNotWritable" ) ); //$NON-NLS-1$
                 return;
             }
         }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizard.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizard.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizard.java Thu Nov 27 00:41:48 2008
@@ -33,6 +33,7 @@
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IExportWizard;
 import org.eclipse.ui.IWorkbench;
 
@@ -83,24 +84,30 @@
             {
                 public void run( IProgressMonitor monitor )
                 {
-                    monitor.beginTask( "Exporting schemas: ", selectedSchemas.length );
+                    monitor.beginTask(
+                        Messages.getString( "ExportSchemasAsOpenLdapWizard.ExportingSchemas" ), selectedSchemas.length ); //$NON-NLS-1$
                     for ( Schema schema : selectedSchemas )
                     {
                         monitor.subTask( schema.getName() );
 
                         try
                         {
-                            BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportDirectory + "/"
-                                + schema.getName() + ".schema" ) );
+                            BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportDirectory + "/" //$NON-NLS-1$
+                                + schema.getName() + ".schema" ) ); //$NON-NLS-1$
                             buffWriter.write( OpenLdapSchemaFileExporter.toSourceCode( schema ) );
                             buffWriter.close();
                         }
                         catch ( IOException e )
                         {
-                            PluginUtils.logError( "An error occured when saving the schema " + schema.getName() + ".",
-                                e );
-                            ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schema "
-                                + schema.getName() + "." );
+                            PluginUtils
+                                .logError(
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ExportSchemasAsOpenLdapWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ), //$NON-NLS-1$
+                                    e );
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ExportSchemasAsOpenLdapWizard.Error" ), NLS.bind( Messages.getString( "ExportSchemasAsOpenLdapWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ) ); //$NON-NLS-1$
                         }
                         monitor.worked( 1 );
                     }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsOpenLdapWizardPage.java Thu Nov 27 00:41:48 2008
@@ -84,9 +84,9 @@
      */
     protected ExportSchemasAsOpenLdapWizardPage()
     {
-        super( "ExportSchemasAsOpenLdapWizardPage" );
-        setTitle( "Export schemas as OpenLdap files" );
-        setDescription( "Please select the schemas to export as OpenLdap files." );
+        super( "ExportSchemasAsOpenLdapWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ExportSchemaAsOpenLDAP" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.PleaseSelectSchemaExportOpenLDAP" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor( PluginConstants.IMG_SCHEMAS_EXPORT_WIZARD ) );
         schemaHandler = Activator.getDefault().getSchemaHandler();
     }
@@ -103,13 +103,13 @@
 
         // Schemas Group
         Group schemasGroup = new Group( composite, SWT.NONE );
-        schemasGroup.setText( "Schemas" );
+        schemasGroup.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.Schemas" ) ); //$NON-NLS-1$
         schemasGroup.setLayout( new GridLayout( 2, false ) );
         schemasGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Schemas TableViewer
         Label schemasLabel = new Label( schemasGroup, SWT.NONE );
-        schemasLabel.setText( "Select the schemas to export:" );
+        schemasLabel.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.SelectSchemasToExport" ) ); //$NON-NLS-1$
         schemasLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
         schemasTableViewer = new CheckboxTableViewer( new Table( schemasGroup, SWT.BORDER | SWT.CHECK
             | SWT.FULL_SELECTION ) );
@@ -156,7 +156,7 @@
             }
         } );
         schemasTableSelectAllButton = new Button( schemasGroup, SWT.PUSH );
-        schemasTableSelectAllButton.setText( "Select All" );
+        schemasTableSelectAllButton.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.SelectAll" ) ); //$NON-NLS-1$
         schemasTableSelectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         schemasTableSelectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -167,7 +167,7 @@
             }
         } );
         schemasTableDeselectAllButton = new Button( schemasGroup, SWT.PUSH );
-        schemasTableDeselectAllButton.setText( "Deselect All" );
+        schemasTableDeselectAllButton.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.DeselectAll" ) ); //$NON-NLS-1$
         schemasTableDeselectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         schemasTableDeselectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -180,12 +180,12 @@
 
         // Export Destination Group
         Group exportDestinationGroup = new Group( composite, SWT.NULL );
-        exportDestinationGroup.setText( "Export Destination" );
+        exportDestinationGroup.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ExportDestination" ) ); //$NON-NLS-1$
         exportDestinationGroup.setLayout( new GridLayout( 3, false ) );
         exportDestinationGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         exportDirectoryLabel = new Label( exportDestinationGroup, SWT.NONE );
-        exportDirectoryLabel.setText( "Directory:" );
+        exportDirectoryLabel.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.Directory" ) ); //$NON-NLS-1$
         exportDirectoryText = new Text( exportDestinationGroup, SWT.BORDER );
         exportDirectoryText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         exportDirectoryText.addModifyListener( new ModifyListener()
@@ -196,7 +196,7 @@
             }
         } );
         exportDirectoryButton = new Button( exportDestinationGroup, SWT.PUSH );
-        exportDirectoryButton.setText( "Browse..." );
+        exportDirectoryButton.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.Browse" ) ); //$NON-NLS-1$
         exportDirectoryButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -249,9 +249,9 @@
     private void chooseExportDirectory()
     {
         DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
-        dialog.setText( "Choose Folder" );
-        dialog.setMessage( "Select the folder in which export the files." );
-        if ( "".equals( exportDirectoryText.getText() ) )
+        dialog.setText( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
+        dialog.setMessage( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.SelectFolderToExport" ) ); //$NON-NLS-1$
+        if ( "".equals( exportDirectoryText.getText() ) ) //$NON-NLS-1$
         {
             dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                 PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_OPENLDAP ) );
@@ -277,22 +277,22 @@
         // Checking if a Schema Project is open
         if ( schemaHandler == null )
         {
-            displayErrorMessage( "A Schema Project must be open to export schemas as OpenLDAP files." );
+            displayErrorMessage( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ErrorNoOpenSchemaProject" ) ); //$NON-NLS-1$
             return;
         }
 
         // Schemas table
         if ( schemasTableViewer.getCheckedElements().length == 0 )
         {
-            displayErrorMessage( "One or several schemas must be selected." );
+            displayErrorMessage( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ErrorNoSchemaSelected" ) ); //$NON-NLS-1$
             return;
         }
 
         // Export Directory
         String directory = exportDirectoryText.getText();
-        if ( ( directory == null ) || ( directory.equals( "" ) ) )
+        if ( ( directory == null ) || ( directory.equals( "" ) ) ) //$NON-NLS-1$
         {
-            displayErrorMessage( "A directory must be selected." );
+            displayErrorMessage( Messages.getString( "ExportSchemasAsOpenLdapWizardPage.ErrorNotDirectorySelected" ) ); //$NON-NLS-1$
             return;
         }
         else
@@ -300,17 +300,20 @@
             File directoryFile = new File( directory );
             if ( !directoryFile.exists() )
             {
-                displayErrorMessage( "The selected directory does not exist." );
+                displayErrorMessage( Messages
+                    .getString( "ExportSchemasAsOpenLdapWizardPage.ErrorSelectedDirectoryNotExists" ) ); //$NON-NLS-1$
                 return;
             }
             else if ( !directoryFile.isDirectory() )
             {
-                displayErrorMessage( "The selected directory is not a directory." );
+                displayErrorMessage( Messages
+                    .getString( "ExportSchemasAsOpenLdapWizardPage.ErrorSelectedDirectoryNotDirectory" ) ); //$NON-NLS-1$
                 return;
             }
             else if ( !directoryFile.canWrite() )
             {
-                displayErrorMessage( "The selected directory is not writable." );
+                displayErrorMessage( Messages
+                    .getString( "ExportSchemasAsOpenLdapWizardPage.ErrorSelectedDirectoryNotWritable" ) ); //$NON-NLS-1$
                 return;
             }
         }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizard.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizard.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizard.java Thu Nov 27 00:41:48 2008
@@ -33,6 +33,7 @@
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IExportWizard;
 import org.eclipse.ui.IWorkbench;
 
@@ -86,24 +87,29 @@
                 {
                     public void run( IProgressMonitor monitor )
                     {
-                        monitor.beginTask( "Exporting schemas: ", selectedSchemas.length );
+                        monitor.beginTask(
+                            Messages.getString( "ExportSchemasAsXmlWizard.ExportingSchemas" ), selectedSchemas.length ); //$NON-NLS-1$
                         for ( Schema schema : selectedSchemas )
                         {
                             monitor.subTask( schema.getName() );
 
                             try
                             {
-                                BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportDirectory + "/"
-                                    + schema.getName() + ".xml" ) );
+                                BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportDirectory + "/" //$NON-NLS-1$
+                                    + schema.getName() + ".xml" ) ); //$NON-NLS-1$
                                 buffWriter.write( XMLSchemaFileExporter.toXml( schema ) );
                                 buffWriter.close();
                             }
                             catch ( IOException e )
                             {
-                                PluginUtils.logError( "An error occured when saving the schema " + schema.getName()
-                                    + ".", e );
-                                ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schema "
-                                    + schema.getName() + "." );
+                                PluginUtils
+                                    .logError(
+                                        NLS
+                                            .bind(
+                                                Messages.getString( "ExportSchemasAsXmlWizard.ErrorWhenSavingSchema" ), new String[] { schema.getName() } ), e ); //$NON-NLS-1$
+                                ViewUtils
+                                    .displayErrorMessageBox(
+                                        Messages.getString( "ExportSchemasAsXmlWizard.Error" ), NLS.bind( Messages.getString( "ExportSchemasAsXmlWizard.ErrorWhenSavingSchema" ), new String[] { schema.getName() } ) ); //$NON-NLS-1$
                             }
                             monitor.worked( 1 );
                         }
@@ -129,7 +135,7 @@
                 {
                     public void run( IProgressMonitor monitor )
                     {
-                        monitor.beginTask( "Exporting schemas", 1 );
+                        monitor.beginTask( Messages.getString( "ExportSchemasAsXmlWizard.ExportingSchemas" ), 1 ); //$NON-NLS-1$
                         try
                         {
                             BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportFile ) );
@@ -138,8 +144,11 @@
                         }
                         catch ( IOException e )
                         {
-                            PluginUtils.logError( "An error occured when saving the schemas.", e );
-                            ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schemas." );
+                            PluginUtils.logError( Messages
+                                .getString( "ExportSchemasAsXmlWizard.ErrorWhenSavingSchemas" ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ExportSchemasAsXmlWizard.Error" ), Messages.getString( "ExportSchemasAsXmlWizard.ErrorWhenSavingSchemas" ) ); //$NON-NLS-1$ //$NON-NLS-2$
                         }
                         monitor.worked( 1 );
                         monitor.done();

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasAsXmlWizardPage.java Thu Nov 27 00:41:48 2008
@@ -93,9 +93,9 @@
      */
     protected ExportSchemasAsXmlWizardPage()
     {
-        super( "ExportSchemasAsXmlWizardPage" );
-        setTitle( "Export schemas as XML file(s)" );
-        setDescription( "Please select the schemas to export as XML file(s)." );
+        super( "ExportSchemasAsXmlWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "ExportSchemasAsXmlWizardPage.ExportSchemaAsXML" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "ExportSchemasAsXmlWizardPage.PleaseSelectSchemas" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor( PluginConstants.IMG_SCHEMAS_EXPORT_WIZARD ) );
         schemaHandler = Activator.getDefault().getSchemaHandler();
     }
@@ -112,13 +112,13 @@
 
         // Schemas Group
         Group schemasGroup = new Group( composite, SWT.NONE );
-        schemasGroup.setText( "Schemas" );
+        schemasGroup.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.Schemas" ) ); //$NON-NLS-1$
         schemasGroup.setLayout( new GridLayout( 2, false ) );
         schemasGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Schemas TableViewer
         Label schemasLabel = new Label( schemasGroup, SWT.NONE );
-        schemasLabel.setText( "Select the schemas to export:" );
+        schemasLabel.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.SelectSchemasToExport" ) ); //$NON-NLS-1$
         schemasLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
         schemasTableViewer = new CheckboxTableViewer( new Table( schemasGroup, SWT.BORDER | SWT.CHECK
             | SWT.FULL_SELECTION ) );
@@ -165,7 +165,7 @@
             }
         } );
         schemasTableSelectAllButton = new Button( schemasGroup, SWT.PUSH );
-        schemasTableSelectAllButton.setText( "Select All" );
+        schemasTableSelectAllButton.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.SelectAll" ) ); //$NON-NLS-1$
         schemasTableSelectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         schemasTableSelectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -176,7 +176,7 @@
             }
         } );
         schemasTableDeselectAllButton = new Button( schemasGroup, SWT.PUSH );
-        schemasTableDeselectAllButton.setText( "Deselect All" );
+        schemasTableDeselectAllButton.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.DeselectAll" ) ); //$NON-NLS-1$
         schemasTableDeselectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         schemasTableDeselectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -189,13 +189,14 @@
 
         // Export Destination Group
         Group exportDestinationGroup = new Group( composite, SWT.NULL );
-        exportDestinationGroup.setText( "Export Destination" );
+        exportDestinationGroup.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.ExportDdestination" ) ); //$NON-NLS-1$
         exportDestinationGroup.setLayout( new GridLayout( 4, false ) );
         exportDestinationGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Export Multiple Files
         exportMultipleFilesRadio = new Button( exportDestinationGroup, SWT.RADIO );
-        exportMultipleFilesRadio.setText( "Export each schema as a separate file." );
+        exportMultipleFilesRadio.setText( Messages
+            .getString( "ExportSchemasAsXmlWizardPage.ExportEachSchemaAsSeparateFile" ) ); //$NON-NLS-1$
         exportMultipleFilesRadio.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
         exportMultipleFilesRadio.addSelectionListener( new SelectionAdapter()
         {
@@ -206,9 +207,9 @@
             }
         } );
         Label exportMultipleFilesFiller = new Label( exportDestinationGroup, SWT.NONE );
-        exportMultipleFilesFiller.setText( "    " );
+        exportMultipleFilesFiller.setText( "    " ); //$NON-NLS-1$
         exportMultipleFilesLabel = new Label( exportDestinationGroup, SWT.NONE );
-        exportMultipleFilesLabel.setText( "Directory:" );
+        exportMultipleFilesLabel.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.Directory" ) ); //$NON-NLS-1$
         exportMultipleFilesText = new Text( exportDestinationGroup, SWT.BORDER );
         exportMultipleFilesText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         exportMultipleFilesText.addModifyListener( new ModifyListener()
@@ -219,7 +220,7 @@
             }
         } );
         exportMultipleFilesButton = new Button( exportDestinationGroup, SWT.PUSH );
-        exportMultipleFilesButton.setText( "Browse..." );
+        exportMultipleFilesButton.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.Browse" ) ); //$NON-NLS-1$
         exportMultipleFilesButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -231,7 +232,7 @@
 
         // Export Single File
         exportSingleFileRadio = new Button( exportDestinationGroup, SWT.RADIO );
-        exportSingleFileRadio.setText( "Export the schemas as a single file." );
+        exportSingleFileRadio.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.ExportSchemaAsSingleFile" ) ); //$NON-NLS-1$
         exportSingleFileRadio.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
         exportSingleFileRadio.addSelectionListener( new SelectionAdapter()
         {
@@ -242,9 +243,9 @@
             }
         } );
         Label exportSingleFileFiller = new Label( exportDestinationGroup, SWT.NONE );
-        exportSingleFileFiller.setText( "    " );
+        exportSingleFileFiller.setText( "    " ); //$NON-NLS-1$
         exportSingleFileLabel = new Label( exportDestinationGroup, SWT.NONE );
-        exportSingleFileLabel.setText( "Export File:" );
+        exportSingleFileLabel.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.ExportFile" ) ); //$NON-NLS-1$
         exportSingleFileText = new Text( exportDestinationGroup, SWT.BORDER );
         exportSingleFileText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         exportSingleFileText.addModifyListener( new ModifyListener()
@@ -255,7 +256,7 @@
             }
         } );
         exportSingleFileButton = new Button( exportDestinationGroup, SWT.PUSH );
-        exportSingleFileButton.setText( "Browse..." );
+        exportSingleFileButton.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.Browse" ) ); //$NON-NLS-1$
         exportSingleFileButton.addSelectionListener( new SelectionAdapter()
         {
             /* (non-Javadoc)
@@ -348,9 +349,9 @@
     private void chooseExportDirectory()
     {
         DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
-        dialog.setText( "Choose Folder" );
-        dialog.setMessage( "Select the folder in which export the files." );
-        if ( "".equals( exportMultipleFilesText.getText() ) )
+        dialog.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
+        dialog.setMessage( Messages.getString( "ExportSchemasAsXmlWizardPage.SelectFolderToExport" ) ); //$NON-NLS-1$
+        if ( "".equals( exportMultipleFilesText.getText() ) ) //$NON-NLS-1$
         {
             dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                 PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_XML ) );
@@ -374,12 +375,14 @@
     private void chooseExportFile()
     {
         FileDialog dialog = new FileDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.SAVE );
-        dialog.setText( "Select File" );
+        dialog.setText( Messages.getString( "ExportSchemasAsXmlWizardPage.SelectFile" ) ); //$NON-NLS-1$
         dialog.setFilterExtensions( new String[]
-            { "*.xml", "*" } );
-        dialog.setFilterNames( new String[]
-            { "XML Files", "All Files" } );
-        if ( "".equals( exportSingleFileText.getText() ) )
+            { "*.xml", "*" } ); //$NON-NLS-1$ //$NON-NLS-2$
+        dialog
+            .setFilterNames( new String[]
+                {
+                    Messages.getString( "ExportSchemasAsXmlWizardPage.XMLFiles" ), Messages.getString( "ExportSchemasAsXmlWizardPage.AllFiles" ) } ); //$NON-NLS-1$ //$NON-NLS-2$
+        if ( Messages.getString( "ExportSchemasAsXmlWizardPage.24" ).equals( exportSingleFileText.getText() ) ) //$NON-NLS-1$
         {
             dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                 PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_XML ) );
@@ -405,14 +408,14 @@
         // Checking if a Schema Project is open
         if ( schemaHandler == null )
         {
-            displayErrorMessage( "A Schema Project must be open to export schemas as XML files." );
+            displayErrorMessage( Messages.getString( "ExportSchemasAsXmlWizardPage.ErrorNoOpenSchemaProject" ) ); //$NON-NLS-1$
             return;
         }
 
         // Schemas table
         if ( schemasTableViewer.getCheckedElements().length == 0 )
         {
-            displayErrorMessage( "One or several schemas must be selected." );
+            displayErrorMessage( Messages.getString( "ExportSchemasAsXmlWizardPage.ErrorNoSelectedSchema" ) ); //$NON-NLS-1$
             return;
         }
 
@@ -420,9 +423,9 @@
         if ( exportMultipleFilesRadio.getSelection() )
         {
             String directory = exportMultipleFilesText.getText();
-            if ( ( directory == null ) || ( directory.equals( "" ) ) )
+            if ( ( directory == null ) || ( directory.equals( "" ) ) ) //$NON-NLS-1$
             {
-                displayErrorMessage( "A directory must be selected." );
+                displayErrorMessage( Messages.getString( "ExportSchemasAsXmlWizardPage.ErrorNotSelectedDirectory" ) ); //$NON-NLS-1$
                 return;
             }
             else
@@ -430,17 +433,20 @@
                 File directoryFile = new File( directory );
                 if ( !directoryFile.exists() )
                 {
-                    displayErrorMessage( "The selected directory does not exist." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasAsXmlWizardPage.ErrorSelectedDirectoryNotExists" ) ); //$NON-NLS-1$
                     return;
                 }
                 else if ( !directoryFile.isDirectory() )
                 {
-                    displayErrorMessage( "The selected directory is not a directory." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasAsXmlWizardPage.ErrorSelectedDirectoryNotDirectory" ) ); //$NON-NLS-1$
                     return;
                 }
                 else if ( !directoryFile.canWrite() )
                 {
-                    displayErrorMessage( "The selected directory is not writable." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasAsXmlWizardPage.ErrorSelectedDirectoryNotWritable" ) ); //$NON-NLS-1$
                     return;
                 }
             }
@@ -448,9 +454,9 @@
         else if ( exportSingleFileRadio.getSelection() )
         {
             String exportFile = exportSingleFileText.getText();
-            if ( ( exportFile == null ) || ( exportFile.equals( "" ) ) )
+            if ( ( exportFile == null ) || ( exportFile.equals( "" ) ) ) //$NON-NLS-1$
             {
-                displayErrorMessage( "A file must be selected." );
+                displayErrorMessage( Messages.getString( "ExportSchemasAsXmlWizardPage.ErrorNoFileSelected" ) ); //$NON-NLS-1$
                 return;
             }
             else
@@ -458,7 +464,8 @@
                 File file = new File( exportFile );
                 if ( !file.getParentFile().canWrite() )
                 {
-                    displayErrorMessage( "The selected file is not writable." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasAsXmlWizardPage.ErrorSelectedFileNotWritable" ) ); //$NON-NLS-1$
                     return;
                 }
             }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java Thu Nov 27 00:41:48 2008
@@ -46,6 +46,7 @@
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IExportWizard;
 import org.eclipse.ui.IWorkbench;
 
@@ -99,7 +100,8 @@
                 {
                     public void run( IProgressMonitor monitor )
                     {
-                        monitor.beginTask( "Exporting schemas: ", selectedSchemas.length );
+                        monitor.beginTask(
+                            Messages.getString( "ExportSchemasForADSWizard.ExportingSchemas" ), selectedSchemas.length ); //$NON-NLS-1$
                         for ( Schema schema : selectedSchemas )
                         {
                             monitor.subTask( schema.getName() );
@@ -107,31 +109,41 @@
                             StringBuffer sb = new StringBuffer();
                             DateFormat format = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.MEDIUM );
                             Date date = new Date();
-                            sb.append( "# Generated by Apache Directory Studio on " + format.format( date ) + "\n" );
-                            sb.append( "\n" );
+                            sb
+                                .append( NLS
+                                    .bind(
+                                        Messages.getString( "ExportSchemasForADSWizard.GeneratedByApacheComment" ), new String[] { format.format( date ) } ) ); //$NON-NLS-1$ 
 
                             try
                             {
                                 toLdif( schema, sb );
 
-                                BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportDirectory + "/"
-                                    + schema.getName() + ".ldif" ) );
+                                BufferedWriter buffWriter = new BufferedWriter( new FileWriter( exportDirectory + "/" //$NON-NLS-1$
+                                    + schema.getName() + ".ldif" ) ); //$NON-NLS-1$
                                 buffWriter.write( sb.toString() );
                                 buffWriter.close();
                             }
                             catch ( IOException e )
                             {
-                                PluginUtils.logError( "An error occured when saving the schema " + schema.getName()
-                                    + ".", e );
-                                ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schema "
-                                    + schema.getName() + "." );
+                                PluginUtils
+                                    .logError(
+                                        NLS
+                                            .bind(
+                                                Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ), e ); //$NON-NLS-1$
+                                ViewUtils
+                                    .displayErrorMessageBox(
+                                        Messages.getString( "ExportSchemasForADSWizard.Error" ), NLS.bind( Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ) ); //$NON-NLS-1$
                             }
                             catch ( NamingException e )
                             {
-                                PluginUtils.logError( "An error occured when saving the schema " + schema.getName()
-                                    + ".", e );
-                                ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schema "
-                                    + schema.getName() + "." );
+                                PluginUtils
+                                    .logError(
+                                        NLS
+                                            .bind(
+                                                Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ), e ); //$NON-NLS-1$
+                                ViewUtils
+                                    .displayErrorMessageBox(
+                                        Messages.getString( "ExportSchemasForADSWizard.Error" ), NLS.bind( Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ) ); //$NON-NLS-1$
                             }
                             monitor.worked( 1 );
                         }
@@ -157,13 +169,15 @@
                 {
                     public void run( IProgressMonitor monitor )
                     {
-                        monitor.beginTask( "Exporting schemas ", 1 );
+                        monitor.beginTask( Messages.getString( "ExportSchemasForADSWizard.ExportingSchemas" ), 1 ); //$NON-NLS-1$
 
                         StringBuffer sb = new StringBuffer();
                         DateFormat format = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.MEDIUM );
                         Date date = new Date();
-                        sb.append( "# Generated by Apache Directory Studio on " + format.format( date ) + "\n" );
-                        sb.append( "\n" );
+                        sb
+                            .append( NLS
+                                .bind(
+                                    Messages.getString( "ExportSchemasForADSWizard.GeneratedByApacheComment" ), new String[] { format.format( date ) } ) ); //$NON-NLS-1$
 
                         for ( Schema schema : selectedSchemas )
                         {
@@ -173,10 +187,14 @@
                             }
                             catch ( NamingException e )
                             {
-                                PluginUtils.logError( "An error occured when saving the schema " + schema.getName()
-                                    + ".", e );
-                                ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schema "
-                                    + schema.getName() + "." );
+                                PluginUtils
+                                    .logError(
+                                        NLS
+                                            .bind(
+                                                Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ), e ); //$NON-NLS-1$
+                                ViewUtils
+                                    .displayErrorMessageBox(
+                                        Messages.getString( "ExportSchemasForADSWizard.Error" ), NLS.bind( Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchema" ), new String[] { schema.getName() } ) ); //$NON-NLS-1$
                             }
                         }
 
@@ -188,8 +206,11 @@
                         }
                         catch ( IOException e )
                         {
-                            PluginUtils.logError( "An error occured when saving the schemas.", e );
-                            ViewUtils.displayErrorMessageBox( "Error", "An error occured when saving the schemas." );
+                            PluginUtils.logError(
+                                Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchemas" ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ExportSchemasForADSWizard.Error" ), Messages.getString( "ExportSchemasForADSWizard.ErrorSavingSchemas" ) ); //$NON-NLS-1$ //$NON-NLS-2$
                         }
                         monitor.worked( 1 );
                         monitor.done();
@@ -222,25 +243,28 @@
      */
     private void toLdif( Schema schema, StringBuffer sb ) throws NamingException
     {
-        sb.append( "# SCHEMA '" + schema.getName().toUpperCase() + "'\n" );
-
-        sb.append( "dn: cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: metaSchema\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "cn: " + schema.getName() + "\n" );
+        sb
+            .append( NLS
+                .bind(
+                    Messages.getString( "ExportSchemasForADSWizard.SchemaComment" ), new String[] { schema.getName().toUpperCase() } ) ); //$NON-NLS-1$ 
+
+        sb.append( "dn: cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: metaSchema\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "cn: " + schema.getName() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
         String[] schemaDependencies = getSchemaDependencies( schema );
         for ( String schemaName : schemaDependencies )
         {
-            sb.append( "m-dependencies: " + schemaName + "\n" );
+            sb.append( "m-dependencies: " + schemaName + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
         }
-        sb.append( "\n" );
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Attribute Types Node
-        sb.append( "dn: ou=attributeTypes, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: attributetypes\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=attributeTypes, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: attributetypes\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generating LDIF for Attributes Types
         for ( AttributeTypeImpl at : schema.getAttributeTypes() )
@@ -265,64 +289,64 @@
             holder.setOidLen( at.getLength() );
             holder.setUsage( at.getUsage() );
 
-            sb.append( holder.toLdif( schema.getName() ) + "\n" );
+            sb.append( holder.toLdif( schema.getName() ) + "\n" ); //$NON-NLS-1$
         }
 
         // Generation the Comparators Node
-        sb.append( "dn: ou=comparators, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: comparators\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=comparators, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: comparators\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the DIT Content Rules Node
-        sb.append( "dn: ou=ditContentRules, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: ditcontentrules\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=ditContentRules, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: ditcontentrules\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the DIT Structure RulesNode
-        sb.append( "dn: ou=ditStructureRules, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: ditstructurerules\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=ditStructureRules, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: ditstructurerules\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Matching Rules Node
-        sb.append( "dn: ou=matchingRules, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: matchingrules\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=matchingRules, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: matchingrules\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Matching Rule Use Node
-        sb.append( "dn: ou=matchingRuleUse, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: matchingruleuse\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=matchingRuleUse, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: matchingruleuse\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Name Forms Node
-        sb.append( "dn: ou=nameForms, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: nameforms\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=nameForms, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: nameforms\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Normalizers Node
-        sb.append( "dn: ou=normalizers, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: normalizers\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=normalizers, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: normalizers\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Object Classes Node
-        sb.append( "dn: ou=objectClasses, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: objectClasses\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=objectClasses, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: objectClasses\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generating LDIF for Object Classes
         for ( ObjectClassImpl oc : schema.getObjectClasses() )
@@ -356,22 +380,22 @@
             holder.setSuperiors( superiorList );
             holder.setObsolete( oc.isObsolete() );
 
-            sb.append( holder.toLdif( schema.getName() ) + "\n" );
+            sb.append( holder.toLdif( schema.getName() ) + "\n" ); //$NON-NLS-1$
         }
 
         // Generation the Syntax Checkers Node
-        sb.append( "dn: ou=syntaxCheckers, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: syntaxcheckers\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=syntaxCheckers, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: syntaxcheckers\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
 
         // Generation the Syntaxes Node
-        sb.append( "dn: ou=syntaxes, cn=" + schema.getName() + ", ou=schema\n" );
-        sb.append( "objectclass: organizationalUnit\n" );
-        sb.append( "objectclass: top\n" );
-        sb.append( "ou: syntaxes\n" );
-        sb.append( "\n" );
+        sb.append( "dn: ou=syntaxes, cn=" + schema.getName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        sb.append( "objectclass: organizationalUnit\n" ); //$NON-NLS-1$
+        sb.append( "objectclass: top\n" ); //$NON-NLS-1$
+        sb.append( "ou: syntaxes\n" ); //$NON-NLS-1$
+        sb.append( "\n" ); //$NON-NLS-1$
     }
 
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizardPage.java Thu Nov 27 00:41:48 2008
@@ -93,9 +93,9 @@
      */
     protected ExportSchemasForADSWizardPage()
     {
-        super( "ExportSchemasForADSWizardPage" );
-        setTitle( "Export schemas for Apache DS" );
-        setDescription( "Please select the schemas to export for Apache DS." );
+        super( "ExportSchemasForADSWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "ExportSchemasForADSWizardPage.ExportSchemas" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "ExportSchemasForADSWizardPage.PleaseSelectSchemasToExport" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor(
             PluginConstants.IMG_SCHEMAS_EXPORT_FOR_ADS_WIZARD ) );
         schemaHandler = Activator.getDefault().getSchemaHandler();
@@ -113,13 +113,13 @@
 
         // Schemas Group
         Group schemasGroup = new Group( composite, SWT.NONE );
-        schemasGroup.setText( "Schemas" );
+        schemasGroup.setText( Messages.getString( "ExportSchemasForADSWizardPage.Schemas" ) ); //$NON-NLS-1$
         schemasGroup.setLayout( new GridLayout( 2, false ) );
         schemasGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Schemas TableViewer
         Label schemasLabel = new Label( schemasGroup, SWT.NONE );
-        schemasLabel.setText( "Select the schemas to export:" );
+        schemasLabel.setText( Messages.getString( "ExportSchemasForADSWizardPage.SelectSchemaToExport" ) ); //$NON-NLS-1$
         schemasLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
         schemasTableViewer = new CheckboxTableViewer( new Table( schemasGroup, SWT.BORDER | SWT.CHECK
             | SWT.FULL_SELECTION ) );
@@ -166,7 +166,7 @@
             }
         } );
         schemasTableSelectAllButton = new Button( schemasGroup, SWT.PUSH );
-        schemasTableSelectAllButton.setText( "Select All" );
+        schemasTableSelectAllButton.setText( Messages.getString( "ExportSchemasForADSWizardPage.SelectAll" ) ); //$NON-NLS-1$
         schemasTableSelectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         schemasTableSelectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -177,7 +177,7 @@
             }
         } );
         schemasTableDeselectAllButton = new Button( schemasGroup, SWT.PUSH );
-        schemasTableDeselectAllButton.setText( "Deselect All" );
+        schemasTableDeselectAllButton.setText( Messages.getString( "ExportSchemasForADSWizardPage.DeselectAll" ) ); //$NON-NLS-1$
         schemasTableDeselectAllButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
         schemasTableDeselectAllButton.addSelectionListener( new SelectionAdapter()
         {
@@ -190,13 +190,14 @@
 
         // Export Destination Group
         Group exportDestinationGroup = new Group( composite, SWT.NULL );
-        exportDestinationGroup.setText( "Export Destination" );
+        exportDestinationGroup.setText( Messages.getString( "ExportSchemasForADSWizardPage.ExportDestination" ) ); //$NON-NLS-1$
         exportDestinationGroup.setLayout( new GridLayout( 4, false ) );
         exportDestinationGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Export Multiple Files
         exportMultipleFilesRadio = new Button( exportDestinationGroup, SWT.RADIO );
-        exportMultipleFilesRadio.setText( "Export each schema as a separate file." );
+        exportMultipleFilesRadio.setText( Messages
+            .getString( "ExportSchemasForADSWizardPage.ExportSchemaAsSeparateFiles" ) ); //$NON-NLS-1$
         exportMultipleFilesRadio.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
         exportMultipleFilesRadio.addSelectionListener( new SelectionAdapter()
         {
@@ -207,9 +208,9 @@
             }
         } );
         Label exportMultipleFilesFiller = new Label( exportDestinationGroup, SWT.NONE );
-        exportMultipleFilesFiller.setText( "    " );
+        exportMultipleFilesFiller.setText( "    " ); //$NON-NLS-1$
         exportMultipleFilesLabel = new Label( exportDestinationGroup, SWT.NONE );
-        exportMultipleFilesLabel.setText( "Directory:" );
+        exportMultipleFilesLabel.setText( Messages.getString( "ExportSchemasForADSWizardPage.Directory" ) ); //$NON-NLS-1$
         exportMultipleFilesText = new Text( exportDestinationGroup, SWT.BORDER );
         exportMultipleFilesText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         exportMultipleFilesText.addModifyListener( new ModifyListener()
@@ -220,7 +221,7 @@
             }
         } );
         exportMultipleFilesButton = new Button( exportDestinationGroup, SWT.PUSH );
-        exportMultipleFilesButton.setText( "Browse..." );
+        exportMultipleFilesButton.setText( Messages.getString( "ExportSchemasForADSWizardPage.Browse" ) ); //$NON-NLS-1$
         exportMultipleFilesButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -232,7 +233,7 @@
 
         // Export Single File
         exportSingleFileRadio = new Button( exportDestinationGroup, SWT.RADIO );
-        exportSingleFileRadio.setText( "Export the schemas as a single file." );
+        exportSingleFileRadio.setText( Messages.getString( "ExportSchemasForADSWizardPage.ExportSchemaAsSingleFile" ) ); //$NON-NLS-1$
         exportSingleFileRadio.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 1 ) );
         exportSingleFileRadio.addSelectionListener( new SelectionAdapter()
         {
@@ -243,9 +244,9 @@
             }
         } );
         Label exportSingleFileFiller = new Label( exportDestinationGroup, SWT.NONE );
-        exportSingleFileFiller.setText( "    " );
+        exportSingleFileFiller.setText( "    " ); //$NON-NLS-1$
         exportSingleFileLabel = new Label( exportDestinationGroup, SWT.NONE );
-        exportSingleFileLabel.setText( "Export File:" );
+        exportSingleFileLabel.setText( Messages.getString( "ExportSchemasForADSWizardPage.ExportFile" ) ); //$NON-NLS-1$
         exportSingleFileText = new Text( exportDestinationGroup, SWT.BORDER );
         exportSingleFileText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         exportSingleFileText.addModifyListener( new ModifyListener()
@@ -256,7 +257,7 @@
             }
         } );
         exportSingleFileButton = new Button( exportDestinationGroup, SWT.PUSH );
-        exportSingleFileButton.setText( "Browse..." );
+        exportSingleFileButton.setText( Messages.getString( "ExportSchemasForADSWizardPage.Browse" ) ); //$NON-NLS-1$
         exportSingleFileButton.addSelectionListener( new SelectionAdapter()
         {
             /* (non-Javadoc)
@@ -349,9 +350,9 @@
     private void chooseExportDirectory()
     {
         DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
-        dialog.setText( "Choose Folder" );
-        dialog.setMessage( "Select the folder in which export the files." );
-        if ( "".equals( exportMultipleFilesText.getText() ) )
+        dialog.setText( Messages.getString( "ExportSchemasForADSWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
+        dialog.setMessage( Messages.getString( "ExportSchemasForADSWizardPage.SelectFolderToExportTo" ) ); //$NON-NLS-1$
+        if ( "".equals( exportMultipleFilesText.getText() ) ) //$NON-NLS-1$
         {
             dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                 PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_APACHE_DS ) );
@@ -375,12 +376,14 @@
     private void chooseExportFile()
     {
         FileDialog dialog = new FileDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.SAVE );
-        dialog.setText( "Select File" );
+        dialog.setText( Messages.getString( "ExportSchemasForADSWizardPage.SelectFile" ) ); //$NON-NLS-1$
         dialog.setFilterExtensions( new String[]
-            { "*.ldif", "*" } );
-        dialog.setFilterNames( new String[]
-            { "LDIF Files", "All Files" } );
-        if ( "".equals( exportSingleFileText.getText() ) )
+            { "*.ldif", "*" } ); //$NON-NLS-1$ //$NON-NLS-2$
+        dialog
+            .setFilterNames( new String[]
+                {
+                    Messages.getString( "ExportSchemasForADSWizardPage.LDIFFiles" ), Messages.getString( "ExportSchemasForADSWizardPage.AllFiles" ) } ); //$NON-NLS-1$ //$NON-NLS-2$
+        if ( "".equals( exportSingleFileText.getText() ) ) //$NON-NLS-1$
         {
             dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                 PluginConstants.FILE_DIALOG_EXPORT_SCHEMAS_APACHE_DS ) );
@@ -406,14 +409,14 @@
         // Checking if a Schema Project is open
         if ( schemaHandler == null )
         {
-            displayErrorMessage( "A Schema Project must be open to export schemas for Apache DS." );
+            displayErrorMessage( Messages.getString( "ExportSchemasForADSWizardPage.ErrorNoSchemaProjectOpen" ) ); //$NON-NLS-1$
             return;
         }
 
         // Schemas table
         if ( schemasTableViewer.getCheckedElements().length == 0 )
         {
-            displayErrorMessage( "One or several schemas must be selected." );
+            displayErrorMessage( Messages.getString( "ExportSchemasForADSWizardPage.ErrorNoSchemaSelected" ) ); //$NON-NLS-1$
             return;
         }
 
@@ -421,9 +424,9 @@
         if ( exportMultipleFilesRadio.getSelection() )
         {
             String directory = exportMultipleFilesText.getText();
-            if ( ( directory == null ) || ( directory.equals( "" ) ) )
+            if ( ( directory == null ) || ( directory.equals( "" ) ) ) //$NON-NLS-1$
             {
-                displayErrorMessage( "A directory must be selected." );
+                displayErrorMessage( Messages.getString( "ExportSchemasForADSWizardPage.ErrorNoDirectorySelected" ) ); //$NON-NLS-1$
                 return;
             }
             else
@@ -431,17 +434,20 @@
                 File directoryFile = new File( directory );
                 if ( !directoryFile.exists() )
                 {
-                    displayErrorMessage( "The selected directory does not exist." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasForADSWizardPage.ErrorSelectedDirectoryNotExists" ) ); //$NON-NLS-1$
                     return;
                 }
                 else if ( !directoryFile.isDirectory() )
                 {
-                    displayErrorMessage( "The selected directory is not a directory." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasForADSWizardPage.ErrorSelectedDirectoryNotDirectory" ) ); //$NON-NLS-1$
                     return;
                 }
                 else if ( !directoryFile.canWrite() )
                 {
-                    displayErrorMessage( "The selected directory is not writable." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasForADSWizardPage.ErrorSelectedDirectoryNotWritable" ) ); //$NON-NLS-1$
                     return;
                 }
             }
@@ -449,9 +455,9 @@
         else if ( exportSingleFileRadio.getSelection() )
         {
             String exportFile = exportSingleFileText.getText();
-            if ( ( exportFile == null ) || ( exportFile.equals( "" ) ) )
+            if ( ( exportFile == null ) || ( exportFile.equals( "" ) ) ) //$NON-NLS-1$
             {
-                displayErrorMessage( "A file must be selected." );
+                displayErrorMessage( Messages.getString( "ExportSchemasForADSWizardPage.ErrorNoFileSelected" ) ); //$NON-NLS-1$
                 return;
             }
             else
@@ -459,7 +465,8 @@
                 File file = new File( exportFile );
                 if ( !file.getParentFile().canWrite() )
                 {
-                    displayErrorMessage( "The selected file is not writable." );
+                    displayErrorMessage( Messages
+                        .getString( "ExportSchemasForADSWizardPage.ErrorSelectedFileNotWritable" ) ); //$NON-NLS-1$
                     return;
                 }
             }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportCoreSchemasWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportCoreSchemasWizardPage.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportCoreSchemasWizardPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportCoreSchemasWizardPage.java Thu Nov 27 00:41:48 2008
@@ -52,9 +52,9 @@
      */
     protected ImportCoreSchemasWizardPage()
     {
-        super( "ImportCoreSchemasWizardPage" );
-        setTitle( "Import core schemas" );
-        setDescription( "Please select the 'core' schemas to import." );
+        super( "ImportCoreSchemasWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "ImportCoreSchemasWizardPage.ImportCoreSchemas" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "ImportCoreSchemasWizardPage.PleaseSelectCoreSchemas" ) ); //$NON-NLS-1$
         setImageDescriptor( Activator.getDefault().getImageDescriptor( PluginConstants.IMG_SCHEMAS_IMPORT_WIZARD ) );
     }
 
@@ -95,7 +95,7 @@
         // Checking if a Schema Project is open
         if ( Activator.getDefault().getSchemaHandler() == null )
         {
-            displayErrorMessage( "A Schema Project must be open to import core schemas files." );
+            displayErrorMessage( Messages.getString( "ImportCoreSchemasWizardPage.ErrorNoSchemaProjectOpen" ) ); //$NON-NLS-1$
             return;
         }
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportProjectsWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportProjectsWizard.java?rev=721120&r1=721119&r2=721120&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportProjectsWizard.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ImportProjectsWizard.java Thu Nov 27 00:41:48 2008
@@ -36,6 +36,7 @@
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IImportWizard;
 import org.eclipse.ui.IWorkbench;
 
@@ -84,7 +85,8 @@
             {
                 public void run( IProgressMonitor monitor )
                 {
-                    monitor.beginTask( "Importing projects: ", selectedProjectFiles.length );
+                    monitor.beginTask(
+                        Messages.getString( "ImportProjectsWizard.ImportingProjects" ), selectedProjectFiles.length ); //$NON-NLS-1$
 
                     for ( File projectFile : selectedProjectFiles )
                     {
@@ -97,17 +99,31 @@
                         }
                         catch ( ProjectsImportException e )
                         {
-                            PluginUtils.logError( "An error occured when importing project " + projectFile.getName()
-                                + ".", e );
-                            ViewUtils.displayErrorMessageBox( "Import Error",
-                                "An error occured when importing project " + projectFile.getName() + "." );
+                            PluginUtils
+                                .logError(
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ImportProjectsWizard.ErrorImportingProject" ), new String[] { projectFile.getName() } ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ImportProjectsWizard.ImportError" ), //$NON-NLS-1$
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ImportProjectsWizard.ErrorImportingProject" ), new String[] { projectFile.getName() } ) ); //$NON-NLS-1$
                         }
                         catch ( FileNotFoundException e )
                         {
-                            PluginUtils.logError( "An error occured when importing project " + projectFile.getName()
-                                + ".", e );
-                            ViewUtils.displayErrorMessageBox( "Import Error",
-                                "An error occured when importing project " + projectFile.getName() + "." );
+                            PluginUtils
+                                .logError(
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ImportProjectsWizard.ErrorImportingProject" ), new String[] { projectFile.getName() } ), e ); //$NON-NLS-1$
+                            ViewUtils
+                                .displayErrorMessageBox(
+                                    Messages.getString( "ImportProjectsWizard.ImportError" ), //$NON-NLS-1$
+                                    NLS
+                                        .bind(
+                                            Messages.getString( "ImportProjectsWizard.ErrorImportingProject" ), new String[] { projectFile.getName() } ) ); //$NON-NLS-1$
                         }
                         monitor.worked( 1 );
                     }



Mime
View raw message