Gradle Plugin for POEditor

Gradle plugin to sync translations with POEditor

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

be.lukin.poeditor
ArtifactId

ArtifactId

gradle
Last Version

Last Version

0.3.3
Release Date

Release Date

Type

Type

jar
Description

Description

Gradle Plugin for POEditor
Gradle plugin to sync translations with POEditor
Project URL

Project URL

https://github.com/lukin0110/poeditor-gradle/
Source Code Management

Source Code Management

https://github.com/lukin0110/poeditor-gradle/

Download gradle

How to add to project

<!-- https://jarcasting.com/artifacts/be.lukin.poeditor/gradle/ -->
<dependency>
    <groupId>be.lukin.poeditor</groupId>
    <artifactId>gradle</artifactId>
    <version>0.3.3</version>
</dependency>
// https://jarcasting.com/artifacts/be.lukin.poeditor/gradle/
implementation 'be.lukin.poeditor:gradle:0.3.3'
// https://jarcasting.com/artifacts/be.lukin.poeditor/gradle/
implementation ("be.lukin.poeditor:gradle:0.3.3")
'be.lukin.poeditor:gradle:jar:0.3.3'
<dependency org="be.lukin.poeditor" name="gradle" rev="0.3.3">
  <artifact name="gradle" type="jar" />
</dependency>
@Grapes(
@Grab(group='be.lukin.poeditor', module='gradle', version='0.3.3')
)
libraryDependencies += "be.lukin.poeditor" % "gradle" % "0.3.3"
[be.lukin.poeditor/gradle "0.3.3"]

Dependencies

compile (1)

Group / Artifact Type Version
be.lukin.poeditor : poeditor-client jar 0.3.4

Project Modules

There are no modules declared in this project.

poeditor-gradle

Build Status

Gradle plugin to manage translations easily within a POEditor project. The plugin enables you to include downloading and uploading of translations in your Gradle build file.

This gradle plugin depends on poeditor-java, a java client for the POEditor API.

  1. Install

Add the following 2 lines of code to your gradle.build file.

In the dependencies section:

classpath 'be.lukin.poeditor:gradle:0.3.3'

Include the plugin:

apply plugin: 'poeditor'

The plugin requires at minimum Java 7 and Gradle 2.x.

  1. Configure

Add configuration about your POEditor project to the gradle.build file. You need an api key and project id from POEditor.

Example configuration:

poeditor {
    apikey 'your api key here'
    projectId 'your project id here'
    type 'android_strings'
    tagsNew '1.0'

    terms 'App/src/main/res/values/strings.xml'
    trans 'en', 'App/src/main/res/values/strings.xml'
    trans 'nl', 'App/src/main/res/values-nl/strings.xml'
    trans 'fr', 'App/src/main/res/values-fr/strings.xml'
    
    filters 'nl', 'translated'
    filters 'fr', 'translated, automatic'
}
Parameter Description
apiKey api key to access the api, can be obtained in your Account
projectId id of the project on POEditor
type file format: po, pot, mo, xls, apple_strings, xliff, android_strings, resx, resw, properties, json
terms point to the file that contains all the terms, probably this is your default language
trans receives 2 parameters: language code & file path of a translation
filters receives 2 parameters: language code & comma separated list of filters. Check the API Reference for all available filters

Now you're all set to manage your translations.

  1. Usage

After your have created your translation project on POEditor you can can initialize your project based on your c onfiguration.

Initialize

gradle poeditorInit

This will create terms and add languages to your project.

Download translations

gradle poeditorPull

Upload translations

gradle poeditorPush
Argument Description
languages specify the languages that you want to upload, by default everything is uploaded
override force to override the translation on POEditor

Example:

gradle poeditorPush -Planguages=nl,fr -Poverride=true

Add terms

gradle poeditorPushTerms

A few example configurations can be found in the example projects folder.

License

Copyright 2015 Maarten Huijsmans

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.0