directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r721383 - in /directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties: Messages.java ServerPropertyPage.java messages.properties messages_de.properties
Date Fri, 28 Nov 2008 08:45:25 GMT
Author: felixk
Date: Fri Nov 28 00:45:25 2008
New Revision: 721383

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

Added:
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/Messages.java
  (with props)
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages.properties
  (with props)
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages_de.properties
  (with props)
Modified:
    directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java

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

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

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java?rev=721383&r1=721382&r2=721383&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java
(original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/ServerPropertyPage.java
Fri Nov 28 00:45:25 2008
@@ -64,7 +64,7 @@
 
         // Name
         Label nameLabel = new Label( composite, SWT.NONE );
-        nameLabel.setText( "Name:" );
+        nameLabel.setText( Messages.getString( "ServerPropertyPage.Name" ) ); //$NON-NLS-1$
         Text nameText = new Text( composite, SWT.NONE );
         nameText.setEditable( false );
         nameText.setBackground( parent.getBackground() );
@@ -72,7 +72,7 @@
 
         // Version
         Label versionLabel = new Label( composite, SWT.NONE );
-        versionLabel.setText( "Version:" );
+        versionLabel.setText( Messages.getString( "ServerPropertyPage.Version" ) ); //$NON-NLS-1$
         Text versionText = new Text( composite, SWT.NONE );
         versionText.setEditable( false );
         versionText.setBackground( parent.getBackground() );
@@ -80,7 +80,7 @@
 
         // Location
         Label locationLabel = new Label( composite, SWT.NONE );
-        locationLabel.setText( "Location:" );
+        locationLabel.setText( Messages.getString( "ServerPropertyPage.Location" ) ); //$NON-NLS-1$
         Text locationText = new Text( composite, SWT.WRAP );
         locationText.setEditable( false );
         locationText.setBackground( parent.getBackground() );

Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages.properties?rev=721383&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages.properties
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages.properties
Fri Nov 28 00:45:25 2008
@@ -0,0 +1,20 @@
+#  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.
+
+ServerPropertyPage.Location=Location:
+ServerPropertyPage.Name=Name:
+ServerPropertyPage.Version=Version:

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

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

Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages_de.properties?rev=721383&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages_de.properties
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/properties/messages_de.properties
Fri Nov 28 00:45:25 2008
@@ -0,0 +1,18 @@
+#  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.
+
+ServerPropertyPage.Location=Ort\:

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

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



Mime
View raw message