This plugin allows you to download and upload translation files from the excellent online translation service OneSkyApp
Add the following to your pom.xml <plugins> section, replacing the following VARIABLES
| variable | value |
|---|---|
| CURRENT_VERSION | latest version published on maven central |
| PUBLIC_KEY | your OneSkyApp public key |
| SECRET_KEY | your OneSkyApp secret key |
| PROJECT_ID | browse your project and take the ID from the URL |
<plugin>
<groupId>de.ebf</groupId>
<artifactId>oneskyapp-maven-plugin</artifactId>
<version>[CURRENT_VERSION]</version>
<configuration>
<publicKey>[PUBLIC_KEY]</publicKey>
<secretKey>[SECRET_KEY]</secretKey>
<projectId>[PROJECT_ID]</projectId>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>get-translations</id>
<phase>process-resources</phase>
<goals>
<goal>get-translations</goal>
</goals>
<configuration>
<sourceFileNames>
<param>messages.properties</param>
<param>ValidationMessagees.properties</param>
</sourceFileNames>
<locales>
<param>de</param>
<param>fr</param>
</locales>
<sourceLocale>en</sourceLocale>
<outputDir>src/main/webapp/WEB-INF/classes/</outputDir>
</configuration>
</execution>
<execution>
<id>upload-files</id>
<phase>process-resources</phase>
<goals>
<goal>upload-files</goal>
</goals>
<configuration>
<files>
<param>src/main/webapp/WEB-INF/classes/messages.properties</param>
</files>
<locale>en-US</locale>
<fileFormat>JAVA_PROPERTIES</fileFormat>
<isKeepingAllStrings>true</isKeepingAllStrings> <!-- optional - see https://github.com/onesky/api-documentation-platform/blob/master/resources/file.md#upload---upload-a-file -->
</configuration>
</execution>
</executions>
</plugin>| goal | description | configuration params |
|---|---|---|
| get-translations | download translation files | - <sourceFileNames> the name of the files to download - <locales> the translations to download. files will be stored as [outputDir]/[sourceFileName]_[locale].[sourceFileNameExtension]- <sourceLocale> optional: will be stored as [outputDir]/[sourceFileName].[sourceFileNameExtension] - <outputDir> relative or absolute path for the download files |
| upload-files | upload translation files. | - <files> files to upload - <locale> the locale of the upload - <fileFormat> the file format |
By default, the plugin runs during the process-resources phase
mvn clean process-resources
