Skip to content

swan-io/lokalise-sync-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lokalise Sync CLI

Install

$ yarn add @swan-io/lokalise-sync-cli

Getting started

First, provide a LOKALISE_API_KEY environment variable, containing your Lokalise API Key.

Create a lokalise.config.js file at the root of your project:

require("dotenv").config();

module.exports = [
  {
    name: "your-app-name",
    id: "your-app-lokalise-id",
    defaultLocale: "en",
    paths: {
      src: "/your/app/absolute/path",
      locales: "/your/app/locales/absolute/path",
    },
  },
]

Usage

lokalise sync

$ lokalise sync

Syncs your projects (pulls and pushes).

lokalise pull

$ lokalise pull

Pulls up to date translations from lokalise.

lokalise push

$ lokalise push

Pushes translations to lokalise.

lokalise clean

$ lokalise clean

Removes keys that aren't in the reference locale anymore.

lokalise lint

$ lokalise lint

Checks that translations are in the correct format.

lokalise find-unused

$ lokalise find-unused

Logs values that aren't used in your projects.

lokalise remove-unused

$ lokalise remove-unused

Removes values from your translations files if they aren't used in your projects.