directory-commits mailing list archives

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

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

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

Modified: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/DeleteServerDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/DeleteServerDialog.java?rev=721375&r1=721374&r2=721375&view=diff
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/DeleteServerDialog.java
(original)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/DeleteServerDialog.java
Fri Nov 28 00:07:15 2008
@@ -17,6 +17,7 @@
  *  under the License. 
  *  
  */
+
 package org.apache.directory.studio.apacheds.dialogs;
 
 
@@ -47,7 +48,7 @@
      */
     public DeleteServerDialog( Shell parentShell, Server server )
     {
-        super( parentShell, "Delete Server", null, null, QUESTION, new String[]
+        super( parentShell, Messages.getString( "DeleteServerDialog.DeleteServer" ), null,
null, QUESTION, new String[] //$NON-NLS-1$
             { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, OK );
 
         if ( server == null )
@@ -56,7 +57,7 @@
         }
 
         this.server = server;
-        message = NLS.bind( "Are you sure you want to delete {0}?", server.getName() );
+        message = NLS.bind( Messages.getString( "DeleteServerDialog.SureToDelete" ), server.getName()
); //$NON-NLS-1$
     }
 
 

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

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

Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages.properties?rev=721375&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages.properties
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages.properties
Fri Nov 28 00:07:15 2008
@@ -0,0 +1,19 @@
+#  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.
+
+DeleteServerDialog.DeleteServer=Delete Server
+DeleteServerDialog.SureToDelete=Are you sure you want to delete the server "{0}"?

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

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

Added: directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages_de.properties?rev=721375&view=auto
==============================================================================
--- directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages_de.properties
(added)
+++ directory/studio/trunk/apacheds/src/main/java/org/apache/directory/studio/apacheds/dialogs/messages_de.properties
Fri Nov 28 00:07:15 2008
@@ -0,0 +1,19 @@
+#  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.
+
+DeleteServerDialog.DeleteServer=Server l\u00F6schen
+DeleteServerDialog.SureToDelete=Wollen Sie den Server "{0}" wirklich l\u00F6schen?

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

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



Mime
View raw message