| name | translation-debugger |
|---|---|
| description | Diagnose and fix translation configuration issues when users report problems like "translation not working", "translation error", "why isn't translation working?", "translation is broken", "translation issue", "wrong translation", "translation failed", "can't translate", or any variation of "translation" + problem/issue/wrong/broken/not working/error. Use this skill to systematically identify configuration problems. |
When triggered, announce: "I'll use the translation-debugger skill to diagnose your translation issues."
DO NOT ask open-ended questions. Run diagnostics immediately.
If the entity is not obvious, ask: "Which entity is having translation problems?"
Read the entity file mentioned by the user. If not specified, ask for the entity name only.
Execute all checks from references/diagnostics.md in order:
- Entity Configuration Layer - BLOCKING issues first
- Attribute Configuration Layer - ERROR/WARNING issues
- Handler Chain Mapping Layer - Handler compatibility
- Runtime Configuration Layer - Environment setup
- Compile-Time Validation Layer - v2.0 attribute conflicts and unique constraints
Group findings by severity in dependency order:
DIAGNOSTIC RESULTS
==================
[X] Entity implements TranslatableInterface
[X] Entity uses TranslatableTrait
[X] $tuuid property initialized
BLOCKING ISSUES (must fix first)
--------------------------------
None found
ERRORS (will cause failures)
----------------------------
1. SharedAmongstTranslations on bidirectional relation 'category'
-> RuntimeException when translating
-> Affects: Translation will fail completely
[blocks #2, #3 below]
Want me to fix this?
WARNINGS (may cause unexpected behavior)
----------------------------------------
2. EmptyOnTranslate on non-nullable field 'slug'
-> LogicException: cannot use EmptyOnTranslate because it is not nullable
Want me to fix this?
PASSED CHECKS
-------------
[X] Locale 'fr' in framework.enabled_locales
[X] Doctrine filter configured
[X] No compile-time attribute conflicts
[X] No single-column unique constraints
After presenting each issue:
- Ask: "Want me to fix this?"
- Wait for confirmation before applying fix
- Show diff-style preview before applying
- Reference llms.md -> Troubleshooting for detailed fix procedures
Issues are presented in dependency order - fixing earlier issues may resolve later ones:
- BLOCKING - Entity won't be recognized as translatable
- ERROR - Translation will fail with exceptions
- WARNING - Unexpected behavior, silent failures
- INFO - Best practices, optimization suggestions
Run checks: TranslatableInterface, TranslatableTrait, persist/flush sequence
Run checks: Doctrine filter enabled, locale configuration, query filtering
Run checks: SharedAmongstTranslations on bidirectional relations
Run checks: Handler chain mapping, attribute conflicts (Shared vs Empty)
Run checks: AttributeValidationPass errors, class/property attribute conflicts, locale field
Run checks: Single-column unique: true fields, composite unique constraints
Run checks: v1.x config keys (tmi_translation.locales, tmi_translation.logging), migration guidance
For users who know what to check:
- "Check entity config" - Run Entity Configuration Layer only
- "Check attributes" - Run Attribute Configuration Layer only
- "Check handlers" - Run Handler Chain Mapping Layer only
- "Check runtime" - Run Runtime Configuration Layer only
- "Check validation" - Run Compile-Time Validation Layer only
- "Full diagnostic" - Run all layers (default)
- references/diagnostics.md - Detailed check procedures for each layer
- llms.md -> Troubleshooting - Fix procedures for each issue type
- llms.md -> Handler Chain Decision Tree - Handler priority and routing
- UPGRADING.md - Migration guide for v1.x to v2.0 breaking changes