Coder Social home page Coder Social logo

lokalise's Introduction

Build Status codecov JavaScript Style Guide

lokalise

An unofficial node client for lokalise to import and update localizations.

Usage

  Usage: lokalise [options] [config.json]

  Lokali.se client for retrieving localization files.

  Options:

    -V, --version        output the version number
    -t, --token <token>  set the api token
    -p, --project <id>   set the project id
    -o, --output <path>  output Path
    -h, --help           output usage information

.lokalise.json

If no config.json file argument is given lokalise will search for a .lokalise.json file in the work dir. This is useful for having different configurations per different project.

Any config.json file should have the following structure:

{
  "token": [string] (required) Your locali.se api token,
  "project": [string] (required) Your locali.se project ID,
  "output": [string (required) Path where message files will be stored,
  "keys": [object] (optional, default false) Creates a keys file under output_path (read more about it bellow)
}

Most of these options can also be provided via one or more of the overriding command arguments or environment variables. See src/config.js for more details.

Keys File

The optional keys configuration fragment creates a file in the specified output path that enumerates your localise message keys. This may be very useful in your code, for autocompletion & type checking over the allowable message keys, for example. You can configure the format of the keys file to suit your needs by passing the following object:

{
  output: [string] (optional) A name for the keys file, defaults to output/keys.js,
  type: 'es5' | 'es6' (optional, defaults to es5) the output module type,
  flow: [boolean] (optional, default false) if true adds a //@flow annotation at the top so that the keys can be used with flow type checking
}

lokalise's People

Contributors

carlossless avatar davnicwil avatar

Watchers

James Cloos avatar Mickael Lecoq 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.