You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@lingui/cli

Package Overview
Dependencies
Maintainers
2
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lingui/cli

CLI for working wit message catalogs


Version published
Weekly downloads
131K
decreased by-20.47%
Maintainers
2
Created
Weekly downloads
 

Package description

What is @lingui/cli?

@lingui/cli is a command-line interface for the LinguiJS framework, which is used for internationalization (i18n) in JavaScript applications. It provides tools for extracting messages, compiling them, and managing translations.

What are @lingui/cli's main functionalities?

Extract Messages

This command scans your source code for messages marked for translation and extracts them into a catalog file. This is useful for identifying all the text that needs to be translated in your application.

lingui extract

Compile Messages

This command compiles the message catalogs into a format that can be used by the application at runtime. This step is necessary to convert the raw translation files into a format that the LinguiJS runtime can understand.

lingui compile

Add Locale

This command adds a new locale to your project. It sets up the necessary files and directories for managing translations in the specified locale.

lingui add-locale [locale]

Extract and Compile

This combined command first extracts messages and then compiles them. It is a convenient way to update your translation catalogs and make them ready for use in your application.

lingui extract && lingui compile

Other packages similar to @lingui/cli

Changelog

Source

4.11.2 (2024-07-03)

Bug Fixes

  • cli: update translationIO service in CLI package (to handle context) (#1949) (ea7b9e7)
  • include type cast on ts compilation (#1962) (0f66617)

Readme

Source

License Version Downloads

@lingui/cli

lingui command line library for manipulating message catalogues

@lingui/cli is part of LinguiJS. See the documentation for all information, tutorials and examples.

Installation

The library can be installed globally or locally using yarn or npm. The recommended way is installing the package locally. This ensures that everyone who uses the project has the same version and does not need to install additional packages.

npm install --save-dev @lingui/cli
# or using yarn
yarn add --dev @lingui/cli

To run the library locally there are three options, with the first one been recommended one.

1) Add commands to scripts

Add these scripts to your package.json.

{
  "scripts": {
    "extract": "lingui extract",
    "compile": "lingui compile"
  }
}

Then you can use:

npm run extract
npm run compile

2) Use NPX

You can run the scripts directly using a tool for executing Node packages NPX. NPX is included in NPM version 5.2 and higher.

npx lingui extract
npx lingui compile

3) Run commands directly

You can run commands directly from node_modules folder.

node_modules/.bin/lingui extract
node_modules/.bin/lingui compile

Usage

See the reference documentation.

License

This package is licensed under MIT license.

Keywords

FAQs

Package last updated on 03 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc