translations

3
1
Source

Управление многоязычными переводами на 29 языков с приоритетом русского языка. Использовать при добавлении новых переводов, переводе на все языки, проверке консистентности или удалении устаревших ключей.

Install

mkdir -p .claude/skills/translations && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4981" && unzip -o skill.zip -d .claude/skills/translations && rm skill.zip

Installs to .claude/skills/translations

About this skill

MikoPBX Translation Managing

Translation management for the MikoPBX telephony system across 29 languages with Russian-first workflow.

What This Skill Does

  • Adds new translation keys to Russian (ru/) files
  • Translates Russian keys to all 28 other languages using AI
  • Validates translation consistency across all languages
  • Removes obsolete translation keys from all languages
  • Creates new translation module files

When to Use

  • Adding translations for new features or UI elements
  • Translating Russian keys to all supported languages
  • Checking translation consistency across languages
  • Removing deprecated or unused translation keys
  • Creating new translation modules for major features
  • Fixing translation typos or errors
  • Debugging missing translation issues

Quick Start

File Structure

src/Common/Messages/
├── ru/              ⭐ PRIMARY - Edit ONLY this
│   ├── ApiKeys.php
│   ├── Extensions.php
│   └── ... (all modules)
├── en/              🌐 Auto-translated
├── es/              🌐 Auto-translated
└── [27 more langs]  🌐 Auto-translated

Golden Rule

Developers ONLY modify Russian (ru/*.php) translations. All other languages are translated via:

Critical Process Rules

File-by-File Processing

ONE FILE AT A TIME: Never attempt to translate multiple files simultaneously. Complete one file fully (all languages) before moving to the next file.

Sequential Language Processing

PROCESS LANGUAGES SEQUENTIALLY: Complete one language fully (analysis → translation → merge → validation → reset) before starting the next language.

Validation After Each Step

ALWAYS VERIFY KEY COUNT: After processing each language, verify the key count matches Russian source EXACTLY. Stop if mismatch occurs.

Preserve Existing Work

NEVER OVERWRITE EXISTING TRANSLATIONS: Only translate missing keys. Preserve all existing correct translations.

Context Isolation

RESET CONTEXT BETWEEN LANGUAGES: Clear working variables and context after each language to prevent contamination or carry-over.

Error Handling

  • Key count mismatch: STOP, report issue, do not proceed
  • PHP syntax error: STOP, fix error before continuing
  • Placeholder mismatch: STOP, correct translation
  • Duplicate keys in source: Report and await instructions

Core Translation Rules

1. Placeholder Format

ALWAYS use %variable% format:

// ✅ CORRECT
'gs_PasswordLength' => 'Пароль: %length% из %max% символов'

// ❌ WRONG
'gs_PasswordLength' => 'Пароль: {length} из {max} символов'

2. Technical Terms (Never Translate)

Keep these unchanged across ALL languages:

SIP, IAX, AMI, AJAM, PJSIP, NAT, STUN, TURN, RTP, CDR, IVR,
DID, CID, DTMF, codec, trunk, extension, IP, DNS, VPN

Example:

// Russian
'pr_SipProviderSettings' => 'Настройки SIP провайдера'

// Thai - SIP stays the same
'pr_SipProviderSettings' => 'การตั้งค่าผู้ให้บริการ SIP'

3. Quote Escaping

Escape quotes properly for PHP:

// ✅ CORRECT
'msg_Example' => 'He said: "Don\'t forget"'

// ❌ WRONG - breaks PHP
'msg_Example' => 'He said: "Don't forget"'

4. Consistency Requirement

All languages MUST have:

  • ✅ Identical translation keys
  • ✅ Identical file structure
  • ✅ Same placeholder names
  • ✅ Same array structure

Example: If Russian has 157 keys in ApiKeys.php, ALL 28 other languages must have exactly 157 keys in ApiKeys.php.

Working with Large Files (Batch Processing)

When to Use Batch Mode

Files are automatically processed in batch mode when they have:

  • > 300 translation keys (missing in target language)
  • Average value length > 100 characters (complex technical descriptions)
  • Files like: RestApi.php (1962 keys), Common.php (700+ keys), GeneralSettings.php (500+ keys)

Batch Processing Strategy

Automatic Detection:

# Check if file needs batching
php .claude/skills/translations/helpers/translation-batch-manager.php analyze src/Common/Messages/ru/Common.php en

Key Thresholds:

  • Files < 150 keys → Direct mode (process all at once)
  • Files 150-300 keys → Optional batching (based on complexity)
  • Files > 300 keys → Batch mode required (100 keys per batch)

Batch Processing Workflow

When translating large files, follow this sequential batch workflow:

1. Analysis Phase:

# Analyze target file to determine batching strategy
php translation-batch-manager.php analyze src/Common/Messages/ru/RestApi.php en

Output tells you:

  • Total missing keys
  • Whether batching is needed
  • Number of batches required
  • Average value length

2. Split Phase:

# Create batches (saved to .claude/temp/batches/)
php translation-batch-manager.php split src/Common/Messages/ru/RestApi.php en 100

Creates JSON files:

  • .claude/temp/batches/en_RestApi/batch_1.json (keys 1-100)
  • .claude/temp/batches/en_RestApi/batch_2.json (keys 101-200)
  • ... etc

3. Translation Phase (Repeat for each batch):

For each batch file:

  1. Read batch JSON file
  2. Extract keys object (Russian key-value pairs)
  3. Translate ONLY those keys using AI
  4. Preserve technical terms (SIP, PBX, CDR, etc.)
  5. Keep %placeholder% format identical
  6. Escape quotes properly

4. Merge Phase (After each batch translation):

# Merge translated batch into target file
php translation-batch-manager.php merge src/Common/Messages/en/RestApi.php batch_1_translated.json

This command:

  • Merges new translations with existing ones
  • Maintains key order from Russian source
  • Creates backup (.backup file)
  • Validates PHP syntax

5. Validation Phase (After each merge):

# Validate merged result
php translation-batch-manager.php validate src/Common/Messages/en/RestApi.php src/Common/Messages/ru/RestApi.php

Checks:

  • PHP syntax is valid
  • Key count matches Russian source
  • No missing keys
  • No extra keys
  • Placeholders match exactly

6. Context Reset: After completing each batch:

  • Clear working variables
  • Log progress
  • DO NOT carry over data to next batch

Batch Translation Example

Input batch JSON:

{
  "batch_num": 1,
  "total_batches": 20,
  "keys": {
    "rest_ApiKeys_ApiDescription": "Comprehensive API key management...",
    "rest_Extensions_CreateEndpoint": "Create a new PBX extension...",
    ...
  }
}

Translate keys → Save as batch_1_translated.json:

{
  "batch_num": 1,
  "total_batches": 20,
  "keys": {
    "rest_ApiKeys_ApiDescription": "Comprehensive API key management...",
    "rest_Extensions_CreateEndpoint": "Create a new PBX extension...",
    ...
  }
}

Merge into target file:

php translation-batch-manager.php merge src/Common/Messages/en/RestApi.php batch_1_translated.json

Progress Tracking with TodoWrite

When processing large files, create detailed task lists:

[1/28] English (en) - RestApi.php
  [1/20] ✓ Batch 1 (keys 1-100) - Translated & merged
  [2/20] ⏳ Batch 2 (keys 101-200) - In progress
  [3/20] ⏸ Batch 3 (keys 201-300) - Pending
  ...
  [20/20] ⏸ Batch 20 (keys 1901-1962) - Pending

[2/28] German (de) - RestApi.php
  [1/20] ⏸ Batch 1 (keys 1-100) - Pending
  ...

Critical Batch Mode Rules

  1. One Batch at a Time: Complete translation → merge → validate before next batch
  2. Incremental Progress: Each batch is independently saved and validated
  3. Context Isolation: Reset AI context between batches to prevent contamination
  4. Validation After Each Batch: Never skip validation between batches
  5. Resume Capability: If error occurs, can resume from last successful batch

Error Handling in Batch Mode

PHP Syntax Error in Merged File:

  • STOP immediately
  • Restore from .backup file
  • Fix translation in batch JSON
  • Re-run merge command

Key Count Mismatch After Merge:

  • STOP immediately
  • Check batch JSON for duplicate keys
  • Validate batch JSON format
  • Re-run merge with corrected batch

Placeholder Format Error:

  • Fix translation in batch JSON
  • Re-run merge command
  • Validate placeholders match

Helper Script Reference

Commands:

# Analyze file
php translation-batch-manager.php analyze <ru_file> <target_lang>

# Split into batches
php translation-batch-manager.php split <ru_file> <target_lang> [batch_size]

# Merge batch
php translation-batch-manager.php merge <target_file> <batch_json>

# Validate result
php translation-batch-manager.php validate <target_file> <ru_file>

# Check status
php translation-batch-manager.php status <ru_file> <target_lang>

All commands output JSON for easy parsing by agents.

Temporary Files Location

Batch files are stored in .claude/temp/batches/ (gitignored):

.claude/temp/batches/
├── en_RestApi/
│   ├── batch_1.json
│   ├── batch_2.json
│   └── ...
├── de_Common/
│   ├── batch_1.json
│   └── ...

Common Tasks

Task 1: Add New Translations (Russian Only)

Quick workflow:

  1. Determine module and prefix (see prefixes.md)
  2. Read existing Russian file
  3. Add new keys with proper prefix
  4. Maintain alphabetical order
  5. Use Edit tool to save changes

Example:

// ru/ApiKeys.php
return [
    // ... existing keys

    // API Key Permissions (new feature)
    'ak_PermissionsTitle' => 'Разрешения API ключа',
    'ak_PermissionRead' => 'Чтение',
    'ak_PermissionWrite' => 'Запись',
];

After adding:

  • Report what was added
  • Remind about cache clearing
  • Ready for translation to other languages

Task 2: Translate to All Languages (Incremental Process)

IMPORTANT: This workflow supports incremental translation - it translates ONLY missing keys and preserves existing translations.

Quick workflow:

  1. Initial Setup:
    • Read Russian source file (e.g., ru/ApiKeys.php)
    • Count total keys in source
    • Check for duplicate keys in source
    • Scan `/src/Com

Content truncated.

sqlite-inspector

mikopbx

Проверка консистентности данных в SQLite баз данных MikoPBX после операций REST API. Использовать при валидации результатов API, отладке проблем с данными, проверке связей внешних ключей или инспектировании CDR записей для тестирования.

664

openapi-analyzer

mikopbx

Извлечение и анализ OpenAPI 3.1.0 спецификации из MikoPBX для валидации эндпоинтов. Использовать при проверке соответствия API, генерации тестов, проверке схем эндпоинтов или интеграции с навыками endpoint-validator и api-test-generator.

42

api-test-generator

mikopbx

Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.

41

babel-compiler

mikopbx

Транспиляция ES6+ JavaScript в ES5 для совместимости с браузерами используя Docker-based Babel компилятор. Использовать при транспиляции JavaScript файлов после внесения изменений в ES6+ исходный код.

31

asterisk-validator

mikopbx

Валидация конфигурационных файлов Asterisk и анализ логов на корректность и best practices. Использовать при отладке проблем запуска Asterisk, проверке изменений конфигурации или проверке ошибок после регенерации воркерами.

31

endpoint-validator

mikopbx

Валидация REST API эндпоинтов на соответствие OpenAPI схеме и консистентность параметров. Использовать при реализации эндпоинтов, ревью кода или перед слиянием изменений API.

41

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

1,5741,370

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

1,1161,191

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,4181,109

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,199751

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

1,157685

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,322617

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.