Author: felixk
Date: Fri Nov 28 00:49:25 2008
New Revision: 721384
URL: http://svn.apache.org/viewvc?rev=721384&view=rev
Log:
- Externalize Strings
- Add German translation
Added:
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java
(with props)
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties
(with props)
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties
(with props)
Modified:
directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java
Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java?rev=721384&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java
Fri Nov 28 00:49:25 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.wizards;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.apache.directory.studio.apacheds.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/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/Messages.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java?rev=721384&r1=721383&r2=721384&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java
(original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/NewServerWizardPage.java
Fri Nov 28 00:49:25 2008
@@ -55,8 +55,8 @@
public NewServerWizardPage()
{
super( NewServerWizardPage.class.getCanonicalName() );
- setTitle( "Create a Server" );
- setDescription( "Please specify a name to create a new server." );
+ setTitle( Messages.getString( "NewServerWizardPage.CreateNewServer" ) ); //$NON-NLS-1$
+ setDescription( Messages.getString( "NewServerWizardPage.PleaseSpecifyName" ) );
//$NON-NLS-1$
setImageDescriptor( ApacheDsPlugin.getDefault().getImageDescriptor(
ApacheDsPluginConstants.IMG_SERVER_NEW_WIZARD ) );
setPageComplete( false );
@@ -73,7 +73,7 @@
composite.setLayout( new GridLayout( 2, false ) );
Label nameLabel = new Label( composite, SWT.NONE );
- nameLabel.setText( "Name:" );
+ nameLabel.setText( Messages.getString( "NewServerWizardPage.Name" ) ); //$NON-NLS-1$
nameText = new Text( composite, SWT.BORDER );
nameText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
nameText.addModifyListener( new ModifyListener()
@@ -98,14 +98,14 @@
String name = nameText.getText();
if ( ( name != null ) )
{
- if ( "".equals( name ) )
+ if ( "".equals( name ) ) //$NON-NLS-1$
{
- displayErrorMessage( "Enter a name for the server." );
+ displayErrorMessage( Messages.getString( "NewServerWizardPage.ErrorEnterName"
) ); //$NON-NLS-1$
return;
}
if ( !serversHandler.isNameAvailable( name ) )
{
- displayErrorMessage( "A server with the same name already exists." );
+ displayErrorMessage( Messages.getString( "NewServerWizardPage.ErrorNameExists"
) ); //$NON-NLS-1$
return;
}
}
Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties?rev=721384&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties
Fri Nov 28 00:49:25 2008
@@ -0,0 +1,22 @@
+# 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.
+
+NewServerWizardPage.CreateNewServer=Create a Server
+NewServerWizardPage.ErrorEnterName=Enter a name for the server.
+NewServerWizardPage.ErrorNameExists=A server with the same name already exists.
+NewServerWizardPage.Name=Name:
+NewServerWizardPage.PleaseSpecifyName=Please specify a name to create a new server.
Propchange: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages.properties
------------------------------------------------------------------------------
svn:keywords = Id
Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties?rev=721384&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties
Fri Nov 28 00:49:25 2008
@@ -0,0 +1,21 @@
+# 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.
+
+NewServerWizardPage.CreateNewServer=Erstelle einen Server
+NewServerWizardPage.ErrorEnterName=Geben Sie einen Namen f\u00FCr den Server ein.
+NewServerWizardPage.ErrorNameExists=Ein Server mit diesem Namen existiert bereits.
+NewServerWizardPage.PleaseSpecifyName=Bitte geben Sie einen Namen zum Erstellen eines neuen
Servers an.
Propchange: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/wizards/messages_de.properties
------------------------------------------------------------------------------
svn:keywords = Id
|