Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

debueb/oneskyapp-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central

oneskyapp-maven-plugin

This plugin allows you to download and upload translation files from the excellent online translation service OneSkyApp

How to use

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>

Goals and configurations params

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

Execute maven plugin

By default, the plugin runs during the process-resources phase

mvn clean process-resources

About

Maven plugin to download and upload translation files on oneskyapp.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages