directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r721180 - in /directory/studio/trunk/ldapbrowser-ui/src/main: java/org/apache/directory/studio/ldapbrowser/ui/dialogs/ resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/
Date Thu, 27 Nov 2008 13:39:19 GMT
Author: felixk
Date: Thu Nov 27 05:39:19 2008
New Revision: 721180

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

Added:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/Messages.java
  (with props)
    directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages.properties
  (with props)
    directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages_de.properties
  (with props)
Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java?rev=721180&r1=721179&r2=721180&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java
Thu Nov 27 05:39:19 2008
@@ -39,8 +39,6 @@
 public class EncoderDecoderDialog extends Dialog
 {
 
-    public static final String DIALOG_TITLE = "LDAP Encoder/Decoder";
-
     private Text iso88591Text;
 
     private Text iso88591HexText;
@@ -66,7 +64,7 @@
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
-        shell.setText( DIALOG_TITLE );
+        shell.setText( Messages.getString( "EncoderDecoderDialog.LDAPEncodeDecoder" ) );
//$NON-NLS-1$
         //shell.setImage( BrowserUIPlugin.getDefault().getImage( BrowserUIConstants.IMG_IMAGEEDITOR
) );
     }
 
@@ -84,28 +82,28 @@
         composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
 
         Label iso8859Label = new Label( composite, SWT.NONE );
-        iso8859Label.setText( "ISO-8859-1:" );
+        iso8859Label.setText( Messages.getString( "EncoderDecoderDialog.ISOColon" ) ); //$NON-NLS-1$
         iso88591Text = new Text( composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
         GridData gd = new GridData( GridData.FILL_BOTH );
         iso88591Text.setLayoutData( gd );
 
         Label iso8859HexLabel = new Label( composite, SWT.NONE );
-        iso8859HexLabel.setText( "ISO-8859-1 Hex:" );
+        iso8859HexLabel.setText( Messages.getString( "EncoderDecoderDialog.ISOHex" ) ); //$NON-NLS-1$
         iso88591HexText = new Text( composite, SWT.BORDER | SWT.READ_ONLY );
         iso88591HexText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
 
         Label utf8Label = new Label( composite, SWT.NONE );
-        utf8Label.setText( "UTF-8:" );
+        utf8Label.setText( Messages.getString( "EncoderDecoderDialog.UTF" ) ); //$NON-NLS-1$
         utf8Text = new Text( composite, SWT.BORDER );
         utf8Text.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
 
         Label utf8HexLabel = new Label( composite, SWT.NONE );
-        utf8HexLabel.setText( "UTF-8 Hex:" );
+        utf8HexLabel.setText( Messages.getString( "EncoderDecoderDialog.UTFHex" ) ); //$NON-NLS-1$
         utf8HexText = new Text( composite, SWT.BORDER | SWT.READ_ONLY );
         utf8HexText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
 
         Label base64Label = new Label( composite, SWT.NONE );
-        base64Label.setText( "BASE-64:" );
+        base64Label.setText( Messages.getString( "EncoderDecoderDialog.BASE" ) ); //$NON-NLS-1$
         base64Text = new Text( composite, SWT.BORDER );
         base64Text.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
 
@@ -124,16 +122,16 @@
                     try
                     {
                         String iso = iso88591Text.getText();
-                        byte[] isoHex = iso.getBytes( "ISO-8859-1" );
+                        byte[] isoHex = iso.getBytes( "ISO-8859-1" ); //$NON-NLS-1$
                         byte[] utf8 = LdifUtils.utf8encode( iso );
-                        String utf8String = new String( utf8, "ISO-8859-1" );
+                        String utf8String = new String( utf8, "ISO-8859-1" ); //$NON-NLS-1$
                         String base64 = LdifUtils.base64encode( utf8 );
 
                         iso88591HexText.setText( LdifUtils.hexEncode( isoHex ) );
                         utf8Text.setText( utf8String );
                         utf8HexText.setText( LdifUtils.hexEncode( utf8 ) );
                         base64Text.setText( base64 );
-                        errorText.setText( "" );
+                        errorText.setText( "" ); //$NON-NLS-1$
                     }
                     catch ( Exception ex )
                     {
@@ -158,16 +156,16 @@
                     try
                     {
                         String utf8String = utf8Text.getText();
-                        byte[] utf8 = utf8String.getBytes( "ISO-8859-1" );
+                        byte[] utf8 = utf8String.getBytes( "ISO-8859-1" ); //$NON-NLS-1$
                         String iso = LdifUtils.utf8decode( utf8 );
-                        byte[] isoHex = iso.getBytes( "ISO-8859-1" );
+                        byte[] isoHex = iso.getBytes( "ISO-8859-1" ); //$NON-NLS-1$
                         String base64 = LdifUtils.base64encode( utf8 );
 
                         iso88591Text.setText( iso );
                         iso88591HexText.setText( LdifUtils.hexEncode( isoHex ) );
                         utf8HexText.setText( LdifUtils.hexEncode( utf8 ) );
                         base64Text.setText( base64 );
-                        errorText.setText( "" );
+                        errorText.setText( "" ); //$NON-NLS-1$
                     }
                     catch ( Exception ex )
                     {
@@ -193,15 +191,15 @@
                     {
                         String base64 = base64Text.getText();
                         byte[] utf8 = LdifUtils.base64decodeToByteArray( base64 );
-                        String utf8String = new String( utf8, "ISO-8859-1" );
+                        String utf8String = new String( utf8, "ISO-8859-1" ); //$NON-NLS-1$
                         String iso = LdifUtils.utf8decode( utf8 );
-                        byte[] isoHex = iso.getBytes( "ISO-8859-1" );
+                        byte[] isoHex = iso.getBytes( "ISO-8859-1" ); //$NON-NLS-1$
 
                         iso88591Text.setText( iso );
                         iso88591HexText.setText( LdifUtils.hexEncode( isoHex ) );
                         utf8Text.setText( utf8String );
                         utf8HexText.setText( LdifUtils.hexEncode( utf8 ) );
-                        errorText.setText( "" );
+                        errorText.setText( "" ); //$NON-NLS-1$
                     }
                     catch ( Exception ex )
                     {

Added: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/Messages.java?rev=721180&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/Messages.java
(added)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/Messages.java
Thu Nov 27 05:39:19 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.ldapbrowser.ui.dialogs;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.studio.ldapbrowser.ui.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/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages.properties?rev=721180&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages.properties
(added)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages.properties
Thu Nov 27 05:39:19 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.
+
+EncoderDecoderDialog.BASE=BASE-64:
+EncoderDecoderDialog.ISOColon=ISO-8859-1:
+EncoderDecoderDialog.ISOHex=ISO-8859-1 Hex:
+EncoderDecoderDialog.LDAPEncodeDecoder=LDAP Encoder/Decoder
+EncoderDecoderDialog.UTF=UTF-8:
+EncoderDecoderDialog.UTFHex=UTF-8 Hex:

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

Propchange: directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages_de.properties?rev=721180&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages_de.properties
(added)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages_de.properties
Thu Nov 27 05:39:19 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.
+
+EncoderDecoderDialog.LDAPEncodeDecoder=LDAP Verschl\u00FCssler/Entschl\u00FCssler

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

Propchange: directory/studio/trunk/ldapbrowser-ui/src/main/resources/org/apache/directory/studio/ldapbrowser/ui/dialogs/messages_de.properties
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message