1.0.2 • Published 3 years ago

monk-translation-generator v1.0.2

Weekly downloads
-
License
BSD-3-Clause-Clea...
Repository
github
Last release
3 years ago

Monk banner

author: monkvision
name: monk-translation-generator
description: Tool generating a translations JSON file
version: 1.0.2

Usage

git clone https://github.com/monkvision/translation-generator.git
cp .env .env.local
yarn install
yarn start

Examples

Env .env.local

# .env.local
RUN=true

TRANSLATE_API_BASE_URL=https://libretranslate.de
FILE_PREVSTATE=files/prevState.json
FILE_ADDKEYS=files/addKeys.json
FILE_NEXTSTATE=files/nextState.json

SOURCE_LNG=en
TARGET_LNG=fr

DEBUG=true
AUTOTRANSLATE=true
NESTED_JSON=

Inputs files/prevState.json

{
  "zero": "zero",
  "one": "one",
  "two": "two",
  "three": "three",
  "four": "four",
  "five": "five"
}

files/addKeys.json

[
  "six",
  "seven",
  "eight",
  "nine"
]

Output files/nexState.json

{
  "zero": "zéro",
  "one": "un",
  "two": "deux",
  "three": "trois",
  "four": "quatre",
  "five": "cinq",
  "six": "six",
  "seven": "sept",
  "eight": "huit",
  "nine": "neuf"
}

License

This project is licensed under the Clear BSD license. See the LICENSE file for more info.

1.0.2

3 years ago

1.0.1

3 years ago