Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
babel-plugin-react-intl-to-properties
Advanced tools
Extracts string messages for translation from modules that use React Intl into a .properties file.
Extracts string messages for translation from modules that use React Intl into a .properties
file.
$ npm install babel-plugin-react-intl-to-properties
<FormattedMessage
defaultMessage='React Intl to Properties'
description='Title for React Intl to Properties'
id='example.rectintltoprops'
/>
.properties
# Title for React Intl to Properties
example.rectintltoprops=React Intl to Properties
The default message descriptors for the app's default language will be extracted from: defineMessages()
, <FormattedMessage>
, and <FormattedHTMLMeessage>
; all of which are named exports of the React Intl package.
.babelrc
{
"plugins": [
["react-intl-to-properties", {
"enforceDescriptions": true,
"fileName": "en-US",
"messagesDir": "./build/messages/"
}]
]
}
enforceDescriptions
: Whether or not message declarations must contain a description
to provide context to translators. Defaults to: false
.
fileName
: Name of the generated .properties
file.
messagesDir
: The target location where the plugin will output a .properties
file corresponding to each component from which React Intl messages were extracted. If not provided, the extracted message descriptors will only be accessible via Babel's API.
moduleSourceName
: The ES6 module source name of the React Intl package. Defaults to: "react-intl"
, but can be changed to another name/path to React Intl.
namespace
: Only extract messages with a particular namespaced id
in the form <namespace>.id
. Useful when including external components with their own messages
.
$ babel --plugins react-intl-to-properties script.js
Forked from yahoo/babel-plugin-react-intl
FAQs
Extracts string messages for translation from modules that use React Intl into a .properties file.
The npm package babel-plugin-react-intl-to-properties receives a total of 11 weekly downloads. As such, babel-plugin-react-intl-to-properties popularity was classified as not popular.
We found that babel-plugin-react-intl-to-properties demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.