Claude-skill-registry Locale Extractor
Tools to extract hardcoded text from Liquid files and replace them with translation keys.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/locale-extractor" ~/.claude/skills/majiayu000-claude-skill-registry-locale-extractor && rm -rf "$T"
manifest:
skills/data/locale-extractor/SKILL.mdsource content
Capabilities
Helps developers internationalize their themes by finding hardcoded strings and moving them to a locale JSON structure.
Tools Usage Guide
1. extract_locales
extract_localesScans Liquid content for hardcoded text inside HTML tags and proposes replacements.
- Param
: The raw liquid code.liquid_content - Param
: The name of the section (used for key namespacing).section_name - Returns:
: The code withmodified_liquid
replacements.{{ 'key' | t }}
: A JSON object with the extracted keys and values.new_locales
Example
Input:
<h1>Hello World</h1> <p>Welcome to our store</p>
Output:
{ "modified_liquid": "<h1>{{ 'sections.header.hello_world' | t }}</h1>\n<p>{{ 'sections.header.welcome' | t }}</p>", "new_locales": { "sections": { "header": { "hello_world": "Hello World", "welcome": "Welcome to our store" } } } }