directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r720450 - in /directory/studio/trunk/apacheds-launcher/src/main: java/org/apache/directory/studio/apacheds/ resources/ resources/org/ resources/org/apache/ resources/org/apache/directory/ resources/org/apache/directory/studio/ resources/org...
Date Tue, 25 Nov 2008 09:36:51 GMT
Author: felixk
Date: Tue Nov 25 01:36:50 2008
New Revision: 720450

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

(http://issues.apache.org/jira/browse/DIRSTUDIO-397)

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

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

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

Modified: directory/studio/trunk/apacheds-launcher/src/main/java/org/apache/directory/studio/apacheds/Service.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-launcher/src/main/java/org/apache/directory/studio/apacheds/Service.java?rev=720450&r1=720449&r2=720450&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-launcher/src/main/java/org/apache/directory/studio/apacheds/Service.java
(original)
+++ directory/studio/trunk/apacheds-launcher/src/main/java/org/apache/directory/studio/apacheds/Service.java
Tue Nov 25 01:36:50 2008
@@ -55,13 +55,13 @@
 
         if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes
server.xml file argument
         {
-            LOG.info( "server: loading settings from ", args[0] );
+            LOG.info( Messages.getString("Service.LoadingSettings"), args[0] );
             factory = new FileSystemXmlApplicationContext( new File( args[0] ).toURI().toURL().toString()
);
-            apacheDS = ( ApacheDS ) factory.getBean( "apacheDS" );
+            apacheDS = ( ApacheDS ) factory.getBean( "apacheDS" ); //$NON-NLS-1$
         }
         else
         {
-            LOG.info( "server: using default settings ..." );
+            LOG.info( Messages.getString("Service.UsingDefaultSettings") );
             DirectoryService directoryService = new DefaultDirectoryService();
             directoryService.startup();
             SocketAcceptor socketAcceptor = new SocketAcceptor( null );
@@ -86,12 +86,12 @@
 
         if ( apacheDS.getSynchPeriodMillis() > 0 )
         {
-            workerThread = new Thread( worker, "SynchWorkerThread" );
+            workerThread = new Thread( worker, "SynchWorkerThread" ); //$NON-NLS-1$
         }
 
         if ( LOG.isInfoEnabled() )
         {
-            LOG.info( "server: started in {} milliseconds", ( System.currentTimeMillis()
- startTime ) + "" );
+            LOG.info( Messages.getString("Service.Started"), ( System.currentTimeMillis()
- startTime ) + "" ); //$NON-NLS-2$
         }
     }
 
@@ -129,7 +129,7 @@
 
             while ( workerThread.isAlive() )
             {
-                LOG.info( "Waiting for SynchWorkerThread to die." );
+                LOG.info( Messages.getString("Service.WaitingForSynchWorkerThread") );
                 workerThread.join( 500 );
             }
         }
@@ -164,7 +164,7 @@
                     }
                     catch ( InterruptedException e )
                     {
-                        LOG.warn( "SynchWorker failed to wait on lock.", e );
+                        LOG.warn( Messages.getString("Service.SynchWorkerFailedToWait"),
e );
                     }
                 }
 
@@ -174,7 +174,7 @@
                 }
                 catch ( Exception e )
                 {
-                    LOG.error( "SynchWorker failed to synch directory.", e );
+                    LOG.error( Messages.getString("Service.SynchWorkerFailedToSynch"), e
);
                 }
             }
         }

Added: directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties?rev=720450&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties
(added)
+++ directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties
Tue Nov 25 01:36:50 2008
@@ -0,0 +1,6 @@
+Service.LoadingSettings=server: loading settings from 
+Service.Started=server: started in {} milliseconds
+Service.SynchWorkerFailedToSynch=SynchWorker failed to synch directory.
+Service.SynchWorkerFailedToWait=SynchWorker failed to wait on lock.
+Service.UsingDefaultSettings=server: using default settings ...
+Service.WaitingForSynchWorkerThread=Waiting for SynchWorkerThread to die.

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

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

Added: directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties?rev=720450&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties
(added)
+++ directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties
Tue Nov 25 01:36:50 2008
@@ -0,0 +1,6 @@
+Service.LoadingSettings=server\: Lade Einstellungen von 
+Service.Started=server\: gestartet in {} Millisekunden
+Service.SynchWorkerFailedToSynch=SynchWorker scheiterte das Directory zu synchronisieren.
+Service.SynchWorkerFailedToWait=SynchWorker scheiterte beim Warten auf eine Datensperre.
+Service.UsingDefaultSettings=server\: verwende Standart-Einstellungen ...
+Service.WaitingForSynchWorkerThread=Warten bis SynchWorkerThread gestorben ist.

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

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



Mime
View raw message