incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1225189 - in /incubator/lcf/trunk: ./ framework/ framework/core/ framework/core/src/main/java/org/apache/manifoldcf/core/i18n/ framework/core/src/main/native2ascii/ framework/ui-core/ framework/ui-core/src/main/java/org/apache/manifoldcf/u...
Date Wed, 28 Dec 2011 14:14:33 GMT
Author: kwright
Date: Wed Dec 28 14:14:32 2011
New Revision: 1225189

URL: http://svn.apache.org/viewvc?rev=1225189&view=rev
Log:
Fix for CONNECTORS-338

Added:
    incubator/lcf/trunk/framework/ui-core/src/main/native2ascii/
      - copied from r1225179, incubator/lcf/trunk/framework/core/src/main/native2ascii/
    incubator/lcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/
      - copied from r1225179, incubator/lcf/trunk/framework/core/src/main/native2ascii/org/apache/manifoldcf/core/
Removed:
    incubator/lcf/trunk/framework/core/src/main/native2ascii/
    incubator/lcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/core/
Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/framework/build.xml
    incubator/lcf/trunk/framework/core/pom.xml
    incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
    incubator/lcf/trunk/framework/ui-core/pom.xml
    incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1225189&r1=1225188&r2=1225189&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Wed Dec 28 14:14:32 2011
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 0.5-dev =====================
 
+CONNECTORS-338: Move localization to the ui-core jar.
+(Karl Wright)
+
 CONNECTORS-335: Add i18n infrastructure.  This commit also addresses
 some problems found in the CMIS, Alfresco, and OpenSearchServer
 connectors having to do with improper escaping of data values.

Modified: incubator/lcf/trunk/framework/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/build.xml?rev=1225189&r1=1225188&r2=1225189&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/build.xml (original)
+++ incubator/lcf/trunk/framework/build.xml Wed Dec 28 14:14:32 2011
@@ -54,7 +54,6 @@
                 </fileset>
             </classpath>
         </javac>
-        <native2ascii encoding="UTF-8" src="core/src/main/native2ascii" dest="build/core/classes"
includes="**/*.properties" />
     </target>
 
     <target name="compile-ui-core" depends="compile-core">
@@ -67,6 +66,7 @@
                 <pathelement location="build/core/classes"/>
             </classpath>
         </javac>
+        <native2ascii encoding="UTF-8" src="ui-core/src/main/native2ascii" dest="build/ui-core/classes"
includes="**/*.properties" />
     </target>
 
     <target name="compile-agents" depends="compile-core">
@@ -206,7 +206,9 @@
 
     <target name="jar-ui-core" depends="compile-ui-core">
         <mkdir dir="build/jar"/>
-        <jar destfile="build/jar/mcf-ui-core.jar" basedir="build/ui-core/classes"/>
+        <jar destfile="build/jar/mcf-ui-core.jar">
+          <fileset dir="build/ui-core/classes"/>
+        </jar>
     </target>
 
     <target name="jar-agents" depends="compile-agents">

Modified: incubator/lcf/trunk/framework/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/pom.xml?rev=1225189&r1=1225188&r2=1225189&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/pom.xml (original)
+++ incubator/lcf/trunk/framework/core/pom.xml Wed Dec 28 14:14:32 2011
@@ -31,27 +31,6 @@
   <build>
     <plugins>
       <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>native2ascii-maven-plugin</artifactId>
-        <version>1.0-alpha-1</version>
-        <configuration>
-            <dest>target/classes</dest>
-            <src>src/main/native2ascii</src>
-        </configuration>
-        <executions>
-            <execution>
-                <id>native2ascii-utf8</id>
-                <goals>
-                    <goal>native2ascii</goal>
-                </goals>
-                <configuration>
-                    <encoding>UTF8</encoding>
-                    <includes>**/*.properties</includes>
-                </configuration>
-            </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <executions>

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java?rev=1225189&r1=1225188&r2=1225189&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
(original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
Wed Dec 28 14:14:32 2011
@@ -32,8 +32,6 @@ import org.apache.manifoldcf.core.interf
 
 public class Messages
 {
-  public static final String DEFAULT_BUNDLE_NAME="org.apache.manifoldcf.core.i18n.common";
-
   // Keep track of messages and bundles we've already complained about.
   
   protected static Set<BundleKey> bundleSet = new HashSet<BundleKey>();
@@ -46,36 +44,6 @@ public class Messages
   {
   }
   
-  // These four have limited applicability since they are all local to the core jar, which
generally does not render
-  // text.
-  
-  public static String getString(Locale locale, String messageKey)
-  {
-    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
-  }
-  
-  public static String getString(Locale locale, String messageKey, Object[] args)
-  {
-    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
-  }
-  
-  // More general methods which allow bundlenames and class loaders to be specified.
-  
-  public static String getString(String bundleName, Locale locale, String messageKey)
-  {
-    return getString(bundleName, locale, messageKey, null);
-  }
-
-  public static String getString(ClassLoader classLoader, String bundleName, Locale locale,
String messageKey)
-  {
-    return getString(classLoader, bundleName, locale, messageKey, null);
-  }
-  
-  public static String getString(String bundleName, Locale locale, String messageKey, Object[]
args)
-  {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
-  }
-  
   /** Read a resource as an input stream, given a classloader, path, locale, and resource
key.
   */
   public static InputStream getResourceAsStream(Class classInstance, String pathName,

Modified: incubator/lcf/trunk/framework/ui-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/ui-core/pom.xml?rev=1225189&r1=1225188&r2=1225189&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/ui-core/pom.xml (original)
+++ incubator/lcf/trunk/framework/ui-core/pom.xml Wed Dec 28 14:14:32 2011
@@ -28,6 +28,32 @@
   <artifactId>mcf-ui-core</artifactId>
   <name>ManifoldCF - Framework - UI Core</name>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>native2ascii-maven-plugin</artifactId>
+        <version>1.0-alpha-1</version>
+        <configuration>
+            <dest>target/classes</dest>
+            <src>src/main/native2ascii</src>
+        </configuration>
+        <executions>
+            <execution>
+                <id>native2ascii-utf8</id>
+                <goals>
+                    <goal>native2ascii</goal>
+                </goals>
+                <configuration>
+                    <encoding>UTF8</encoding>
+                    <includes>**/*.properties</includes>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <!-- Internal dependencies -->
     <dependency>

Modified: incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java?rev=1225189&r1=1225188&r2=1225189&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
(original)
+++ incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
Wed Dec 28 14:14:32 2011
@@ -36,6 +36,85 @@ import org.apache.commons.lang.StringUti
 
 public class Messages extends org.apache.manifoldcf.core.i18n.Messages
 {
+  public static final String DEFAULT_BUNDLE_NAME="org.apache.manifoldcf.ui.i18n.common";
+
+  public static String getString(Locale locale, String messageKey)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyString(Locale locale, String messageKey)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getString(Locale locale, String messageKey, Object[] args)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+  
+  public static String getBodyString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey, Object[]
args)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey, Object[]
args)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  // More general methods which allow bundlenames and class loaders to be specified.
+  
+  public static String getString(String bundleName, Locale locale, String messageKey, Object[]
args)
+  {
+    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(String bundleName, Locale locale, String messageKey,
Object[] args)
+  {
+    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey,
args);
+  }
+
+  public static String getBodyString(String bundleName, Locale locale, String messageKey,
Object[] args)
+  {
+    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey,
args);
+  }
+  
+  public static String getAttributeJavascriptString(String bundleName, Locale locale, String
messageKey, Object[] args)
+  {
+    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale,
messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey,
Object[] args)
+  {
+    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey,
args);
+  }
+
   /** Constructor - do no instantiate
   */
   protected Messages()



Mime
View raw message