Skip to content
Luca Bellonda edited this page Jan 27, 2018 · 2 revisions

Check Properties Maven Mojo

The checklocale plugin is used to check if localizations stored in properties files stored in folders contain the same keys and no duplicate exist. Given a set of folders, subfolders are scanned to extract the keys. The expected folder structure is as follows:

  localizations
     |
     |
     +--en_US
     |       |
     |       + strings.properties
     |       + errors.properties
     |
     +--it_IT
            |
            + strings.properties
            + errors.properties

Files with the same name will be compared in en_US and it_IT subfolders.

The goal is checklocale and a sample usage is outlined here:

<plugin>
    <groupId>io.github.lbellonda</groupId>
    <artifactId>checklocale</artifactId>
    <version>CURRENT_VERSION</version>
    <executions>
        <execution>
            <id>one</id>
            <goals>
                <goal>checklocale</goal>
            </goals>
            <configuration>
            <encoding>UTF-8</encoding>
            <directories>
                <directory>src/main/resources/locale</directory>
            </directories>
            </configuration>
        </execution>
    </executions>
</plugin>
Clone this wiki locally