
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
i18nize-react
Advanced tools
Internationalize legacy react apps in a lunch break.
i18nize-react finds and replaces all the hardcoded string literals in your react project with i18n bindings. It uses babel to walk on react components and process them.

i18nize-react globally using npmnpm i -g i18nize-react
npm install i18next
Tested on i18next other variants should work with minor changes.
Make sure there are no unstaged changes, you may need to git reset --hard.
i18nize-react
Go for lunch
Run your favourite linter to clean things up.
It should create four files src/i18n/init.js, src/i18n/keys.js, src/i18n/english.js, src/i18n/chinese.js. Add the line import ./i18n/init.js; in your App's entry point. Usually it is src/index.js.
Change the lng key in your browser's local storage to see changes.
Create an issue ticket with a before and after code snippets, before writing any code and raising a PR.
For bugs create a minimum reproducible piece of code with original, received and expected snippets.
Make sure to read wont-fix.md.
Sometimes i18ize-react might conflict with the babel plugins installed in your project. If that happens go up one folder (cd ..) and then run i18ize-react ./your-dir ./your-dir
By default i18ize-react assumes that your code is in <your workspace dir>/src but if you want to change that you can use the third argument. e.g. i18ize-react ./ ./ web will crawl <your workspace dir>/web instead.
Constant initialization outside react lifecycle is not guaranteed. To resolve this, move all initialized strings inside the component.
// String 1 might not load correctly
const string1 = i18next.t(k.STRING1);
const MyComponent = () => {
// String 2 will load correctly
const string2 = i18next.t(k.STRING2);
return (
<div>
{string1}
{string2}
</div>
)
}
i18nize-react ./ ./ src true, run your linter and commit the code. Now run i18nize-react to run the transform and lint again. Now only the transformed changes should show up in git diff.FAQs
A babel plugin cli to automatically internationalize any react app
We found that i18nize-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.