directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r721398 - /directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/
Date Fri, 28 Nov 2008 09:24:58 GMT
Author: felixk
Date: Fri Nov 28 01:24:58 2008
New Revision: 721398

URL: http://svn.apache.org/viewvc?rev=721398&view=rev
Log:
- Externalize Strings
- Add German translation

Added:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java
  (with props)
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties
  (with props)
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties
  (with props)
Modified:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizardPage.java

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java?rev=721398&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java
(added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java
Fri Nov 28 01:24:58 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.apacheds.configuration.wizards;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.configuration.wizards.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/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java?rev=721398&r1=721397&r2=721398&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
Fri Nov 28 01:24:58 2008
@@ -83,32 +83,32 @@
                 case VERSION_1_5_4:
                     serverXmlIO = new ServerXmlIOV154();
                     serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
-                        .getResourceAsStream( "default-server-1.5.4.xml" ) );
+                        .getResourceAsStream( "default-server-1.5.4.xml" ) ); //$NON-NLS-1$
                     break;
                 case VERSION_1_5_3:
                     serverXmlIO = new ServerXmlIOV153();
                     serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
-                        .getResourceAsStream( "default-server-1.5.3.xml" ) );
+                        .getResourceAsStream( "default-server-1.5.3.xml" ) ); //$NON-NLS-1$
                     break;
                 case VERSION_1_5_2:
                     serverXmlIO = new ServerXmlIOV152();
                     serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
-                        .getResourceAsStream( "default-server-1.5.2.xml" ) );
+                        .getResourceAsStream( "default-server-1.5.2.xml" ) ); //$NON-NLS-1$
                     break;
                 case VERSION_1_5_1:
                     serverXmlIO = new ServerXmlIOV151();
                     serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
-                        .getResourceAsStream( "default-server-1.5.1.xml" ) );
+                        .getResourceAsStream( "default-server-1.5.1.xml" ) ); //$NON-NLS-1$
                     break;
                 case VERSION_1_5_0:
                     serverXmlIO = new ServerXmlIOV150();
                     serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
-                        .getResourceAsStream( "default-server-1.5.0.xml" ) );
+                        .getResourceAsStream( "default-server-1.5.0.xml" ) ); //$NON-NLS-1$
                     break;
                 default:
                     serverXmlIO = new ServerXmlIOV154();
                     serverConfiguration = serverXmlIO.parse( ApacheDSConfigurationPlugin.class
-                        .getResourceAsStream( "default-server-1.5.4.xml" ) );
+                        .getResourceAsStream( "default-server-1.5.4.xml" ) ); //$NON-NLS-1$
                     break;
             }
 
@@ -124,8 +124,9 @@
         {
             MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                 SWT.OK | SWT.ICON_ERROR );
-            messageBox.setText( "Error!" );
-            messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage()
);
+            messageBox.setText( Messages.getString( "NewApacheDSConfigurationFileWizard.Error"
) ); //$NON-NLS-1$
+            messageBox
+                .setMessage( Messages.getString( "NewApacheDSConfigurationFileWizard.ErrorReadingFile"
) + e.getMessage() ); //$NON-NLS-1$
             messageBox.open();
             return false;
         }

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizardPage.java?rev=721398&r1=721397&r2=721398&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizardPage.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizardPage.java
Fri Nov 28 01:24:58 2008
@@ -44,15 +44,15 @@
 public class NewApacheDSConfigurationFileWizardPage extends WizardPage
 {
     /** Version 1.5.0 */
-    private static final String VERSION_1_5_0 = "1.5.0";
+    private static final String VERSION_1_5_0 = "1.5.0"; //$NON-NLS-1$
     /** Version 1.5.1 */
-    private static final String VERSION_1_5_1 = "1.5.1";
+    private static final String VERSION_1_5_1 = "1.5.1"; //$NON-NLS-1$
     /** Version 1.5.2 */
-    private static final String VERSION_1_5_2 = "1.5.2";
+    private static final String VERSION_1_5_2 = "1.5.2"; //$NON-NLS-1$
     /** Version 1.5.3 */
-    private static final String VERSION_1_5_3 = "1.5.3";
+    private static final String VERSION_1_5_3 = "1.5.3"; //$NON-NLS-1$
     /** Version 1.5.3 */
-    private static final String VERSION_1_5_4 = "1.5.4";
+    private static final String VERSION_1_5_4 = "1.5.4"; //$NON-NLS-1$
 
     // UI Fields
     private Combo versionCombo;
@@ -64,8 +64,8 @@
     public NewApacheDSConfigurationFileWizardPage()
     {
         super( NewApacheDSConfigurationFileWizardPage.class.getCanonicalName() );
-        setTitle( "Create a new Apache DS configuration file." );
-        setDescription( "Please select the target version for the configuration file." );
+        setTitle( Messages.getString( "NewApacheDSConfigurationFileWizardPage.CreateConfigurationFile"
) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "NewApacheDSConfigurationFileWizardPage.SelectTargetVersion"
) ); //$NON-NLS-1$
         setImageDescriptor( ApacheDSConfigurationPlugin.getDefault().getImageDescriptor(
             ApacheDSConfigurationPluginConstants.IMG_NEW_SERVER_CONFIGURATION_FILE_WIZARD
) );
     }
@@ -81,13 +81,13 @@
 
         // Target Version Group
         Group targetVersionGroup = new Group( composite, SWT.NONE );
-        targetVersionGroup.setText( "Target Version" );
+        targetVersionGroup.setText( Messages.getString( "NewApacheDSConfigurationFileWizardPage.TargetVersion"
) ); //$NON-NLS-1$
         targetVersionGroup.setLayout( new GridLayout( 2, false ) );
         targetVersionGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false )
);
 
         // Version Label
         Label versionLabel = new Label( targetVersionGroup, SWT.NONE );
-        versionLabel.setText( "Apache DS version:" );
+        versionLabel.setText( Messages.getString( "NewApacheDSConfigurationFileWizardPage.ApacheDSVersion"
) ); //$NON-NLS-1$
 
         // Version Combo
         versionCombo = new Combo( targetVersionGroup, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER
);

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties?rev=721398&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties
(added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties
Fri Nov 28 01:24:58 2008
@@ -0,0 +1,23 @@
+# 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.
+
+NewApacheDSConfigurationFileWizard.Error=Error\!
+NewApacheDSConfigurationFileWizard.ErrorReadingFile=An error occurred when reading the file.\n
+NewApacheDSConfigurationFileWizardPage.ApacheDSVersion=Apache DS version:
+NewApacheDSConfigurationFileWizardPage.CreateConfigurationFile=Create a new Apache DS configuration
file.
+NewApacheDSConfigurationFileWizardPage.SelectTargetVersion=Please select the target version
for the configuration file.
+NewApacheDSConfigurationFileWizardPage.TargetVersion=Target Version

Propchange: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties?rev=721398&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties
(added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties
Fri Nov 28 01:24:58 2008
@@ -0,0 +1,23 @@
+# 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.
+
+NewApacheDSConfigurationFileWizard.Error=Fehler\!
+NewApacheDSConfigurationFileWizard.ErrorReadingFile=Beim Lesen der Datei ist ein Fehler aufgetreten.\n
+NewApacheDSConfigurationFileWizardPage.ApacheDSVersion=Apache DS Version\:
+NewApacheDSConfigurationFileWizardPage.CreateConfigurationFile=Erstelle eine neue Apache
DS Konfigurations-Datei.
+NewApacheDSConfigurationFileWizardPage.SelectTargetVersion=Bitte w\u00E4hlen Sie eine Zielversion
f\u00FCr die Konfigurations-Datei.
+NewApacheDSConfigurationFileWizardPage.TargetVersion=Ziel Version

Propchange: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/messages_de.properties
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message