manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1536682 - in /manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main: java/org/apache/manifoldcf/crawler/connectors/email/ native2ascii/org/apache/manifoldcf/crawler/connectors/email/ resources/org/apache/manifoldcf/crawler...
Date Tue, 29 Oct 2013 12:00:36 GMT
Author: kwright
Date: Tue Oct 29 12:00:36 2013
New Revision: 1536682

URL: http://svn.apache.org/r1536682
Log:
Internationalize tab names

Modified:
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_en_US.properties
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Configuration_Server.html
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
    manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java?rev=1536682&r1=1536681&r2=1536682&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/email/EmailConnector.java
Tue Oct 29 12:00:36 2013
@@ -581,7 +581,7 @@ public class EmailConnector extends org.
   public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out,
     Locale locale, ConfigParams parameters, List<String> tabsArray)
     throws ManifoldCFException, IOException {
-    tabsArray.add("Server");
+    tabsArray.add(Messages.getString(locale, "EmailConnector.Server"));
     // Map the parameters
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
@@ -589,7 +589,7 @@ public class EmailConnector extends org.
     fillInServerConfigurationMap(paramMap, parameters);
 
     // Output the Javascript - only one Velocity template for all tabs
-    outputResource("ConfigurationHeader.js", out, locale, paramMap);
+    Messages.outputResourceWithVelocity(out, locale, "ConfigurationHeader.js", paramMap);
   }
 
   @Override
@@ -603,7 +603,6 @@ public class EmailConnector extends org.
     // Fill in the parameters
     fillInServerConfigurationMap(paramMap, parameters);
     Messages.outputResourceWithVelocity(out, locale, "Configuration_Server.html", paramMap);
-
   }
 
   private void fillInServerConfigurationMap(Map<String, Object> paramMap, ConfigParams
parameters) {
@@ -767,21 +766,9 @@ public class EmailConnector extends org.
     // Fill in map from each tab
     fillInServerConfigurationMap(paramMap, parameters);
 
-    outputResource("ConfigurationView.html", out, locale, paramMap);
+    Messages.outputResourceWithVelocity(out, locale, "ConfigurationView.html", paramMap);
   }
 
-  /**
-  * Read the content of a resource, replace the variable ${PARAMNAME} with the
-  * value and copy it to the out.
-  *
-  * @param resName
-  * @param out
-  * @throws ManifoldCFException
-  */
-  private static void outputResource(String resName, IHTTPOutput out,
-    Locale locale, Map<String, Object> paramMap) throws ManifoldCFException {
-    Messages.outputResourceWithVelocity(out, locale, resName, paramMap);
-  }
 
   /////////////////////////////////End of configuration UI////////////////////////////////////////////////////
 
@@ -805,9 +792,9 @@ public class EmailConnector extends org.
     DocumentSpecification ds, List<String> tabsArray)
     throws ManifoldCFException, IOException {
     // Add the tabs
-    tabsArray.add("Metadata");
-    tabsArray.add("Filter");
-    outputResource("SpecificationHeader.js", out, locale, null);
+    tabsArray.add(Messages.getString(locale, "EmailConnector.Metadata"));
+    tabsArray.add(Messages.getString(locale, "EmailConnector.Filter"));
+    Messages.outputResourceWithVelocity(out, locale, "SpecificationHeader.js", null);
   }
 
   /**
@@ -841,7 +828,7 @@ public class EmailConnector extends org.
     paramMap.put("TabName", tabName);
     fillInMetadataTab(paramMap, ds);
     fillInMetadataAttributes(paramMap);
-    outputResource("Specification_Metadata.html", out, locale, paramMap);
+    Messages.outputResourceWithVelocity(out, locale, "Specification_Metadata.html", paramMap);
   }
 
   /**
@@ -876,7 +863,7 @@ public class EmailConnector extends org.
     paramMap.put("TabName", tabName);
     fillInFilterTab(paramMap, ds);
     fillInSearchableAttributes(paramMap);
-    outputResource("Specification_Filter.html", out, locale, paramMap);
+    Messages.outputResourceWithVelocity(out, locale, "Specification_Filter.html", paramMap);
   }
 
   private void fillInSearchableAttributes(Map<String, Object> paramMap) {
@@ -1025,7 +1012,7 @@ public class EmailConnector extends org.
     Map<String, Object> paramMap = new HashMap<String, Object>();
     fillInFilterTab(paramMap, ds);
     fillInMetadataTab(paramMap, ds);
-    outputResource("SpecificationView.html", out, locale, paramMap);
+    Messages.outputResourceWithVelocity(out, locale, "SpecificationView.html", paramMap);
   }
 
   ///////////////////////////////////////End of specification UI///////////////////////////////////////////////

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_en_US.properties?rev=1536682&r1=1536681&r2=1536682&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_en_US.properties
Tue Oct 29 12:00:36 2013
@@ -13,3 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+EmailConnector.Server=Server
+EmailConnector.Metadata=Metadata
+EmailConnector.Filter=Filter

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_ja_JP.properties?rev=1536682&r1=1536681&r2=1536682&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/email/common_ja_JP.properties
Tue Oct 29 12:00:36 2013
@@ -13,3 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+EmailConnector.Server=Server
+EmailConnector.Metadata=Metadata
+EmailConnector.Filter=Filter

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Configuration_Server.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Configuration_Server.html?rev=1536682&r1=1536681&r2=1536682&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Configuration_Server.html
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Configuration_Server.html
Tue Oct 29 12:00:36 2013
@@ -15,7 +15,7 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-#if($TABNAME == 'Server')
+#if($TabName == $ResourceBundle.getString('EmailConnector.Server'))
 
 <table class="displaytable">
     <tr>

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html?rev=1536682&r1=1536681&r2=1536682&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Filter.html
Tue Oct 29 12:00:36 2013
@@ -15,7 +15,7 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-#if($TABNAME == 'Filter')
+#if($TabName == $ResourceBundle.getString('EmailConnector.Filter'))
 
 <table class="displaytable">
     <tr>

Modified: manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html?rev=1536682&r1=1536681&r2=1536682&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
(original)
+++ manifoldcf/branches/CONNECTORS-553/connectors/email/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/email/Specification_Metadata.html
Tue Oct 29 12:00:36 2013
@@ -15,7 +15,7 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-#if($TABNAME == 'Metadata')
+#if($TabName == $ResourceBundle.getString('EmailConnector.Metadata'))
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>



Mime
View raw message