From vechain-ai
Manages react-i18next translation files across 15 languages: adds/removes keys, sorts alphabetically by key, enforces fixed-word rules, verifies sync with en.json.
npx claudepluginhub vechain/vechain-ai-skills --plugin secure-github-actionsThis skill uses the workspace's default tool permissions.
Manages translation files in `apps/frontend/src/i18n/languages/`.
Suggests manual /compact at logical task boundaries in long Claude Code sessions and multi-phase tasks to avoid arbitrary auto-compaction losses.
Share bugs, ideas, or general feedback.
Manages translation files in apps/frontend/src/i18n/languages/.
{{variableName}}react-i18next configured in apps/frontend/src/i18n/index.tsxapps/frontend/src/i18n/index.tsx (languages array)en.json with the English valueen.jsonFor each .json file in apps/frontend/src/i18n/languages/:
Use a Node.js script or jq to sort. Example with Node.js:
node -e "
const fs = require('fs');
const glob = require('glob');
const files = glob.sync('apps/frontend/src/i18n/languages/*.json');
files.forEach(f => {
const obj = JSON.parse(fs.readFileSync(f, 'utf8'));
const sorted = Object.keys(obj)
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' }))
.reduce((acc, key) => { acc[key] = obj[key]; return acc; }, {});
fs.writeFileSync(f, JSON.stringify(sorted, null, 2) + '\n');
});
"
After any translation change, verify:
en.json has all keys that exist in code (search for t("...") usage)en.jsonen.json) should be removedSee apps/frontend/src/i18n/fixedWords.json. Grouped by language code ("all" applies to every language).
Two use cases:
"round": "round" keeps "round" in English for Italian)"endorsement": "supporto" means always use "supporto" for endorsement in Italian)When translating, ALWAYS check this file first. If a word has a fixed translation for the target language, use it consistently in every sentence.
If the app uses @vechain/vechain-kit, keep Kit UI language in sync with the host app:
VeChainKitProvider, subscribe to i18n.on("languageChanged", ...) and call setLanguage(lng) from useCurrentLanguage() so when the user changes language in the app (e.g. footer selector), Kit updates.language={i18n.language} and onLanguageChange={(lng) => i18n.changeLanguage(lng)} into VeChainKitProvider so when the user changes language in Kit (e.g. wallet modal), the app updates.See the vechain-kit skill reference translations-vechain-kit.md for the full implementation pattern.
en.json never used in code (t("..."), i18nKey="...") and exit non-zero so pre-commit fails. Run when en.json or code is staged.en.json and fails if any locale has missing or extra keys. Run when any translation file is staged or in CI.eslint-plugin-i18next (or similar) to flag missing keys in the editor/lint.See the vechain-kit skill reference translations-vechain-kit.md for a short summary table.