Git Product home page Git Product logo

auto-translate's Introduction

Auto-Translate

A tool to automate the translation process of react/i18-next projects.

NOTE: This tool was created during a hackathon. Therefore, code quality, tests, error handling, etc. might have suffered to get a usable version of this tool done as quickly as possible.

Features

This tool can semi-automates the translation process by providing the following features:

  1. Auto-detect new translation keys in a react/i18n-next project
  2. Auto-translating translations provided by a user to all available languages
  3. Posting the generated translations in a Slack channel of the users choice
  4. Uploading the translation keys and generated translations to SimpleLocalize

Requirements

Since this tool is written in Scala (and a bit of Java) it runs on the JVM. Therefore, you must have a Java Runtime Environment (JRE) installed.

Setup

After downloading the JAR file, you can invoke it via

java -jar path/to/the/jar/auto-translate.jar

If you plan on using this tool frequently, it might be easier for you to place the following script in a directory that is included in your $PATH (e.g /usr/local/bin):

#!/bin/bash
java -jar path/to/the/jar/auto-translate.jar $@

Name this script auto-translate and mark it executable (via chmod u+x auto-translate) You can then invoke the tool by just typing auto-translate

Usage

The tool is used in three phases:

Initialization

When using the tool in a new project, run auto-translate init in the project directory. This will create a folder .auto-translate/ that contains the configuration file skeleton config.json Before continuing, provide the necessary information in the config file.

Snapshot

Before starting to work on the project, take a snapshot of the translation keys that are already available via

auto-translate snapshot

Run

You can now add a few translations in the code and run the automated translations via

auto-translate run

auto-translate's People

Stargazers

Prasad Ostwal avatar

Watchers

 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.