Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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
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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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.