Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@formatjs/cli
Advanced tools
@formatjs/cli is a command-line tool for internationalizing JavaScript applications. It provides functionalities for extracting, compiling, and managing translation messages, making it easier to handle localization in your projects.
Extract Messages
This command extracts all the translation messages from the JavaScript files in the 'src' directory and outputs them to a JSON file named 'en.json'.
npx formatjs extract 'src/**/*.js' --out-file lang/en.json
Compile Messages
This command compiles the extracted messages from 'en.json' into a format that can be used by the application, outputting the result to 'en-compiled.json'.
npx formatjs compile lang/en.json --out-file lang/en-compiled.json
Compile Messages with Pseudo-Localization
This command compiles the messages with pseudo-localization, which is useful for testing how the application handles different languages and character sets. The output is saved to 'en-pseudo.json'.
npx formatjs compile lang/en.json --pseudo-locale --out-file lang/en-pseudo.json
Format Messages
This command formats the extracted messages in 'en.json' to ensure consistency and readability, saving the formatted messages to 'en-formatted.json'.
npx formatjs format lang/en.json --out-file lang/en-formatted.json
i18next is a popular internationalization framework for JavaScript. It provides a complete solution for localizing your application, including features for translation management, language detection, and interpolation. Compared to @formatjs/cli, i18next offers a more comprehensive set of tools for managing translations and supports a wider range of use cases.
react-intl is a library for internationalizing React applications. It provides React components and an API for formatting dates, numbers, and strings, as well as handling pluralization and gender-specific messages. While @formatjs/cli focuses on command-line tools for managing translations, react-intl integrates directly with React to provide runtime localization support.
We've migrated the docs to https://formatjs.io/docs/tooling/cli.
FAQs
A CLI for formatjs.
The npm package @formatjs/cli receives a total of 180,607 weekly downloads. As such, @formatjs/cli popularity was classified as popular.
We found that @formatjs/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.