geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r416545 - in /geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main: java/org/apache/geronimo/gshell/server/ resources/org/ resources/org/apache/ resources/org/apache/geronimo/ resources/org/apache/geronimo/gshell/ resourc...
Date Fri, 23 Jun 2006 02:17:24 GMT
Author: jdillon
Date: Thu Jun 22 19:17:24 2006
New Revision: 416545

URL: http://svn.apache.org/viewvc?rev=416545&view=rev
Log:
Externalize strings

Added:
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
  (with props)
Modified:
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/ServerCommand.java

Modified: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/ServerCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/ServerCommand.java?rev=416545&r1=416544&r2=416545&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/ServerCommand.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/ServerCommand.java
Thu Jun 22 19:17:24 2006
@@ -24,6 +24,7 @@
 import org.apache.commons.cli.PosixParser;
 import org.apache.geronimo.gshell.command.Command;
 import org.apache.geronimo.gshell.command.CommandSupport;
+import org.apache.geronimo.gshell.command.MessageSource;
 import org.apache.geronimo.gshell.console.IO;
 import org.apache.geronimo.gshell.server.SocketServerDaemon.SocketHandler;
 
@@ -46,6 +47,8 @@
     protected int doExecute(final String[] args) throws Exception {
         assert args != null;
 
+        MessageSource messages = getMessageSource();
+
         //
         // TODO: Optimize, move common code to CommandSupport
         //
@@ -55,11 +58,11 @@
         Options options = new Options();
 
         options.addOption(OptionBuilder.withLongOpt("help")
-            .withDescription("Display this help message")
+            .withDescription(messages.getMessage("cli.option.help"))
             .create('h'));
 
         options.addOption(OptionBuilder.withLongOpt("port")
-            .withDescription("Use a specified port number")
+            .withDescription(messages.getMessage("cli.option.port"))
             .hasArg()
             .create('p'));
 
@@ -67,7 +70,9 @@
         CommandLine line = parser.parse(options, args);
 
         if (line.hasOption('h')) {
-            io.out.println(getName() + " -- starts a Shell server");
+            io.out.print(getName());
+            io.out.print(" -- ");
+            io.out.println(messages.getMessage("cli.usage.description"));
             io.out.println();
 
             HelpFormatter formatter = new HelpFormatter();
@@ -111,7 +116,9 @@
         SocketServerDaemon daemon = new SocketServerDaemon(port, handler);
 
         IO io = getIO();
-        io.out.println("Listening for connections on port: " + port);
+        MessageSource messages = getMessageSource();
+
+        io.out.println(messages.getMessage("info.listening", port));
         io.flush();
 
         daemon.start();

Added: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties?rev=416545&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
(added)
+++ geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
Thu Jun 22 19:17:24 2006
@@ -0,0 +1,25 @@
+##
+## $Id$
+##
+
+##
+## Option descriptions
+##
+
+cli.option.help=Display this help message
+
+cli.option.port=Use a specified port number
+
+##
+## Option usage (help)
+##
+
+cli.usage.description=Starts a Shell server
+
+cli.usage.footer=
+
+##
+## Information messages
+##
+
+info.listening=Listening for connections on port: %s
\ No newline at end of file

Propchange: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/resources/org/apache/geronimo/gshell/server/ServerCommandMessages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message