xiaohongshu
xiaohongshu
jta
Translate JSON i18n files to multiple languages with AI-powered quality optimization. Use when user mentions translating JSON, i18n files, internationalization, locale files, or needs to convert language files to other languages.
Full skill instructions
AI-powered JSON internationalization file translator with Agentic reflection mechanism.
{variables}, {{placeholders}}, HTML tags, URLs, Markdown# Check if jta exists
if ! command -v jta &> /dev/null; then
echo "jta not found, will install"
fi
# Detect OS and install jta
OS="$(uname -s)"
ARCH="$(uname -m)"
if [[ "$OS" == "Darwin"* ]]; then
# macOS - try Homebrew first
if command -v brew &> /dev/null; then
brew tap hikanner/jta
brew install jta
else
# Download binary
if [[ "$ARCH" == "arm64" ]]; then
curl -L https://github.com/hikanner/jta/releases/latest/download/jta-darwin-arm64 -o jta
else
curl -L https://github.com/hikanner/jta/releases/latest/download/jta-darwin-amd64 -o jta
fi
chmod +x jta
sudo mv jta /usr/local/bin/
fi
elif [[ "$OS" == "Linux"* ]]; then
# Linux
curl -L https://github.com/hikanner/jta/releases/latest/download/jta-linux-amd64 -o jta
chmod +x jta
sudo mv jta /usr/local/bin/
fi
# Verify installation
jta --version
Jta requires an AI provider API key. Check in this order and set the provider flag:
# Detect API key and set provider flag
if [[ -n "$ANTHROPIC_API_KEY" ]]; then
echo "✓ Anthropic API key found"
PROVIDER_FLAG="--provider anthropic"
elif [[ -n "$GEMINI_API_KEY" ]]; then
echo "✓ Gemini API key found"
PROVIDER_FLAG="--provider gemini"
elif [[ -n "$OPENAI_API_KEY" ]]; then
echo "✓ OpenAI API key found"
PROVIDER_FLAG="" # OpenAI is default, no flag needed
else
echo "✗ No API key found. Please set one of:"
echo " export OPENAI_API_KEY=sk-..."
echo " export ANTHROPIC_API_KEY=sk-ant-..."
echo " export GEMINI_API_KEY=..."
exit 1
fi
Important: Save the PROVIDER_FLAG value to use in translation commands.
# Find JSON files in common i18n/locale directories
find . -type f -name "*.json" \
\( -path "*/locales/*" -o \
-path "*/locale/*" -o \
-path "*/i18n/*" -o \
-path "*/lang/*" -o \
-path "*/translations/*" \) \
| head -20
Ask user to confirm which file to translate if multiple found.
Ask user (if not specified in their request):
Always use $PROVIDER_FLAG from Step 3 to ensure the correct AI provider is used:
# Basic translation with detected provider
jta <source-file> --to <target-langs> $PROVIDER_FLAG
# Examples:
# Single language
jta en.json --to zh $PROVIDER_FLAG
# Multiple languages
jta en.json --to zh,ja,ko $PROVIDER_FLAG
# Incremental mode (for updates)
jta en.json --to zh --incremental $PROVIDER_FLAG
# With custom output
jta en.json --to zh --output ./locales/zh.json $PROVIDER_FLAG
# Non-interactive mode (for multiple languages)
jta en.json --to zh,ja,ko,es,fr -y $PROVIDER_FLAG
# Override with specific model for quality
jta en.json --to zh --provider anthropic --model claude-sonnet-4-5
# Translate specific keys only
jta en.json --to zh --keys "settings.*,user.*" $PROVIDER_FLAG
# Exclude certain keys
jta en.json --to zh --exclude-keys "admin.*,internal.*" $PROVIDER_FLAG
After translation completes:
# Check output files exist
ls -lh <output-files>
# Validate JSON structure
for file in <output-files>; do
if jq empty "$file" 2>/dev/null; then
echo "✓ $file is valid JSON"
else
echo "✗ $file has invalid JSON"
fi
done
Show the user:
Jta automatically creates a .jta/ directory to store terminology:
.jta/
├── terminology.json # Source language terms (preserve + consistent)
├── terminology.zh.json # Chinese translations
├── terminology.ja.json # Japanese translations
└── terminology.ko.json # Korean translations
terminology.json structure:
{
"version": "1.0",
"sourceLanguage": "en",
"preserveTerms": ["API", "OAuth", "GitHub"],
"consistentTerms": ["credits", "workspace", "prompt"]
}
Users can manually edit these files for custom terminology.
Note: Always include $PROVIDER_FLAG (from Step 3) in your commands.
# User: "Translate my en.json to Chinese and Japanese"
jta locales/en.json --to zh,ja -y $PROVIDER_FLAG
# User: "I added new keys to en.json, update the translations"
jta locales/en.json --to zh,ja --incremental -y $PROVIDER_FLAG
# User: "Only translate the settings and user sections"
jta en.json --to zh --keys "settings.**,user.**" $PROVIDER_FLAG
# User: "Use the best model for highest quality"
jta en.json --to zh --provider anthropic --model claude-sonnet-4-5
# User: "Translate to Arabic and Hebrew"
jta en.json --to ar,he -y $PROVIDER_FLAG
# Jta automatically handles bidirectional text markers
jta --versionPrompt user:
Jta requires an AI provider API key. Please set one of:
For OpenAI (recommended):
export OPENAI_API_KEY=sk-...
Get key at: https://platform.openai.com/api-keys
For Anthropic:
export ANTHROPIC_API_KEY=sk-ant-...
Get key at: https://console.anthropic.com/
For Google Gemini:
export GEMINI_API_KEY=...
Get key at: https://aistudio.google.com/app/apikey
# Reduce batch size and concurrency
jta en.json --to zh --batch-size 10 --concurrency 1
# Validate source file
jq . source.json
Try a better model:
jta en.json --to zh --provider anthropic --model claude-sonnet-4-5
Check terminology files in .jta/ and edit if needed
Use verbose mode to debug:
jta en.json --to zh --verbose
--batch-size 10 --concurrency 2--incremental to save cost--provider anthropic --model claude-sonnet-4-5--provider openai --model gpt-3.5-turbo (if available)27 languages with full support:
Left-to-Right (LTR):
Right-to-Left (RTL):
View all supported languages:
jta --list-languages
Jta produces:
.jta/ directory for consistencyAlways inform the user of:
Note: Remember to include $PROVIDER_FLAG in your commands.
# Skip terminology detection (use existing)
jta en.json --to zh --skip-terminology $PROVIDER_FLAG
# Disable terminology management completely
jta en.json --to zh --no-terminology $PROVIDER_FLAG
# Re-detect terminology (when source language changes)
jta en.json --to zh --redetect-terms $PROVIDER_FLAG
# Custom terminology directory (for shared terms)
jta en.json --to zh --terminology-dir ../shared-terms/ $PROVIDER_FLAG
# Specify source language explicitly
jta myfile.json --source-lang en --to zh $PROVIDER_FLAG
# Custom batch size and concurrency
jta en.json --to zh --batch-size 20 --concurrency 3 $PROVIDER_FLAG
# Verbose output for debugging
jta en.json --to zh --verbose $PROVIDER_FLAG
See examples/ directory for detailed, step-by-step use cases.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience