1j01/tracky-mouse/refactor-translations

Claude Code and agent skill by 1j01/tracky-mouse

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use this when existing translatable strings have been modified structurally (e.g. "%0" -> "{{PLACEHOLDER}}", "foo\n" -> "foo", or renaming, splitting, or joining keys)

Install

npx vskill@latest install 1j01/tracky-mouse/refactor-translations

SKILL.md

  1. Run npx i18next-cli extract
  2. Run git diff core/locales/en/translation.json and review the new translations and the relations to the old strings and keys. If there are new or modified strings that require translation work, proceed but skip these until the end. (We still don't want to reword things unnecessarily, so don't use the "translate-new-strings" skill for this.)
  3. Run git restore core/locales/*/translation.json so that the original strings are back in place for programmatic manipulation.
  4. Create a transformation function and test it in isolation first (using Node.js with a heredoc).
  5. Run a Node.js command to patch all the locale files (using Node.js with a heredoc).
  6. Run npx i18next-cli extract again to reorder the keys.
  7. Run npx i18next-cli status to verify.
  • If needed, run npx i18next-cli status <lang> to get a more detailed report for a specific language.
  1. Suggest edits to this skill, since there are several types of refactoring meant to be covered, which would benefit from examples.

Here is an example of a Node.js script to patch the new strings into the other language files:

js
const fs = require('fs');
const path = require('path');
const localesDir = path.join(__dirname, 'core', 'locales');
const valueTransform = (str) => {
return str.replace(/%0/g, '{{PLACEHOLDER}}');
};
const languages = fs.readdirSync(localesDir);
for (const lang of languages) {
const filePath = path.join(localesDir, lang, 'translation.json');
const fileContent = JSON.parse(fs.readFileSync(filePath, 'utf8'));
Object.keys(fileContent).forEach(key => {
fileContent[key] = valueTransform(fileContent[key]);
});
fs.writeFileSync(filePath, JSON.stringify(fileContent, null, 2));
}

Note: These commands can be run in the root of the project.

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
72
Repository forks
14
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/1j01/tracky-mouse/refactor-translations/badge)](https://verified-skill.com/skills/1j01/tracky-mouse/refactor-translations)

Something wrong with this skill or its page? Tell us.