You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2004/08/14 04:37:49 UTC
svn commit: rev 36373 - cocoon/trunk/src/java/org/apache/cocoon/transformation
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
- *
- *
+ *
+ *
*
* <h3>i18n transformer</h3>
* <p>The <strong>i18n transformer</strong> works by obtaining the users locale
@@ -247,7 +248,7 @@
* @author <a href="mailto:mattam@netcourrier.com">Matthieu Sozeau</a>
* @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
* @author <a href="mailto:Michael.Enke@wincor-nixdorf.com">Michael Enke</a>
- * @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);