You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by fe...@apache.org on 2008/11/26 11:01:15 UTC
svn commit: r720782 - in /directory/studio/trunk/apacheds-launcher: ./
src/main/java/org/apache/directory/studio/apacheds/
src/main/resources/org/apache/directory/studio/apacheds/
Author: felixk
Date: Wed Nov 26 02:01:14 2008
New Revision: 720782
URL: http://svn.apache.org/viewvc?rev=720782&view=rev
Log:
Fix NLS parameter handling
Modified:
directory/studio/trunk/apacheds-launcher/pom.xml
directory/studio/trunk/apacheds-launcher/src/main/java/org/apache/directory/studio/apacheds/Service.java
directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties
directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties
Modified: directory/studio/trunk/apacheds-launcher/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-launcher/pom.xml?rev=720782&r1=720781&r2=720782&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-launcher/pom.xml (original)
+++ directory/studio/trunk/apacheds-launcher/pom.xml Wed Nov 26 02:01:14 2008
@@ -295,6 +295,11 @@
<scope>runtime</scope>
</dependency>
<dependency>
+ <groupId>org.eclipse</groupId>
+ <artifactId>osgi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
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=720782&r1=720781&r2=720782&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 Wed Nov 26 02:01:14 2008
@@ -30,6 +30,7 @@
import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.protocol.shared.SocketAcceptor;
import org.apache.xbean.spring.context.FileSystemXmlApplicationContext;
+import org.eclipse.osgi.util.NLS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,13 +56,13 @@
if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes server.xml file argument
{
- LOG.info( Messages.getString("Service.LoadingSettings"), 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" ); //$NON-NLS-1$
}
else
{
- LOG.info( Messages.getString("Service.UsingDefaultSettings") );
+ LOG.info( Messages.getString( "Service.UsingDefaultSettings" ) );
DirectoryService directoryService = new DefaultDirectoryService();
directoryService.startup();
SocketAcceptor socketAcceptor = new SocketAcceptor( null );
@@ -91,7 +92,8 @@
if ( LOG.isInfoEnabled() )
{
- LOG.info( Messages.getString("Service.Started"), ( System.currentTimeMillis() - startTime ) + "" ); //$NON-NLS-2$
+ LOG.info( NLS.bind(
+ Messages.getString( "Service.Started" ), new long[] { ( System.currentTimeMillis() - startTime ) } ) ); //$NON-NLS-1$
}
}
@@ -129,7 +131,7 @@
while ( workerThread.isAlive() )
{
- LOG.info( Messages.getString("Service.WaitingForSynchWorkerThread") );
+ LOG.info( Messages.getString( "Service.WaitingForSynchWorkerThread" ) );
workerThread.join( 500 );
}
}
@@ -164,7 +166,7 @@
}
catch ( InterruptedException e )
{
- LOG.warn( Messages.getString("Service.SynchWorkerFailedToWait"), e );
+ LOG.warn( Messages.getString( "Service.SynchWorkerFailedToWait" ), e );
}
}
@@ -174,7 +176,7 @@
}
catch ( Exception e )
{
- LOG.error( Messages.getString("Service.SynchWorkerFailedToSynch"), e );
+ LOG.error( Messages.getString( "Service.SynchWorkerFailedToSynch" ), e );
}
}
}
Modified: 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=720782&r1=720781&r2=720782&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties (original)
+++ directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages.properties Wed Nov 26 02:01:14 2008
@@ -1,5 +1,22 @@
-Service.LoadingSettings=server: loading settings from
-Service.Started=server: started in {} milliseconds
+# 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.
+
+Service.LoadingSettings=server\: loading settings from
+Service.Started=server: started in {0} milliseconds
Service.SynchWorkerFailedToSynch=SynchWorker failed to synch directory.
Service.SynchWorkerFailedToWait=SynchWorker failed to wait on lock.
Service.UsingDefaultSettings=server: using default settings ...
Modified: 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=720782&r1=720781&r2=720782&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties (original)
+++ directory/studio/trunk/apacheds-launcher/src/main/resources/org/apache/directory/studio/apacheds/messages_de.properties Wed Nov 26 02:01:14 2008
@@ -1,5 +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.
+
Service.LoadingSettings=server\: Lade Einstellungen von
-Service.Started=server\: gestartet in {} Millisekunden
+Service.Started=server\: gestartet in {0} Millisekunden
Service.SynchWorkerFailedToSynch=SynchWorker scheiterte das Directory zu synchronisieren.
Service.SynchWorkerFailedToWait=SynchWorker scheiterte beim Warten auf eine Datensperre.
Service.UsingDefaultSettings=server\: verwende Standart-Einstellungen ...