From 2549c937fc5673ad4f5e2ac732ca12e63ac9b413 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 8 Dec 2010 13:10:34 +0000 Subject: [PATCH] Nice idea, but need i18n for the actions so each needs its own string git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1043402 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/coyote/AbstractProtocolHandler.java | 32 +++++++++++----------- java/org/apache/coyote/LocalStrings.properties | 10 +++++-- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/java/org/apache/coyote/AbstractProtocolHandler.java b/java/org/apache/coyote/AbstractProtocolHandler.java index 23f5c4c22..e730e564d 100644 --- a/java/org/apache/coyote/AbstractProtocolHandler.java +++ b/java/org/apache/coyote/AbstractProtocolHandler.java @@ -345,13 +345,13 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler, @Override public final void pause() throws Exception { if(getLog().isInfoEnabled()) - getLog().info(sm.getString("abstractProtocolHandler.action", - "Pausing", getName())); + getLog().info(sm.getString("abstractProtocolHandler.pause", + getName())); try { endpoint.pause(); } catch (Exception ex) { - getLog().error(sm.getString("abstractProtocolHandler.actionError", - "pause", getName()), ex); + getLog().error(sm.getString("abstractProtocolHandler.pauseError", + getName()), ex); throw ex; } } @@ -359,13 +359,13 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler, @Override public final void resume() throws Exception { if(getLog().isInfoEnabled()) - getLog().info(sm.getString("abstractProtocolHandler.action", - "Resuming", getName())); + getLog().info(sm.getString("abstractProtocolHandler.resume", + getName())); try { endpoint.resume(); } catch (Exception ex) { - getLog().error(sm.getString("abstractProtocolHandler.actionError", - "resume", getName()), ex); + getLog().error(sm.getString("abstractProtocolHandler.resumeError", + getName()), ex); throw ex; } } @@ -376,27 +376,27 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler, try { endpoint.stop(); } catch (Exception ex) { - getLog().error(sm.getString("abstractProtocolHandler.action", - "Stopping"), ex); + getLog().error(sm.getString("abstractProtocolHandler.stop", + getName()), ex); throw ex; } if(getLog().isInfoEnabled()) - getLog().info(sm.getString("abstractProtocolHandler.actionError", - "stop", getName())); + getLog().info(sm.getString("abstractProtocolHandler.stopError", + getName())); } @Override public final void destroy() { if(getLog().isInfoEnabled()) { - getLog().info(sm.getString("abstractProtocolHandler.action", - "Destroying", getName())); + getLog().info(sm.getString("abstractProtocolHandler.destroy", + getName())); } try { endpoint.destroy(); } catch (Exception e) { - getLog().error(sm.getString("abstractProtocolHandler.actionError", - "destroy", getName()), e); + getLog().error(sm.getString("abstractProtocolHandler.destroyError", + getName()), e); } if( tpOname!=null ) diff --git a/java/org/apache/coyote/LocalStrings.properties b/java/org/apache/coyote/LocalStrings.properties index 7ba6011bf..3e376cfa9 100644 --- a/java/org/apache/coyote/LocalStrings.properties +++ b/java/org/apache/coyote/LocalStrings.properties @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -abstractProtocolHandler.action={0} ProtocolHandler [{1}] -abstractProtocolHandler.actionError=Failed to {0} end point associated with ProtocolHandler [{1}] abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}] abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}] +abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}] +abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}] +abstractProtocolHandler.resumeError=Failed to resume end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.stop=Stopping ProtocolHandler [{0}] +abstractProtocolHandler.stopError=Failed to stop end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.destroy=Destroying ProtocolHandler [{0}] +abstractProtocolHandler.destroyError=Failed to destroy end point associated with ProtocolHandler [{0}] asyncStateMachine.invalidAsyncState=Calling [{0}] is not valid for a request with Async state [{1}] -- 2.11.0