Skip to content

Commit

Permalink
OF-2889: i18n properties: don't convert from UTF-8 to Latin1
Browse files Browse the repository at this point in the history
Revert: OF-1517: Don't require encoded i18n files for plugins
8a48cb8
  • Loading branch information
stokito committed Jan 6, 2025
1 parent 21a962c commit d13e380
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 89 deletions.
31 changes: 0 additions & 31 deletions i18n/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,4 @@
<!-- Use static build timestamp for reproducible builds -->
<project.build.outputTimestamp>1980-02-01T00:00:00Z</project.build.outputTimestamp>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>

<plugins>
<plugin>
<!--
Java has trouble reading translations from UTF-8 files. To work around that,
this plugin ensures that Java-compatible encoding is used.
See https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>2.0.1</version>
<executions>
<execution>
<id>utf8-to-latin1</id>
<goals>
<goal>inplace</goal>
</goals>
<configuration>
<dir>${project.build.outputDirectory}</dir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,32 @@
</includes>
</fileSet>

<!-- database and web directory -->
<!-- database, i18n and web directory -->
<fileSet>
<outputDirectory/>
<directory>${project.build.sourceDirectory}/..</directory>
<includes>
<include>database/**</include>
<include>i18n/**</include>
<include>web/**</include>
</includes>
<!-- Exclude jsp pages (they will be compiled) and filterable resources -->
<excludes>
<exclude>**/*.jsp</exclude>
<exclude>i18n/**/*.properties</exclude>
<exclude>web/**/*.xml</exclude>
<exclude>web/**/*.html</exclude>
<exclude>web/**/*.properties</exclude>
</excludes>
</fileSet>

<!-- database and web directory (filtered) -->
<!-- database, i18n and web directory (filtered) -->
<fileSet>
<outputDirectory/>
<directory>${project.build.sourceDirectory}/..</directory>
<filtered>true</filtered>
<includes>
<include>i18n/**/*.properties</include>
<include>web/**/*.xml</include>
<include>web/**/*.html</include>
<include>web/**/*.properties</include>
Expand All @@ -77,15 +80,6 @@
</excludes>
</fileSet>

<!-- i18n -->
<fileSet>
<outputDirectory>i18n</outputDirectory>
<directory>${project.build.directory}/i18n/</directory>
<includes>
<include>*.properties</include>
</includes>
</fileSet>

<!-- web.xml (it will be modified by JspC) -->
<fileSet>
<outputDirectory>web/WEB-INF</outputDirectory>
Expand Down
47 changes: 0 additions & 47 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,53 +184,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<!--
Java has trouble reading translations from UTF-8 files. To work around that,
this plugin copies the i18n files from source to the build directory, to be
modified later by the native2ascii-maven-plugin.
-->
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/i18n/</outputDirectory>
<resources>
<resource>
<directory>${project.build.sourceDirectory}/../i18n/</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--
Java has trouble reading translations from UTF-8 files. To work around that,
this plugin ensures that Java-compatible encoding is used.
See https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>2.0.1</version>
<executions>
<execution>
<id>utf8-to-latin1</id>
<goals>
<goal>inplace</goal>
</goals>
<configuration>
<dir>${project.build.directory}/i18n/</dir>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down

0 comments on commit d13e380

Please sign in to comment.