
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.
react-translation-wizard
Advanced tools
A powerful translation automation tool that scans project files and extracts strings for i18n usage in React and Next.js.
A powerful Node.js script for automating the internationalization (i18n) process in React and Next applications. This tool scans your React components, extracts text content, generates translation keys, and replaces the text with translation function calls.
Create a translation.config.json file in the project root (use example.translation.config.json as a template):
{
"srcDir": "app",
"languages": [
{
"name": "en",
"file": "messages/en.json"
},
{
"name": "fr",
"file": "messages/fr.json"
}
],
"import": {
"functionName": "useTranslations",
"packagePath": "next-intl",
"statement": ""
},
"hook": {
"variableName": "t",
"functionName": "useTranslations",
"statement": "const t = useTranslations();"
},
"textReplacement": {
"format": "{t(\"$KEY\")}"
}
}
srcDir: Path to your React components directorylanguages: Array of language configurations
name: Language code (e.g., "en", "fr")file: Path to the JSON translation fileimport.functionName: Name of the translation function to importimport.packagePath: Package or path to import fromimport.statement: (Optional) Custom import statementhook.variableName: Variable name for translations (usually "t")hook.functionName: Function name to call (should match the imported function)hook.statement: (Optional) Custom hook statementtextReplacement.format: Format for replacing text nodes (use $KEY as placeholder)Run the script:
npx react-translation-wizard
Before:
function MyComponent() {
return (
<div>
<h1>Welcome to our site</h1>
<p>Please sign in to continue</p>
</div>
);
}
After:
import { useTranslation } from "@/utils/translate";
function MyComponent() {
const { t } = useTranslation();
return (
<div>
<h1>{t("components.my_component.welcome_to_our_site")}</h1>
<p>{t("components.my_component.please_sign_in_to_continue")}</p>
</div>
);
}
⚡⚡ Kashyap Trivedi ⚡⚡
FAQs
A powerful translation automation tool that scans project files and extracts strings for i18n usage in React and Next.js.
The npm package react-translation-wizard receives a total of 4 weekly downloads. As such, react-translation-wizard popularity was classified as not popular.
We found that react-translation-wizard 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.