directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r720539 [1/2] - in /directory/studio/trunk/schemaeditor/src/main: java/org/apache/directory/studio/schemaeditor/view/preferences/ java/org/apache/directory/studio/schemaeditor/view/search/ java/org/apache/directory/studio/schemaeditor/view/...
Date Tue, 25 Nov 2008 16:59:20 GMT
Author: felixk
Date: Tue Nov 25 08:59:19 2008
New Revision: 720539

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

Still todo
- widget
- wizards
- wrappers

Added:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java   (with props)
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java   (with props)
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java   (with props)
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/preferences/
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/preferences/messages.properties   (with props)
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/search/
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/search/messages.properties   (with props)
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/views/
    directory/studio/trunk/schemaeditor/src/main/resources/org/apache/directory/studio/schemaeditor/view/views/messages.properties   (with props)
Modified:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/HierarchyViewPreferencePage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/PluginPreferencePage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SchemaViewPreferencePage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SearchViewPreferencePage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/SearchPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyView.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewLabelProvider.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsView.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewLabelProvider.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewSortingDialog.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchViewLabelProvider.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchViewSortingDialog.java

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/HierarchyViewPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/HierarchyViewPreferencePage.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/HierarchyViewPreferencePage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/HierarchyViewPreferencePage.java Tue Nov 25 08:59:19 2008
@@ -54,15 +54,6 @@
     /** The preference page ID */
     public static final String ID = PluginConstants.PREF_PAGE_HIERARCHY_VIEW_ID;
 
-    /** The First Name category */
-    private static final String FIRST_NAME = "First Name";
-
-    /** The All Aliases category */
-    private static final String ALL_ALIASES = "All Aliases";
-
-    /** The OID category */
-    private static final String OID = "OID";
-
     // UI fields
     private Combo labelCombo;
     private Button limitButton;
@@ -80,7 +71,7 @@
     {
         super();
         super.setPreferenceStore( Activator.getDefault().getPreferenceStore() );
-        super.setDescription( "General settings for the Hierarchy View of the Schema Editor Plugin" );
+        super.setDescription( Messages.getString("HierarchyViewPreferencePage.GeneralSettings") ); //$NON-NLS-1$
     }
 
 
@@ -96,7 +87,7 @@
         // Label Group
         Group labelGroup = new Group( composite, SWT.NONE );
         labelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        labelGroup.setText( "Label" );
+        labelGroup.setText( Messages.getString("HierarchyViewPreferencePage.Label") ); //$NON-NLS-1$
         labelGroup.setLayout( new GridLayout() );
         Composite labelGroupComposite = new Composite( labelGroup, SWT.NONE );
         GridLayout gl = new GridLayout( 1, false );
@@ -115,18 +106,18 @@
 
         // Use Label
         Label useLabel = new Label( labelComposite, SWT.NONE );
-        useLabel.setText( "Use" );
+        useLabel.setText( Messages.getString("HierarchyViewPreferencePage.Use") ); //$NON-NLS-1$
 
         // Label Combo
         labelCombo = new Combo( labelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         labelCombo.setLayoutData( new GridData() );
         labelCombo.setItems( new String[]
-            { FIRST_NAME, ALL_ALIASES, OID } );
+            { Messages.getString("HierarchyViewPreferencePage.FirstName"), Messages.getString("HierarchyViewPreferencePage.AllAliases"), Messages.getString("HierarchyViewPreferencePage.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         labelCombo.setEnabled( true );
 
         // As label Label
         Label asLabel = new Label( labelComposite, SWT.NONE );
-        asLabel.setText( "as label." );
+        asLabel.setText( Messages.getString("HierarchyViewPreferencePage.AsLabel") ); //$NON-NLS-1$
 
         // Abbreviate row composite
         Composite abbreviateComposite = new Composite( labelGroupComposite, SWT.NONE );
@@ -139,7 +130,7 @@
 
         // Limit label lenght to Label
         limitButton = new Button( abbreviateComposite, SWT.CHECK );
-        limitButton.setText( "Limit label length to" );
+        limitButton.setText( Messages.getString("HierarchyViewPreferencePage.LimitLabel") ); //$NON-NLS-1$
         gd = new GridData();
         gd.horizontalSpan = 1;
         limitButton.setLayoutData( gd );
@@ -168,12 +159,12 @@
 
         // Characters Label
         Label charactersLabel = new Label( abbreviateComposite, SWT.NONE );
-        charactersLabel.setText( "characters." );
+        charactersLabel.setText( Messages.getString("HierarchyViewPreferencePage.Characters") ); //$NON-NLS-1$
 
         // Secondary Label Group
         Group secondaryLabelGroup = new Group( composite, SWT.NONE );
         secondaryLabelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        secondaryLabelGroup.setText( "Secondary label" );
+        secondaryLabelGroup.setText( Messages.getString("HierarchyViewPreferencePage.SecondaryLabel") ); //$NON-NLS-1$
         secondaryLabelGroup.setLayout( new GridLayout() );
         Composite secondaryLabelGroupComposite = new Composite( secondaryLabelGroup, SWT.NONE );
         gl = new GridLayout( 1, false );
@@ -182,7 +173,7 @@
         secondaryLabelGroupComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         secondaryLabelButtonDisplay = new Button( secondaryLabelGroupComposite, SWT.CHECK );
-        secondaryLabelButtonDisplay.setText( "Display secondary label." );
+        secondaryLabelButtonDisplay.setText( Messages.getString("HierarchyViewPreferencePage.DisplaySecondaryLabel") ); //$NON-NLS-1$
 
         // Label row composite
         Composite secondaryLabelComposite = new Composite( secondaryLabelGroupComposite, SWT.NONE );
@@ -195,18 +186,18 @@
 
         // Use Label
         Label useLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
-        useLabel2.setText( "Use" );
+        useLabel2.setText( Messages.getString("HierarchyViewPreferencePage.Use") ); //$NON-NLS-1$
 
         // Label Combo
         secondaryLabelCombo = new Combo( secondaryLabelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         secondaryLabelCombo.setLayoutData( new GridData() );
         secondaryLabelCombo.setItems( new String[]
-            { FIRST_NAME, ALL_ALIASES, OID } );
+            { Messages.getString("HierarchyViewPreferencePage.FirstName"), Messages.getString("HierarchyViewPreferencePage.AllAliases"), Messages.getString("HierarchyViewPreferencePage.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         secondaryLabelCombo.setEnabled( true );
 
         // As label Label
         Label asLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
-        asLabel2.setText( "as secondary label." );
+        asLabel2.setText( Messages.getString("HierarchyViewPreferencePage.AsSecondaryLabel") ); //$NON-NLS-1$
 
         // Abbreviate row composite
         Composite abbreviateComposite2 = new Composite( secondaryLabelGroup, SWT.NONE );
@@ -219,7 +210,7 @@
 
         // Limit label length to Label
         secondaryLabelLimitButton = new Button( abbreviateComposite2, SWT.CHECK );
-        secondaryLabelLimitButton.setText( "Limit secondary label length to" );
+        secondaryLabelLimitButton.setText( Messages.getString("HierarchyViewPreferencePage.LimitSecondaryLabel") ); //$NON-NLS-1$
         gd = new GridData();
         gd.horizontalSpan = 1;
         secondaryLabelLimitButton.setLayoutData( gd );
@@ -248,7 +239,7 @@
 
         // Characters Label
         Label secondaryLabelcharactersLabel = new Label( abbreviateComposite2, SWT.NONE );
-        secondaryLabelcharactersLabel.setText( "characters." );
+        secondaryLabelcharactersLabel.setText( Messages.getString("HierarchyViewPreferencePage.Characters") ); //$NON-NLS-1$
 
         initFieldsFromPreferences();
 
@@ -380,17 +371,17 @@
     {
         IPreferenceStore store = Activator.getDefault().getPreferenceStore();
 
-        if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( FIRST_NAME ) )
+        if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("HierarchyViewPreferencePage.FirstName") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_LABEL,
                 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_FIRST_NAME );
         }
-        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( ALL_ALIASES ) )
+        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("HierarchyViewPreferencePage.AllAliases") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_LABEL,
                 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES );
         }
-        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( OID ) )
+        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("HierarchyViewPreferencePage.OID") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_LABEL, PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID );
         }
@@ -399,17 +390,17 @@
 
         store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL_DISPLAY, secondaryLabelButtonDisplay
             .getSelection() );
-        if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( FIRST_NAME ) )
+        if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("HierarchyViewPreferencePage.FirstName") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_FIRST_NAME );
         }
-        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( ALL_ALIASES ) )
+        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("HierarchyViewPreferencePage.AllAliases") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES );
         }
-        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( OID ) )
+        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("HierarchyViewPreferencePage.OID") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID );

Added: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java?rev=720539&view=auto
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java (added)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java Tue Nov 25 08:59:19 2008
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.schemaeditor.view.preferences;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.schemaeditor.view.preferences.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Propchange: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/PluginPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/PluginPreferencePage.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/PluginPreferencePage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/PluginPreferencePage.java Tue Nov 25 08:59:19 2008
@@ -63,7 +63,7 @@
     {
         super();
         setPreferenceStore( Activator.getDefault().getPreferenceStore() );
-        setDescription( "General settings for the Schema Editor Plugin" );
+        setDescription( Messages.getString("PluginPreferencePage.GeneralSettings") ); //$NON-NLS-1$
     }
 
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SchemaViewPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SchemaViewPreferencePage.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SchemaViewPreferencePage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SchemaViewPreferencePage.java Tue Nov 25 08:59:19 2008
@@ -53,15 +53,6 @@
     /** The preference page ID */
     public static final String ID = PluginConstants.PREF_PAGE_SCHEMA_VIEW_ID;
 
-    /** The First Name category */
-    private static final String FIRST_NAME = "First Name";
-
-    /** The All Aliases category */
-    private static final String ALL_ALIASES = "All Aliases";
-
-    /** The OID category */
-    private static final String OID = "OID";
-
     // UI fields
     private Combo labelCombo;
     private Button limitButton;
@@ -80,7 +71,7 @@
     {
         super();
         setPreferenceStore( Activator.getDefault().getPreferenceStore() );
-        setDescription( "General settings for the Schema View of the Schema Editor Plugin" );
+        setDescription( Messages.getString("SchemaViewPreferencePage.GeneralSettings") ); //$NON-NLS-1$
     }
 
 
@@ -96,7 +87,7 @@
         // Label Group
         Group labelGroup = new Group( composite, SWT.NONE );
         labelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        labelGroup.setText( "Label" );
+        labelGroup.setText( Messages.getString("SchemaViewPreferencePage.Label") ); //$NON-NLS-1$
         labelGroup.setLayout( new GridLayout() );
         Composite labelGroupComposite = new Composite( labelGroup, SWT.NONE );
         GridLayout gl = new GridLayout( 1, false );
@@ -115,18 +106,18 @@
 
         // Use Label
         Label useLabel = new Label( labelComposite, SWT.NONE );
-        useLabel.setText( "Use" );
+        useLabel.setText( Messages.getString("SchemaViewPreferencePage.Use") ); //$NON-NLS-1$
 
         // Label Combo
         labelCombo = new Combo( labelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         labelCombo.setLayoutData( new GridData() );
         labelCombo.setItems( new String[]
-            { FIRST_NAME, ALL_ALIASES, OID } );
+            { Messages.getString("SchemaViewPreferencePage.FirstName"), Messages.getString("SchemaViewPreferencePage.AllAliases"), Messages.getString("SchemaViewPreferencePage.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         labelCombo.setEnabled( true );
 
         // As label Label
         Label asLabel = new Label( labelComposite, SWT.NONE );
-        asLabel.setText( "as label." );
+        asLabel.setText( Messages.getString("SchemaViewPreferencePage.AsLabel") ); //$NON-NLS-1$
 
         // Abbreviate row composite
         Composite abbreviateComposite = new Composite( labelGroupComposite, SWT.NONE );
@@ -139,7 +130,7 @@
 
         // Limit label lenght to Label
         limitButton = new Button( abbreviateComposite, SWT.CHECK );
-        limitButton.setText( "Limit label length to" );
+        limitButton.setText( Messages.getString("SchemaViewPreferencePage.LimitLabel") ); //$NON-NLS-1$
         gd = new GridData();
         gd.horizontalSpan = 1;
         limitButton.setLayoutData( gd );
@@ -168,12 +159,12 @@
 
         // Characters Label
         Label charactersLabel = new Label( abbreviateComposite, SWT.NONE );
-        charactersLabel.setText( "characters." );
+        charactersLabel.setText( Messages.getString("SchemaViewPreferencePage.Characters") ); //$NON-NLS-1$
 
         // Secondary Label Group
         Group secondaryLabelGroup = new Group( composite, SWT.NONE );
         secondaryLabelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        secondaryLabelGroup.setText( "Secondary label" );
+        secondaryLabelGroup.setText( Messages.getString("SchemaViewPreferencePage.SecondaryLabel") ); //$NON-NLS-1$
         secondaryLabelGroup.setLayout( new GridLayout() );
         Composite secondaryLabelGroupComposite = new Composite( secondaryLabelGroup, SWT.NONE );
         gl = new GridLayout( 1, false );
@@ -182,7 +173,7 @@
         secondaryLabelGroupComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         secondaryLabelButtonDisplay = new Button( secondaryLabelGroupComposite, SWT.CHECK );
-        secondaryLabelButtonDisplay.setText( "Display secondary label." );
+        secondaryLabelButtonDisplay.setText( Messages.getString("SchemaViewPreferencePage.DisplaySecondaryLabel") ); //$NON-NLS-1$
 
         // Label row composite
         Composite secondaryLabelComposite = new Composite( secondaryLabelGroupComposite, SWT.NONE );
@@ -195,18 +186,18 @@
 
         // Use Label
         Label useLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
-        useLabel2.setText( "Use" );
+        useLabel2.setText( Messages.getString("SchemaViewPreferencePage.Use") ); //$NON-NLS-1$
 
         // Label Combo
         secondaryLabelCombo = new Combo( secondaryLabelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         secondaryLabelCombo.setLayoutData( new GridData() );
         secondaryLabelCombo.setItems( new String[]
-            { FIRST_NAME, ALL_ALIASES, OID } );
+            { Messages.getString("SchemaViewPreferencePage.FirstName"), Messages.getString("SchemaViewPreferencePage.AllAliases"), Messages.getString("SchemaViewPreferencePage.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         secondaryLabelCombo.setEnabled( true );
 
         // As label Label
         Label asLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
-        asLabel2.setText( "as secondary label." );
+        asLabel2.setText( Messages.getString("SchemaViewPreferencePage.AsSecondaryLabel") ); //$NON-NLS-1$
 
         // Abbreviate row composite
         Composite abbreviateComposite2 = new Composite( secondaryLabelGroup, SWT.NONE );
@@ -219,7 +210,7 @@
 
         // Limit label lenght to Label
         secondaryLabelLimitButton = new Button( abbreviateComposite2, SWT.CHECK );
-        secondaryLabelLimitButton.setText( "Limit secondary label length to" );
+        secondaryLabelLimitButton.setText( Messages.getString("SchemaViewPreferencePage.LimitSecondaryLabel") ); //$NON-NLS-1$
         gd = new GridData();
         gd.horizontalSpan = 1;
         secondaryLabelLimitButton.setLayoutData( gd );
@@ -249,7 +240,7 @@
         // Schema Label Group
         Group schemaLabelGroup = new Group( composite, SWT.NONE );
         schemaLabelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        schemaLabelGroup.setText( "Schema label" );
+        schemaLabelGroup.setText( Messages.getString("SchemaViewPreferencePage.SchemaLabel") ); //$NON-NLS-1$
         schemaLabelGroup.setLayout( new GridLayout() );
         Composite schemaLabelGroupComposite = new Composite( schemaLabelGroup, SWT.NONE );
         gl = new GridLayout( 1, false );
@@ -258,11 +249,11 @@
         schemaLabelGroupComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         schemaLabelButtonDisplay = new Button( schemaLabelGroupComposite, SWT.CHECK );
-        schemaLabelButtonDisplay.setText( "Display schema name in label." );
+        schemaLabelButtonDisplay.setText( Messages.getString("SchemaViewPreferencePage.DisplaySchemaLabel") ); //$NON-NLS-1$
 
         // Characters Label
         Label secondaryLabelcharactersLabel = new Label( abbreviateComposite2, SWT.NONE );
-        secondaryLabelcharactersLabel.setText( "characters." );
+        secondaryLabelcharactersLabel.setText( Messages.getString("SchemaViewPreferencePage.Characters") ); //$NON-NLS-1$
 
         initFieldsFromPreferences();
 
@@ -400,17 +391,17 @@
     {
         IPreferenceStore store = Activator.getDefault().getPreferenceStore();
 
-        if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( FIRST_NAME ) )
+        if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewPreferencePage.FirstName") ) ) //$NON-NLS-1$
         {
             store
                 .setValue( PluginConstants.PREFS_SCHEMA_VIEW_LABEL, PluginConstants.PREFS_SCHEMA_VIEW_LABEL_FIRST_NAME );
         }
-        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( ALL_ALIASES ) )
+        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewPreferencePage.AllAliases") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_LABEL,
                 PluginConstants.PREFS_SCHEMA_VIEW_LABEL_ALL_ALIASES );
         }
-        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( OID ) )
+        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewPreferencePage.OID") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_LABEL, PluginConstants.PREFS_SCHEMA_VIEW_LABEL_OID );
         }
@@ -419,17 +410,17 @@
 
         store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_SECONDARY_LABEL_DISPLAY, secondaryLabelButtonDisplay
             .getSelection() );
-        if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( FIRST_NAME ) )
+        if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewPreferencePage.FirstName") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_SCHEMA_VIEW_LABEL_FIRST_NAME );
         }
-        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( ALL_ALIASES ) )
+        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewPreferencePage.AllAliases") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_SCHEMA_VIEW_LABEL_ALL_ALIASES );
         }
-        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( OID ) )
+        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewPreferencePage.OID") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_SCHEMA_VIEW_LABEL_OID );

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SearchViewPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SearchViewPreferencePage.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SearchViewPreferencePage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/preferences/SearchViewPreferencePage.java Tue Nov 25 08:59:19 2008
@@ -53,15 +53,6 @@
     /** The preference page ID */
     public static final String ID = PluginConstants.PREF_PAGE_SEARCH_VIEW_ID;
 
-    /** The First Name category */
-    private static final String FIRST_NAME = "First Name";
-
-    /** The All Aliases category */
-    private static final String ALL_ALIASES = "All Aliases";
-
-    /** The OID category */
-    private static final String OID = "OID";
-
     // UI fields
     private Combo labelCombo;
     private Button limitButton;
@@ -80,7 +71,7 @@
     {
         super();
         setPreferenceStore( Activator.getDefault().getPreferenceStore() );
-        setDescription( "General settings for the Search View of the Schema Editor Plugin" );
+        setDescription( Messages.getString("SearchViewPreferencePage.GeneralSettings") ); //$NON-NLS-1$
     }
 
 
@@ -96,7 +87,7 @@
         // Label Group
         Group labelGroup = new Group( composite, SWT.NONE );
         labelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        labelGroup.setText( "Label" );
+        labelGroup.setText( Messages.getString("SearchViewPreferencePage.Label") ); //$NON-NLS-1$
         labelGroup.setLayout( new GridLayout() );
         Composite labelGroupComposite = new Composite( labelGroup, SWT.NONE );
         GridLayout gl = new GridLayout( 1, false );
@@ -115,18 +106,18 @@
 
         // Use Label
         Label useLabel = new Label( labelComposite, SWT.NONE );
-        useLabel.setText( "Use" );
+        useLabel.setText( Messages.getString("SearchViewPreferencePage.Use") ); //$NON-NLS-1$
 
         // Label Combo
         labelCombo = new Combo( labelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         labelCombo.setLayoutData( new GridData() );
         labelCombo.setItems( new String[]
-            { FIRST_NAME, ALL_ALIASES, OID } );
+            { Messages.getString("SearchViewPreferencePage.FirstName"), Messages.getString("SearchViewPreferencePage.AllAliases"), Messages.getString("SearchViewPreferencePage.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         labelCombo.setEnabled( true );
 
         // As label Label
         Label asLabel = new Label( labelComposite, SWT.NONE );
-        asLabel.setText( "as label." );
+        asLabel.setText( Messages.getString("SearchViewPreferencePage.AsLabel") ); //$NON-NLS-1$
 
         // Abbreviate row composite
         Composite abbreviateComposite = new Composite( labelGroupComposite, SWT.NONE );
@@ -139,7 +130,7 @@
 
         // Limit label lenght to Label
         limitButton = new Button( abbreviateComposite, SWT.CHECK );
-        limitButton.setText( "Limit label length to" );
+        limitButton.setText( Messages.getString("SearchViewPreferencePage.LimitLength") ); //$NON-NLS-1$
         gd = new GridData();
         gd.horizontalSpan = 1;
         limitButton.setLayoutData( gd );
@@ -168,12 +159,12 @@
 
         // Characters Label
         Label charactersLabel = new Label( abbreviateComposite, SWT.NONE );
-        charactersLabel.setText( "characters." );
+        charactersLabel.setText( Messages.getString("SearchViewPreferencePage.Characters") ); //$NON-NLS-1$
 
         // Secondary Label Group
         Group secondaryLabelGroup = new Group( composite, SWT.NONE );
         secondaryLabelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        secondaryLabelGroup.setText( "Secondary label" );
+        secondaryLabelGroup.setText( Messages.getString("SearchViewPreferencePage.SecondaryLabel") ); //$NON-NLS-1$
         secondaryLabelGroup.setLayout( new GridLayout() );
         Composite secondaryLabelGroupComposite = new Composite( secondaryLabelGroup, SWT.NONE );
         gl = new GridLayout( 1, false );
@@ -182,7 +173,7 @@
         secondaryLabelGroupComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         secondaryLabelButtonDisplay = new Button( secondaryLabelGroupComposite, SWT.CHECK );
-        secondaryLabelButtonDisplay.setText( "Display secondary label." );
+        secondaryLabelButtonDisplay.setText( Messages.getString("SearchViewPreferencePage.DisplaySecondaryLabel") ); //$NON-NLS-1$
 
         // Label row composite
         Composite secondaryLabelComposite = new Composite( secondaryLabelGroupComposite, SWT.NONE );
@@ -195,18 +186,18 @@
 
         // Use Label
         Label useLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
-        useLabel2.setText( "Use" );
+        useLabel2.setText( Messages.getString("SearchViewPreferencePage.Use") ); //$NON-NLS-1$
 
         // Label Combo
         secondaryLabelCombo = new Combo( secondaryLabelComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         secondaryLabelCombo.setLayoutData( new GridData() );
         secondaryLabelCombo.setItems( new String[]
-            { FIRST_NAME, ALL_ALIASES, OID } );
+            { Messages.getString("SearchViewPreferencePage.FirstName"), Messages.getString("SearchViewPreferencePage.AllAliases"), Messages.getString("SearchViewPreferencePage.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         secondaryLabelCombo.setEnabled( true );
 
         // As label Label
         Label asLabel2 = new Label( secondaryLabelComposite, SWT.NONE );
-        asLabel2.setText( "as secondary label." );
+        asLabel2.setText( Messages.getString("SearchViewPreferencePage.AsSecondaryLabel") ); //$NON-NLS-1$
 
         // Abbreviate row composite
         Composite abbreviateComposite2 = new Composite( secondaryLabelGroup, SWT.NONE );
@@ -219,7 +210,7 @@
 
         // Limit label lenght to Label
         secondaryLabelLimitButton = new Button( abbreviateComposite2, SWT.CHECK );
-        secondaryLabelLimitButton.setText( "Limit secondary label length to" );
+        secondaryLabelLimitButton.setText( Messages.getString("SearchViewPreferencePage.LimitSecondaryLabel") ); //$NON-NLS-1$
         gd = new GridData();
         gd.horizontalSpan = 1;
         secondaryLabelLimitButton.setLayoutData( gd );
@@ -248,12 +239,12 @@
 
         // Characters Label
         Label secondaryLabelcharactersLabel = new Label( abbreviateComposite2, SWT.NONE );
-        secondaryLabelcharactersLabel.setText( "characters." );
+        secondaryLabelcharactersLabel.setText( Messages.getString("SearchViewPreferencePage.Characters") ); //$NON-NLS-1$
 
         // Schema Label Group
         Group schemaLabelGroup = new Group( composite, SWT.NONE );
         schemaLabelGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        schemaLabelGroup.setText( "Schema label" );
+        schemaLabelGroup.setText( Messages.getString("SearchViewPreferencePage.SchemaLabel") ); //$NON-NLS-1$
         schemaLabelGroup.setLayout( new GridLayout() );
         Composite schemaLabelGroupComposite = new Composite( schemaLabelGroup, SWT.NONE );
         gl = new GridLayout( 1, false );
@@ -262,7 +253,7 @@
         schemaLabelGroupComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         schemaLabelButtonDisplay = new Button( schemaLabelGroupComposite, SWT.CHECK );
-        schemaLabelButtonDisplay.setText( "Display schema name in label." );
+        schemaLabelButtonDisplay.setText( Messages.getString("SearchViewPreferencePage.DisplaySchemaLabel") ); //$NON-NLS-1$
 
         initFieldsFromPreferences();
 
@@ -400,17 +391,17 @@
     {
         IPreferenceStore store = Activator.getDefault().getPreferenceStore();
 
-        if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( FIRST_NAME ) )
+        if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("SearchViewPreferencePage.FirstName") ) ) //$NON-NLS-1$
         {
             store
                 .setValue( PluginConstants.PREFS_SEARCH_VIEW_LABEL, PluginConstants.PREFS_SEARCH_VIEW_LABEL_FIRST_NAME );
         }
-        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( ALL_ALIASES ) )
+        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("SearchViewPreferencePage.AllAliases") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SEARCH_VIEW_LABEL,
                 PluginConstants.PREFS_SEARCH_VIEW_LABEL_ALL_ALIASES );
         }
-        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( OID ) )
+        else if ( labelCombo.getItem( labelCombo.getSelectionIndex() ).equals( Messages.getString("SearchViewPreferencePage.OID") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SEARCH_VIEW_LABEL, PluginConstants.PREFS_SEARCH_VIEW_LABEL_OID );
         }
@@ -419,17 +410,17 @@
 
         store.setValue( PluginConstants.PREFS_SEARCH_VIEW_SECONDARY_LABEL_DISPLAY, secondaryLabelButtonDisplay
             .getSelection() );
-        if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( FIRST_NAME ) )
+        if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("SearchViewPreferencePage.FirstName") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SEARCH_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_SEARCH_VIEW_LABEL_FIRST_NAME );
         }
-        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( ALL_ALIASES ) )
+        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("SearchViewPreferencePage.AllAliases") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SEARCH_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_SEARCH_VIEW_LABEL_ALL_ALIASES );
         }
-        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( OID ) )
+        else if ( secondaryLabelCombo.getItem( secondaryLabelCombo.getSelectionIndex() ).equals( Messages.getString("SearchViewPreferencePage.OID") ) ) //$NON-NLS-1$
         {
             store.setValue( PluginConstants.PREFS_SEARCH_VIEW_SECONDARY_LABEL,
                 PluginConstants.PREFS_SEARCH_VIEW_LABEL_OID );

Added: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java?rev=720539&view=auto
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java (added)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java Tue Nov 25 08:59:19 2008
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.schemaeditor.view.search;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.schemaeditor.view.search.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Propchange: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/SearchPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/SearchPage.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/SearchPage.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/search/SearchPage.java Tue Nov 25 08:59:19 2008
@@ -94,7 +94,7 @@
 
         // Search String Label
         Label searchStringLabel = new Label( parent, SWT.NONE );
-        searchStringLabel.setText( "Search string (*=any string, ?=any character):" );
+        searchStringLabel.setText( Messages.getString("SearchPage.SearchString") ); //$NON-NLS-1$
         searchStringLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Search Combo
@@ -123,74 +123,74 @@
         // Search In Group
         Group searchInGroup = new Group( searchInComposite, SWT.NONE );
         searchInGroup.setLayout( new GridLayout() );
-        searchInGroup.setText( "Search in" );
+        searchInGroup.setText( Messages.getString("SearchPage.SearchIn") ); //$NON-NLS-1$
         searchInGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Aliases Button
         aliasesButton = new Button( searchInGroup, SWT.CHECK );
-        aliasesButton.setText( "Aliases" );
+        aliasesButton.setText( Messages.getString("SearchPage.Aliases") ); //$NON-NLS-1$
 
         // OID Button
         oidButton = new Button( searchInGroup, SWT.CHECK );
-        oidButton.setText( "OID" );
+        oidButton.setText( Messages.getString("SearchPage.OID") ); //$NON-NLS-1$
 
         // Description Button
         descriptionButon = new Button( searchInGroup, SWT.CHECK );
-        descriptionButon.setText( "Description" );
+        descriptionButon.setText( Messages.getString("SearchPage.Description") ); //$NON-NLS-1$
 
         // Attribute Types Group
         Group attributeTypesSearchInGroup = new Group( searchInComposite, SWT.NONE );
-        attributeTypesSearchInGroup.setText( "Seach in (for attribute types)" );
+        attributeTypesSearchInGroup.setText( Messages.getString("SearchPage.SearchInForAttribute") ); //$NON-NLS-1$
         attributeTypesSearchInGroup.setLayout( new GridLayout() );
         attributeTypesSearchInGroup.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
 
         // Superior Button
         superiorButton = new Button( attributeTypesSearchInGroup, SWT.CHECK );
-        superiorButton.setText( "Superior" );
+        superiorButton.setText( Messages.getString("SearchPage.Superior") ); //$NON-NLS-1$
 
         // Syntax Button
         syntaxButton = new Button( attributeTypesSearchInGroup, SWT.CHECK );
-        syntaxButton.setText( "Syntax" );
+        syntaxButton.setText( Messages.getString("SearchPage.Syntax") ); //$NON-NLS-1$
 
         // Matching Rules Button
         matchingRulesButton = new Button( attributeTypesSearchInGroup, SWT.CHECK );
-        matchingRulesButton.setText( "Matching Rules" );
+        matchingRulesButton.setText( Messages.getString("SearchPage.MatchingRules") ); //$NON-NLS-1$
 
         // Object Classes Group
         Group objectClassesSearchInGroup = new Group( searchInComposite, SWT.NONE );
-        objectClassesSearchInGroup.setText( "Search in (for object classes)" );
+        objectClassesSearchInGroup.setText( Messages.getString("SearchPage.SearchInObject") ); //$NON-NLS-1$
         objectClassesSearchInGroup.setLayout( new GridLayout() );
         objectClassesSearchInGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Superiors Button
         superiorsButton = new Button( objectClassesSearchInGroup, SWT.CHECK );
-        superiorsButton.setText( "Superiors" );
+        superiorsButton.setText( Messages.getString("SearchPage.Superiors") ); //$NON-NLS-1$
 
         // Mandatory Attributes Button
         mandatoryAttributesButton = new Button( objectClassesSearchInGroup, SWT.CHECK );
-        mandatoryAttributesButton.setText( "Mandatory Attributes" );
+        mandatoryAttributesButton.setText( Messages.getString("SearchPage.MandatoryAttributes") ); //$NON-NLS-1$
 
         // Optional Attributes Button
         optionalAttributesButton = new Button( objectClassesSearchInGroup, SWT.CHECK );
-        optionalAttributesButton.setText( "Optional Attributes" );
+        optionalAttributesButton.setText( Messages.getString("SearchPage.OptionalAttributes") ); //$NON-NLS-1$
 
         // Scope Group
         Group scopeGroup = new Group( parent, SWT.NONE );
-        scopeGroup.setText( "Scope" );
+        scopeGroup.setText( Messages.getString("SearchPage.Scope") ); //$NON-NLS-1$
         scopeGroup.setLayout( new GridLayout() );
         scopeGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Attribute Types and Object Classes
         attributeTypesAndObjectClassesButton = new Button( scopeGroup, SWT.RADIO );
-        attributeTypesAndObjectClassesButton.setText( "Attribute Types And Object Classes" );
+        attributeTypesAndObjectClassesButton.setText( Messages.getString("SearchPage.TypesAndClasses") ); //$NON-NLS-1$
 
         // Attribute Types Only
         attributeTypesOnlyButton = new Button( scopeGroup, SWT.RADIO );
-        attributeTypesOnlyButton.setText( "Attribute Types Only" );
+        attributeTypesOnlyButton.setText( Messages.getString("SearchPage.TypesOnly") ); //$NON-NLS-1$
 
         // Object Classes Only
         objectClassesOnly = new Button( scopeGroup, SWT.RADIO );
-        objectClassesOnly.setText( "Object Classes Only" );
+        objectClassesOnly.setText( Messages.getString("SearchPage.ClassesOnly") ); //$NON-NLS-1$
 
         initSearchStringHistory();
 
@@ -356,8 +356,8 @@
         }
         catch ( PartInitException e )
         {
-            PluginUtils.logError( "An error occured when opening the view.", e );
-            ViewUtils.displayErrorMessageBox( "Error", "An error occured when opening the view." );
+            PluginUtils.logError( Messages.getString("SearchPage.ErrorOpeningView"), e ); //$NON-NLS-1$
+            ViewUtils.displayErrorMessageBox( Messages.getString("SearchPage.Error"), Messages.getString("SearchPage.ErrorOpeningView") ); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         return true;

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyView.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyView.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyView.java Tue Nov 25 08:59:19 2008
@@ -77,7 +77,7 @@
 
         // Overview Label
         overviewLabel = new Label( parent, SWT.WRAP );
-        overviewLabel.setText( "" );
+        overviewLabel.setText( "" ); //$NON-NLS-1$
         overviewLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
         // Separator Label
@@ -89,7 +89,7 @@
         controller = new HierarchyViewController( this );
 
         // Help Context for Dynamic Help
-        PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, PluginConstants.PLUGIN_ID + "." + "hierarchy_view" );
+        PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, PluginConstants.PLUGIN_ID + "." + "hierarchy_view" ); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
 
@@ -147,7 +147,7 @@
         viewer.expandAll();
         if ( input == null )
         {
-            overviewLabel.setText( "" );
+            overviewLabel.setText( "" ); //$NON-NLS-1$
         }
         else
         {
@@ -161,7 +161,7 @@
             }
             else
             {
-                overviewLabel.setText( "" );
+                overviewLabel.setText( "" ); //$NON-NLS-1$
             }
         }
     }
@@ -184,11 +184,11 @@
         }
         else
         {
-            sb.append( "(None)" );
+            sb.append( Messages.getString("HierarchyView.None") ); //$NON-NLS-1$
         }
-        sb.append( " (" );
+        sb.append( " (" ); //$NON-NLS-1$
         sb.append( object.getOid() );
-        sb.append( ")  -  Schema:" );
+        sb.append( Messages.getString("HierarchyView.Schema") ); //$NON-NLS-1$
         sb.append( object.getSchema() );
 
         overviewLabel.setText( sb.toString() );

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewLabelProvider.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewLabelProvider.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewLabelProvider.java Tue Nov 25 08:59:19 2008
@@ -44,8 +44,6 @@
  */
 public class HierarchyViewLabelProvider extends LabelProvider
 {
-    private static final String NONE = "(None)";
-
     /** The preferences store */
     private IPreferenceStore store;
 
@@ -94,7 +92,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES )
@@ -106,7 +104,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID )
@@ -123,7 +121,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
 
@@ -147,7 +145,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES )
@@ -159,7 +157,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID )
@@ -176,7 +174,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
 
@@ -204,7 +202,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES )
@@ -216,7 +214,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID )
@@ -237,7 +235,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES )
@@ -249,7 +247,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("HierarchyViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID )

Added: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java?rev=720539&view=auto
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java (added)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java Tue Nov 25 08:59:19 2008
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.schemaeditor.view.views;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.schemaeditor.view.views.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Propchange: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsView.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsView.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsView.java Tue Nov 25 08:59:19 2008
@@ -72,7 +72,7 @@
     public void createPartControl( Composite parent )
     {
         // Help Context for Dynamic Help
-        PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, PluginConstants.PLUGIN_ID + "." + "problems_view" );
+        PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, PluginConstants.PLUGIN_ID + "." + "problems_view" ); //$NON-NLS-1$ //$NON-NLS-2$
 
         GridLayout gridLayout = new GridLayout();
         gridLayout.horizontalSpacing = 0;
@@ -113,10 +113,10 @@
         tree.setHeaderVisible( true );
         tree.setLinesVisible( true );
         TreeColumn descriptionColumn = new TreeColumn( tree, SWT.LEFT );
-        descriptionColumn.setText( "Description" );
+        descriptionColumn.setText( Messages.getString("ProblemsView.Description") ); //$NON-NLS-1$
         descriptionColumn.setWidth( 500 );
         TreeColumn resourceColumn = new TreeColumn( tree, SWT.LEFT );
-        resourceColumn.setText( "Resource" );
+        resourceColumn.setText( Messages.getString("ProblemsView.Resource") ); //$NON-NLS-1$
         resourceColumn.setWidth( 100 );
         contentProvider = new ProblemsViewContentProvider();
         treeViewer.setContentProvider( contentProvider );
@@ -178,27 +178,27 @@
         StringBuffer sb = new StringBuffer();
 
         sb.append( errors );
-        sb.append( " " );
+        sb.append( " " ); //$NON-NLS-1$
         if ( errors > 1 )
         {
-            sb.append( "errors" );
+            sb.append( Messages.getString("ProblemsView.Errors") ); //$NON-NLS-1$
         }
         else
         {
-            sb.append( "error" );
+            sb.append( Messages.getString("ProblemsView.Error") ); //$NON-NLS-1$
         }
 
-        sb.append( ", " );
+        sb.append( ", " ); //$NON-NLS-1$
 
         sb.append( warnings );
-        sb.append( " " );
+        sb.append( " " ); //$NON-NLS-1$
         if ( warnings > 1 )
         {
-            sb.append( "warnings" );
+            sb.append( Messages.getString("ProblemsView.Warnings") ); //$NON-NLS-1$
         }
         else
         {
-            sb.append( "warning" );
+            sb.append( Messages.getString("ProblemsView.Warning") ); //$NON-NLS-1$
         }
 
         overviewLabel.setText( sb.toString() );

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java Tue Nov 25 08:59:19 2008
@@ -111,7 +111,7 @@
             {
                 String name = warningWrapper.getSchemaWarning().getSource().getName();
 
-                if ( ( name != null ) && ( !name.equals( "" ) ) )
+                if ( ( name != null ) && ( !name.equals( "" ) ) ) //$NON-NLS-1$
                 {
                     return name;
                 }
@@ -126,11 +126,11 @@
             Folder folder = ( Folder ) element;
             if ( columnIndex == 0 )
             {
-                return folder.getName() + " (" + folder.getChildren().size() + ")";
+                return folder.getName() + " (" + folder.getChildren().size() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
             }
             else
             {
-                return "";
+                return ""; //$NON-NLS-1$
             }
         }
 
@@ -147,73 +147,73 @@
         {
             DuplicateAliasError duplicateAliasError = ( DuplicateAliasError ) element;
 
-            message.append( "Alias '" + duplicateAliasError.getAlias() + "' is already used by another item: " );
+            message.append( Messages.getString("ProblemsViewLabelProvider.AliasBegin") + duplicateAliasError.getAlias() + Messages.getString("ProblemsViewLabelProvider.AliasEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
             SchemaObject duplicate = duplicateAliasError.getDuplicate();
             if ( duplicate instanceof AttributeTypeImpl )
             {
-                message.append( "attribute type" );
+                message.append( Messages.getString("ProblemsViewLabelProvider.AttributeTypeSmall") ); //$NON-NLS-1$
             }
             else if ( duplicate instanceof ObjectClassImpl )
             {
-                message.append( "object class" );
+                message.append( Messages.getString("ProblemsViewLabelProvider.ObjectClassSmall") ); //$NON-NLS-1$
             }
-            message.append( " with OID '" + duplicate.getOid() + "'." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.WithOID") + duplicate.getOid() + "'." ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof DuplicateOidError )
         {
             DuplicateOidError duplicateOidError = ( DuplicateOidError ) element;
 
-            message.append( "OID '" + duplicateOidError.getOid() + "' is already used by another item: " );
+            message.append( Messages.getString("ProblemsViewLabelProvider.OIDBegin") + duplicateOidError.getOid() + Messages.getString("ProblemsViewLabelProvider.OIDEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
             SchemaObject duplicate = duplicateOidError.getDuplicate();
             if ( duplicate instanceof AttributeTypeImpl )
             {
-                message.append( "attribute type" );
+                message.append( Messages.getString("ProblemsViewLabelProvider.AttributeTypeSmall") ); //$NON-NLS-1$
             }
             else if ( duplicate instanceof ObjectClassImpl )
             {
-                message.append( "object class" );
+                message.append( Messages.getString("ProblemsViewLabelProvider.ObjectClassSmall") ); //$NON-NLS-1$
             }
-            message.append( " with alias '" + duplicate.getName() + "'." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.WithAlias") + duplicate.getName() + "'." ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof NonExistingATSuperiorError )
         {
             NonExistingATSuperiorError nonExistingATSuperiorError = ( NonExistingATSuperiorError ) element;
 
-            message.append( "Superior attribute type '" + nonExistingATSuperiorError.getSuperiorAlias()
-                + "' does not exist." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.SuperiorAttributeBegin") + nonExistingATSuperiorError.getSuperiorAlias() //$NON-NLS-1$
+                + Messages.getString("ProblemsViewLabelProvider.SuperiorAttributeEnd") ); //$NON-NLS-1$
         }
         else if ( element instanceof NonExistingOCSuperiorError )
         {
             NonExistingOCSuperiorError nonExistingOCSuperiorError = ( NonExistingOCSuperiorError ) element;
 
-            message.append( "Superior object class '" + nonExistingOCSuperiorError.getSuperiorAlias()
-                + "' does not exist." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.SuperiorObjectBegin") + nonExistingOCSuperiorError.getSuperiorAlias() //$NON-NLS-1$
+                + Messages.getString("ProblemsViewLabelProvider.SuperiorObjectEnd") ); //$NON-NLS-1$
         }
         else if ( element instanceof NonExistingMandatoryATError )
         {
             NonExistingMandatoryATError nonExistingMandatoryATError = ( NonExistingMandatoryATError ) element;
 
             message
-                .append( "Mandatory attribute type '" + nonExistingMandatoryATError.getAlias() + "' does not exist." );
+                .append( Messages.getString("ProblemsViewLabelProvider.MandatoryAttributeBegin") + nonExistingMandatoryATError.getAlias() + Messages.getString("ProblemsViewLabelProvider.MandatoryAttributeEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof NonExistingOptionalATError )
         {
             NonExistingOptionalATError nonExistingOptionalATError = ( NonExistingOptionalATError ) element;
 
-            message.append( "Optional attribute type '" + nonExistingOptionalATError.getAlias() + "' does not exist." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.OptionalAttributeBegin") + nonExistingOptionalATError.getAlias() + Messages.getString("ProblemsViewLabelProvider.OptionalAttributeEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof NonExistingSyntaxError )
         {
             NonExistingSyntaxError nonExistingSyntaxError = ( NonExistingSyntaxError ) element;
 
-            message.append( "Syntax with OID '" + nonExistingSyntaxError.getSyntaxOid() + "' does not exist." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.SyntaxOIDBegin") + nonExistingSyntaxError.getSyntaxOid() + Messages.getString("ProblemsViewLabelProvider.SyntaxOIDEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof NonExistingMatchingRuleError )
         {
             NonExistingMatchingRuleError nonExistingMatchingRuleError = ( NonExistingMatchingRuleError ) element;
 
-            message.append( "Matching rule '" + nonExistingMatchingRuleError.getMatchingRuleAlias()
-                + "' does not exist." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.MatchingRuleBegin") + nonExistingMatchingRuleError.getMatchingRuleAlias() //$NON-NLS-1$
+                + Messages.getString("ProblemsViewLabelProvider.MatchingRuleEnd") ); //$NON-NLS-1$
         }
         else if ( element instanceof NoAliasWarning )
         {
@@ -221,13 +221,13 @@
             SchemaObject source = noAliasWarning.getSource();
             if ( source instanceof AttributeTypeImpl )
             {
-                message.append( "Attribute type" );
+                message.append( Messages.getString("ProblemsViewLabelProvider.AttributeType") ); //$NON-NLS-1$
             }
             else if ( source instanceof ObjectClassImpl )
             {
-                message.append( "Object class" );
+                message.append( Messages.getString("ProblemsViewLabelProvider.ObjectClass") ); //$NON-NLS-1$
             }
-            message.append( " with OID '" + source.getOid() + "' does not have any alias." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.WithOIDBegin") + source.getOid() + Messages.getString("ProblemsViewLabelProvider.WithOIDEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof ClassTypeHierarchyError )
         {
@@ -237,24 +237,24 @@
 
             if ( source.getType().equals( ObjectClassTypeEnum.ABSTRACT ) )
             {
-                message.append( "Abstract object class '" + getDisplayName( source ) + "' can not extend " );
+                message.append( Messages.getString("ProblemsViewLabelProvider.AbstractObjectBegin") + getDisplayName( source ) + Messages.getString("ProblemsViewLabelProvider.AbstractObjectEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
 
                 if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
                 {
-                    message.append( "Structural object class :'" + getDisplayName( superior ) + "'." );
+                    message.append( Messages.getString("ProblemsViewLabelProvider.StructuralObject") + getDisplayName( superior ) + "'." ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
                 else if ( superior.getType().equals( ObjectClassTypeEnum.AUXILIARY ) )
                 {
-                    message.append( "Auxiliary object class :'" + getDisplayName( superior ) + "'." );
+                    message.append( Messages.getString("ProblemsViewLabelProvider.AuxiliaryObject") + getDisplayName( superior ) + "'." ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             }
             else if ( source.getType().equals( ObjectClassTypeEnum.AUXILIARY ) )
             {
-                message.append( "Auxiliary object class '" + getDisplayName( source ) + "' can not extend " );
+                message.append( Messages.getString("ProblemsViewLabelProvider.AuxiliaryObjectBegin") + getDisplayName( source ) + Messages.getString("ProblemsViewLabelProvider.AuxiliaryObjectEnd") ); //$NON-NLS-1$ //$NON-NLS-2$
 
                 if ( superior.getType().equals( ObjectClassTypeEnum.STRUCTURAL ) )
                 {
-                    message.append( "Structural object class :'" + getDisplayName( superior ) + "'." );
+                    message.append( Messages.getString("ProblemsViewLabelProvider.StructuralObject") + getDisplayName( superior ) + "'." ); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             }
         }
@@ -264,8 +264,8 @@
             AttributeTypeImpl source = ( AttributeTypeImpl ) differentUsageAsSuperiorError.getSource();
             AttributeTypeImpl superior = ( AttributeTypeImpl ) differentUsageAsSuperiorError.getSuperior();
 
-            message.append( "Attribute type '" + getDisplayName( source )
-                + "' has a different usage value than its superior '" + getDisplayName( superior ) + "'." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.AttributeTypeBegin") + getDisplayName( source ) //$NON-NLS-1$
+                + Messages.getString("ProblemsViewLabelProvider.AttributeTypeEnd") + getDisplayName( superior ) + "'." ); //$NON-NLS-1$ //$NON-NLS-2$
         }
         else if ( element instanceof DifferentCollectiveAsSuperiorError )
         {
@@ -273,8 +273,8 @@
             AttributeTypeImpl source = ( AttributeTypeImpl ) differentCollectiveAsSuperiorError.getSource();
             AttributeTypeImpl superior = ( AttributeTypeImpl ) differentCollectiveAsSuperiorError.getSuperior();
 
-            message.append( "Attribute type '" + getDisplayName( source ) + "' must be collective as its superior '"
-                + getDisplayName( superior ) + "'." );
+            message.append( Messages.getString("ProblemsViewLabelProvider.AttributeTypeCollectiveBegin") + getDisplayName( source ) + Messages.getString("ProblemsViewLabelProvider.AttributeTypeCollectiveEnd") //$NON-NLS-1$ //$NON-NLS-2$
+                + getDisplayName( superior ) + "'." ); //$NON-NLS-1$
         }
 
         return message.toString();
@@ -293,7 +293,7 @@
     {
         String name = so.getName();
 
-        if ( ( name != null ) && ( !name.equals( "" ) ) )
+        if ( ( name != null ) && ( !name.equals( "" ) ) ) //$NON-NLS-1$
         {
             return name;
         }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewLabelProvider.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewLabelProvider.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewLabelProvider.java Tue Nov 25 08:59:19 2008
@@ -45,8 +45,6 @@
  */
 public class SchemaViewLabelProvider extends LabelProvider
 {
-    private static final String NONE = "(None)";
-
     /** The preferences store */
     private IPreferenceStore store;
 
@@ -99,7 +97,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_ALL_ALIASES )
@@ -111,7 +109,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_OID )
@@ -128,7 +126,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
 
@@ -152,7 +150,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_ALL_ALIASES )
@@ -164,7 +162,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
             else if ( labelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_OID )
@@ -181,7 +179,7 @@
                 }
                 else
                 {
-                    label = NONE;
+                    label = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                 }
             }
 
@@ -197,7 +195,7 @@
 
             if ( presentation == PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION_FLAT )
             {
-                return folder.getName() + " (" + folder.getChildren().size() + ")";
+                return folder.getName() + " (" + folder.getChildren().size() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
             }
             else if ( presentation == PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION_HIERARCHICAL )
             {
@@ -222,7 +220,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_ALL_ALIASES )
@@ -234,7 +232,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_OID )
@@ -255,7 +253,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_ALL_ALIASES )
@@ -267,7 +265,7 @@
                     }
                     else
                     {
-                        secondaryLabel = NONE;
+                        secondaryLabel = Messages.getString("SchemaViewLabelProvider.None"); //$NON-NLS-1$
                     }
                 }
                 else if ( secondaryLabelValue == PluginConstants.PREFS_SCHEMA_VIEW_LABEL_OID )

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewSortingDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewSortingDialog.java?rev=720539&r1=720538&r2=720539&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewSortingDialog.java (original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewSortingDialog.java Tue Nov 25 08:59:19 2008
@@ -46,15 +46,6 @@
  */
 public class SchemaViewSortingDialog extends Dialog
 {
-    /** The title of the dialog */
-    private static final String DIALOG_TITLE = "Schema View Sorting";
-
-    /** The Sorting First Name category */
-    private static final String SORTING_FISTNAME = "First Name";
-
-    /** The Sorting OID category */
-    private static final String SORTING_OID = "OID";
-
     // UI Fields
     private Button inFoldersButton;
     private Button mixedButton;
@@ -81,7 +72,7 @@
     protected void configureShell( Shell newShell )
     {
         super.configureShell( newShell );
-        newShell.setText( DIALOG_TITLE );
+        newShell.setText( Messages.getString("SchemaViewSortingDialog.ViewSorting") ); //$NON-NLS-1$
     }
 
 
@@ -96,23 +87,23 @@
         // Grouping Group
         Group groupingGroup = new Group( composite, SWT.NONE );
         groupingGroup.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
-        groupingGroup.setText( "Grouping" );
+        groupingGroup.setText( Messages.getString("SchemaViewSortingDialog.Grouping") ); //$NON-NLS-1$
         groupingGroup.setLayout( new GridLayout() );
 
         // Attribute Types first Button
         inFoldersButton = new Button( groupingGroup, SWT.RADIO );
-        inFoldersButton.setText( "Group attribute types and object classes in folders" );
+        inFoldersButton.setText( Messages.getString("SchemaViewSortingDialog.GroupTypesAndClasses") ); //$NON-NLS-1$
         inFoldersButton.setEnabled( true );
 
         // Mixed Button
         mixedButton = new Button( groupingGroup, SWT.RADIO );
-        mixedButton.setText( "Mixed" );
+        mixedButton.setText( Messages.getString("SchemaViewSortingDialog.Mixed") ); //$NON-NLS-1$
         mixedButton.setEnabled( true );
 
         // Sorting Group
         Group sortingGroup = new Group( composite, SWT.NONE );
         sortingGroup.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
-        sortingGroup.setText( "Sorting" );
+        sortingGroup.setText( Messages.getString("SchemaViewSortingDialog.Sorting") ); //$NON-NLS-1$
         sortingGroup.setLayout( new GridLayout() );
         Composite sortingGroupComposite = new Composite( sortingGroup, SWT.NONE );
         GridLayout gl = new GridLayout( 4, false );
@@ -122,23 +113,23 @@
 
         // Sort by Label
         Label sortByLabel = new Label( sortingGroupComposite, SWT.NONE );
-        sortByLabel.setText( "Sort by" );
+        sortByLabel.setText( Messages.getString("SchemaViewSortingDialog.SortBy") ); //$NON-NLS-1$
 
         // Sorting Combo
         sortingCombo = new Combo( sortingGroupComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
         sortingCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         sortingCombo.setItems( new String[]
-            { SORTING_FISTNAME, SORTING_OID } );
+            { Messages.getString("SchemaViewSortingDialog.FirstName"), Messages.getString("SchemaViewSortingDialog.OID") } ); //$NON-NLS-1$ //$NON-NLS-2$
         sortingCombo.setEnabled( true );
 
         // Ascending Button
         ascendingButton = new Button( sortingGroupComposite, SWT.RADIO );
-        ascendingButton.setText( "Ascending" );
+        ascendingButton.setText( Messages.getString("SchemaViewSortingDialog.Ascending") ); //$NON-NLS-1$
         ascendingButton.setEnabled( true );
 
         // Descending Button
         descendingButton = new Button( sortingGroupComposite, SWT.RADIO );
-        descendingButton.setText( "Descending" );
+        descendingButton.setText( Messages.getString("SchemaViewSortingDialog.Descending") ); //$NON-NLS-1$
         descendingButton.setEnabled( true );
 
         initFieldsFromPreferences();
@@ -207,12 +198,12 @@
                     PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED );
             }
 
-            if ( sortingCombo.getItem( sortingCombo.getSelectionIndex() ).equals( SORTING_FISTNAME ) )
+            if ( sortingCombo.getItem( sortingCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewSortingDialog.FirstName") ) ) //$NON-NLS-1$
             {
                 store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_SORTING_BY,
                     PluginConstants.PREFS_SCHEMA_VIEW_SORTING_BY_FIRSTNAME );
             }
-            else if ( sortingCombo.getItem( sortingCombo.getSelectionIndex() ).equals( SORTING_OID ) )
+            else if ( sortingCombo.getItem( sortingCombo.getSelectionIndex() ).equals( Messages.getString("SchemaViewSortingDialog.OID") ) ) //$NON-NLS-1$
             {
                 store.setValue( PluginConstants.PREFS_SCHEMA_VIEW_SORTING_BY,
                     PluginConstants.PREFS_SCHEMA_VIEW_SORTING_BY_OID );



Mime
View raw message