This plugin helps you to sync your externalized/internationalized messages with your PharseApp account. So it will be a bridge between you as the developer and the translation agency/translater.
apply plugin: 'de.esailors.gradle.plugins.phraseapp'
phraseAppSettings {
projectId = "123456789-your-project-id"˘
authToken = "987654321-your-auth-token"
}
buildscript {
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'de.esailors.gradle.plugins:phraseapp-gradle-plugin:1.0.0-SNAPSHOT'
}
}
After you have configured your build.gradle file, simply run: gradle [taskname]
TaskName | Description |
---|---|
download | Downloads all messages properties from PhraseApp for your configured project. |
PropertyName | Default Value | Description |
---|---|---|
authToken | * | The AuthToken you have created in your PhraseApp account to pull/push keys. |
projectId | * | The internal PhraseApp project id to identify the messages you will pull/push. |
destinationDir | generated-resources | The name of the folder where the {messagesDir} should located. |
destinationMessagesDir | messages | The name of the folder where the downloaded messages should be saved. |
messageFilePrefix | messages_ | The prefix name of the messages files. |
fileFormat | properties | The file format you want to download the messages keys.[properties,xml] |
After you have configured your build.gradle file, simply run: gradle [the-task-you-want-to-execute].
- Java 7 or higher
- SLF4J for logging
- Lombok to remove some boilerplate code
- Phrase-Java-Client from mytaxi to encapsulate the PhraseApp API
- Spring-Web because the PharseApp-Java-Client needs this
- JUntit for simple unit tests
- ensure you have the correct gradle.publish.key and gradle.publish.secret in your gradle config: $HOME_DIR/.gradle/gradle.properties (~/.gradle/gradle.properties)
- ensure you have updated the version number of the plugin and added some changelog comments in the CHANGELOG.md file
- release the plugin with make publish
- commit and push the updated version
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
- update build cycle
- release on master branch push
- create tag on release
- integrate auto-version-update plugin
- increase version of plugin
- push functionality - push new keys or translation mistakes to phraseApp