@krds/labels
Label file generator for KRDS projects
Last updated 2 years ago by krds .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @krds/labels 
SYNC missed versions from official npm registry.

Label Generator for KRDS

Allows to export translation files for projects via the KRDS Unity API. Designed to support multiple output formats.

Usage

For Kite:

krds-labels --db krds_unity -f kite -o ./application/config/extra

For Lumen:

krds-labels --db krds_unity -f lumen -o ./resources/lang

For JSON:

krds-labels --db krds_unity -f json -o ./labels
Option Meaning
--db Database to export labels from
-f Output format
-o Output path. Wether this is a file or directory depends on the format used

ENV

You need to set the following ENV variables for it to work

UNITY_URL=https://unity.krds.com
UNITY_TOKEN=<my_token>

Formats

  • kite - Single php file lang.php containing all the labels is written into dir specified by -o option. Usually it belongs to application/config/extra
  • kite08 - Alias for kite
  • kite09 - Same as kite but class naming compatible with Kite 0.9 and 'Kilex' codebase
  • kilex - Alias for kite09
  • lumen - Output for Lumen framework, one folder/php file per locale
  • json - Renders labels into json files, one file per locale, useful for NodeJS apps

Extending

  • For each new format, create a new module in lib (see lib/kite.js for reference)
  • Extend index.js to recognize the new format

TODO

  • Additional formats

Current Tags

  • 1.2.2                                ...           latest (2 years ago)

18 Versions

  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.5.4                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 19
Last Month 19
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |