Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 43982 invoked from network); 14 Aug 2004 02:37:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Aug 2004 02:37:54 -0000 Received: (qmail 67690 invoked by uid 500); 14 Aug 2004 02:37:54 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 67648 invoked by uid 500); 14 Aug 2004 02:37:53 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 67637 invoked by uid 99); 14 Aug 2004 02:37:53 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 13 Aug 2004 19:37:49 -0700 Received: (qmail 43945 invoked by uid 65534); 14 Aug 2004 02:37:49 -0000 Date: 14 Aug 2004 02:37:49 -0000 Message-ID: <20040814023749.43941.qmail@minotaur.apache.org> From: vgritsenko@apache.org To: cvs@cocoon.apache.org Subject: svn commit: rev 36373 - cocoon/trunk/src/java/org/apache/cocoon/transformation X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: vgritsenko Date: Fri Aug 13 19:37:48 2004 New Revision: 36373 Modified: cocoon/trunk/src/java/org/apache/cocoon/transformation/I18nTransformer.java Log: Remove unused message formatter Modified: cocoon/trunk/src/java/org/apache/cocoon/transformation/I18nTransformer.java ============================================================================== --- cocoon/trunk/src/java/org/apache/cocoon/transformation/I18nTransformer.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/transformation/I18nTransformer.java Fri Aug 13 19:37:48 2004 @@ -1,12 +1,12 @@ /* * Copyright 1999-2004 The Apache Software Foundation. - * + * * Licensed 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. @@ -15,25 +15,6 @@ */ package org.apache.cocoon.transformation; -import java.io.IOException; -import java.text.DateFormat; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.MessageFormat; -import java.text.NumberFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Locale; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.Set; -import java.util.StringTokenizer; - import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.component.ComponentException; import org.apache.avalon.framework.component.ComponentManager; @@ -42,6 +23,7 @@ import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.avalon.framework.parameters.Parameters; + import org.apache.cocoon.ProcessingException; import org.apache.cocoon.caching.CacheableProcessingComponent; import org.apache.cocoon.components.treeprocessor.variables.VariableResolver; @@ -53,11 +35,30 @@ import org.apache.cocoon.sitemap.PatternException; import org.apache.cocoon.xml.ParamSaxBuffer; import org.apache.cocoon.xml.SaxBuffer; + import org.apache.excalibur.source.SourceValidity; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; +import java.io.IOException; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.Set; +import java.util.StringTokenizer; + /** * @cocoon.sitemap.component.documentation * Internationalization transformer is used to transform i18n markup into text @@ -67,8 +68,8 @@ * @cocoon.sitemap.component.logger sitemap.transformer.i18n * @cocoon.sitemap.component.documentation.caching * TBD - * - * + * + * * *

i18n transformer

*

The i18n transformer works by obtaining the users locale @@ -247,7 +248,7 @@ * @author Matthieu Sozeau * @author Marcus Crafter * @author Michael Enke - * @version CVS $Id: I18nTransformer.java,v 1.27 2004/07/13 16:00:12 sylvain Exp $ + * @version CVS $Id$ */ public class I18nTransformer extends AbstractTransformer implements CacheableProcessingComponent, @@ -876,9 +877,6 @@ // Current parameter value (translated or not) private String param_value; - // Message formatter for param substitution. - private MessageFormat formatter; - // Current locale protected Locale locale; @@ -949,7 +947,7 @@ public void configure(Configuration conf) throws ConfigurationException { // read in the config options from the transformer definition Configuration cataloguesConf = conf.getChild("catalogues", false); - + if (cataloguesConf == null) { throw new ConfigurationException("I18NTransformer needs a 'catalogues' configuration at " + conf.getLocation()); } @@ -1086,9 +1084,6 @@ getLogger().debug("Using default catalogue " + defaultCatalogue); } - // Create and initialize a formatter - this.formatter = new MessageFormat(""); - this.formatter.setLocale(locale); } catch (Exception e) { getLogger().debug("exception generated, leaving unconfigured"); throw new ProcessingException(e.getMessage(), e);