fjp203 / keys-translations-manager

A web application for locale's keys and translations management.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIT Licensed Dependency Status Build Status Coverage Status

Keys-Translations Manager

This project offers a web application which aims to facilitate locale management. With this application, you can manage keys and their related translations. Also, you can download final locale files (either *.json or *.properties) through this application.

Demo

demo

Prerequisites

  • Download Node.js (suggestion: v5+) and MongoDB, and then get them installed.
  • Start mongod process and make sure it's running normally.

Getting Started

Checkout this repo (or directly download the stable release from here), install dependencies, then start the web server:

$ git clone https://github.com/chejen/keys-translations-manager
$ cd keys-translations-manager
$ npm install
$ npm start

Open http://localhost:3000/ and enjoy it.

Custom

There are some settings (in ktm.config.js) you can configure. The table below lists the available ones:

Setting Description Default
server Web server's hostname and port { hostname: 'localhost', port: 3000 }
database MongoDB connection URI 'mongodb://localhost:27017/translationdb'
locales The locales need to be managed. (You can add or remove locales arbitrarily.) ['en-US', 'zh-TW']
projects The projects need to be localized. (You can add or remove projects arbitrarily.) [ {id:'p1', name:'project A'}, {id:'p2', name:'project B'} ]
  • Rebuild the code (npm run build) if you change the settings of locales or projects.
  • Restart the server if you change any of these configurations.

CLI

  • Download locales without opening the web application. (See [keys-translations-manager-cli] 12 for more details)

REST API

/api/download/{format}/{fileType}/{projectId}/{locale}

  • Method:

    • GET
  • Parameters:

    • format: replace it with f (formatted) or n (not formatted) 【Required】
    • fileType: replace it with json or properties 【Required】
    • projectId: replace it with the project ID set in ktm.config.js 【Required】
    • locale: replace it with the locale set in ktm.config.js

Example request URIs:

Technologies

  • Scaffolded with [MongoDB] 1, [Express] 2, [React] 3, and [Node.js] 4
  • Styled with [Bootstrap] 5 (theme: [SB Admin 2] 7) and [Less] 6
  • Module Bundler: [webpack] 9
  • Miscellaneous: [Babel] 10, [ESLint] 11

License

This source code is licensed under the MIT License.

About

A web application for locale's keys and translations management.

License:MIT License


Languages

Language:JavaScript 98.8%Language:CSS 1.2%