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.
Frontend related i18n utilities used by other Box frontend projects. Unless you are a part of another Box project, you should not be consuming any code from here. It is completely unsupported and can be highly unstable.
This project is published on public npmjs.
To push a new release, use yarn release:major
or yarn release:minor
or yarn release:patch
.
Returns an array of locales supported by Box.
const locales = require('@box/i18n/locales.js');
locales.forEach(...);
Uses the below buildTranslations script as part of the webpack build process. Use this plugin within your project's webpack config.
1st argument should be the folder containing properties files. 2nd argument should be the folder containing the json output from react-intl's babel plugin.
const TranslationsPlugin = require('@box/i18n/TranslationsPlugin.js');
const i18n = path.resolve('i18n'); // Where the .properties files are dumped
const jsonDir = path.join(i18n, 'json'); // Where the react-intl plugin dumps json
...
plugins: [
...,
new TranslationsPlugin(i18n, jsonDir)
...
]
...
Uses the below buildTranslations script as a standalone node script. Use this standalone script to build translations on demand.
1st argument should be the folder containing properties files. 2nd argument should be the folder containing the json output from react-intl's babel plugin.
package.json
...
scripts: {
...,
"build:i18n": "node ./node_modules/@box/i18n/props2es.js ./i18n ./i18n/json"
...
}
...
You should ideally not be using this script directly. It is used by the webpack TranslationsPlugin and props2es.js script file as mentioned above.
FAQs
i18n utilities for box frontend projects
The npm package @box/i18n receives a total of 2 weekly downloads. As such, @box/i18n popularity was classified as not popular.
We found that @box/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 28 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.