Giter VIP home page Giter VIP logo

gradle-omegat-plugin's Introduction

Overview

The OmegaT gradle plugin allow you to generate translation files from original source text with TMX translation memory DB.

Getting Started Using the Plugin

Please follow the below steps to add the Gradle OmegaT Plugin to your Gradle build script.

Step 1: Apply the plugin to your Gradle script

To apply the plugin, please add one of the following snippets to your build.gradle file:

buildscript {
    repositories {
        maven {
            url "https://dl.bintray.com/miurahr/maven/"
        }
        maven {
            url "https://dl.bintray.com/omegat-org/maven/"
        }
        jcenter()
    }
    dependencies {
        classpath 'org.omegat.gradle:gradle-omegat-plugin:0.9.4'
    }
}
apply plugin: 'com.omegat.gradle'

Note: As in 20, Auguest, 2016, the plugin is located my bintray repository and not in jcenter nor official plugin repository.

Step 2: Add the omegat configuration closure to your build.gradle file

omegat {
    projectDir project.rootDir
}

If not specified, the OmegaT plugin assumes project directory $projectDir is an omegat project root.

Step 3: Add your own custom OmegaT task

You can make your own custom task using OmegatTask type. Here is an example to run Java properties alignment from gradle task.

repositories {
    maven {
        url "https://dl.bintray.com/miurahr/maven/"
    }
    maven {
        url "https://dl.bintray.com/omegat-org/maven/"
    }
    jcenter()
}
import org.omegat.gradle.OmegatTask

task runOmegaT(type: OmegatTask) {
    options = [projectDir]
}

task alignProperties(type: OmegatTask) {
    options = [projectDir, "--mode=console-align", "--alignDir=/translatedFiles/"]
}

Step 4: Call translation

$ ./gradlew translate

This will generate translation result in OmegaT target directory.

Step 5: Clean targets

$ ./gradlew cleanTranslation

Get involved

Send patch

It is recommend to send a pull request to github project as usual.

Discussion

There is a gitter chat room for this project.

IDE

Original author uses JetBrains IntelliJ IDEA community edition for development. Thanks JetBrains for providing great IDE for OSS community.

Release procedure

Update version and dependency

Edit gradle.properties for artifact version increment. Also edit src/main/resources/org/omegat/gradle/omegat.properties for dependency versions. This text is used both Gradle build script and plugin source.

Test artifact

Run

$ ./gradlew uploadArchives

then gradle installes artifact into your local maven repository. This effects your development environment to support new test version is accesible from your test project.

Upload artifact

After you satisfy test result, you can upload the artifact onto bintray maven repository.

$ ./graldew bintrayUpload

gradle-omegat-plugin's People

Contributors

miurahr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.