mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 02:24:18 +00:00
remove i18n transformation because it doesn't work easily on all platforms. Reserve UTF* native2ascii functionality to profiles for those who wish to use it to assist in editing.
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2784 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -80,42 +80,62 @@
|
|||||||
</excludes>
|
</excludes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<tasks>
|
|
||||||
<mkdir dir="target/classes" />
|
|
||||||
<native2ascii encoding="UTF8"
|
|
||||||
src="${basedir}/src/main/resources"
|
|
||||||
dest="${basedir}/target/classes"
|
|
||||||
includes="**/*.properties.UTF-8" ext="" />
|
|
||||||
</tasks>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant-nodeps</artifactId>
|
|
||||||
<version>1.7.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.ant</groupId>
|
|
||||||
<artifactId>ant</artifactId>
|
|
||||||
<version>1.7.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>native2ascii</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<tasks>
|
||||||
|
<mkdir dir="target/classes" />
|
||||||
|
<native2ascii encoding="UTF8"
|
||||||
|
src="${basedir}/src/main/native2ascii"
|
||||||
|
dest="${basedir}/src/main/resources"
|
||||||
|
includes="**/*.properties.UTF-8" ext="" />
|
||||||
|
</tasks>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.ant</groupId>
|
||||||
|
<artifactId>ant-nodeps</artifactId>
|
||||||
|
<version>1.7.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.ant</groupId>
|
||||||
|
<artifactId>ant</artifactId>
|
||||||
|
<version>1.7.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun</groupId>
|
||||||
|
<artifactId>tools</artifactId>
|
||||||
|
<version>1.4.2</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>
|
||||||
|
${java.home}/../lib/tools.jar
|
||||||
|
</systemPath>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -126,25 +146,5 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>default-tools.jar</id>
|
|
||||||
<activation>
|
|
||||||
<property>
|
|
||||||
<name>java.vendor</name>
|
|
||||||
<value>Sun Microsystems Inc.</value>
|
|
||||||
</property>
|
|
||||||
</activation>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun</groupId>
|
|
||||||
<artifactId>tools</artifactId>
|
|
||||||
<version>1.4.2</version>
|
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${java.home}/../lib/tools.jar</systemPath>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
31
language-packs/src/main/java/Properties2XML.java
Normal file
31
language-packs/src/main/java/Properties2XML.java
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
|
public class Properties2XML
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void main(String[] args) throws FileNotFoundException, IOException
|
||||||
|
{
|
||||||
|
|
||||||
|
File dir = new File("src/main/resources");
|
||||||
|
|
||||||
|
for(File file : dir.listFiles())
|
||||||
|
{
|
||||||
|
if(file.getName().endsWith(".properties"))
|
||||||
|
{
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.load(new FileInputStream(file));
|
||||||
|
|
||||||
|
props.storeToXML(new FileOutputStream(new File(file.getAbsolutePath().concat(".xml"))), "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user