@hitask/jv2js-translate

2.0.0 • Public • Published

java2js-translate-tools

Tools for converting translations from java properties to JSON format. Example:

Source file en/main.properties

login.password=Password

will be compiled to en.json

"main": {
  "login": {
    "password": "Password"
  }
}

API

CLI usage - Executable name: jv2js-translate

Command compile

Options:

  • src, s - relative or absolute path to folder with source locales directories. That folder should contain directories with .properties files. Folder name should math language name. Folder should exist. Required option
  • dist, d - relative or absolute path to folder where compiled files will be placed. Folder should exist. Required option
  • default, f - default locale (must match one of locales folders name). Default value: en

Example: jv2js-translate compile -s ./languages -d ./public/app/json-locales

NodeJs usage

const { compileLocales } = require('@hitask/jv2js-translate');

compileLocales({ src: './src', dist: './dist' });

Readme

Keywords

none

Package Sidebar

Install

npm i @hitask/jv2js-translate

Weekly Downloads

1

Version

2.0.0

License

UNLICENSED

Unpacked Size

10.7 kB

Total Files

10

Last publish

Collaborators

  • alexmarvelo
  • nikita.gerasimov
  • romanroan