Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lingui/babel-plugin-extract-messages

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lingui/babel-plugin-extract-messages

Babel plugin for collecting messages from source code for internationalization

  • 3.8.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @lingui/babel-plugin-extract-messages?

@lingui/babel-plugin-extract-messages is a Babel plugin designed to extract messages from your code for internationalization (i18n) purposes. It works in conjunction with the LinguiJS framework to help developers manage and translate text in their applications.

What are @lingui/babel-plugin-extract-messages's main functionalities?

Extracting Messages

This feature allows you to extract messages from your codebase into a specified directory. The configuration specifies the directory where the extracted messages will be stored and whether to extract messages from `formatMessage` calls.

```json
{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": [
    [
      "@lingui/babel-plugin-extract-messages",
      {
        "localeDir": "./locales/",
        "extractFromFormatMessageCall": true
      }
    ]
  ]
}
```

Custom Message Extraction

This feature allows you to define custom formatters for message extraction. The configuration includes a custom formatter with a specific name and pattern, enabling more flexible message extraction.

```json
{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": [
    [
      "@lingui/babel-plugin-extract-messages",
      {
        "localeDir": "./locales/",
        "extractFromFormatMessageCall": true,
        "customFormatters": [
          {
            "name": "customFormatter",
            "pattern": "customPattern"
          }
        ]
      }
    ]
  ]
}
```

Other packages similar to @lingui/babel-plugin-extract-messages

Keywords

FAQs

Package last updated on 31 Mar 2021

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc