skills/ue-localization-scanner/SKILL.md
Scan codebase for hardcoded strings, validate FText usage, check string tables, and identify localization issues. Use when preparing for localization, auditing i18n compliance, or finding hardcoded user-facing text. Triggers on "localization", "hardcoded strings", "FText", "string table", "i18n", "translation", "localization scan".
npx skillsauth add sipherxyz/universal-ue-skills ue-localization-scannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scan for localization issues and hardcoded user-facing strings.
| Pattern | Severity | Description | |---------|----------|-------------| | Literal in FText::FromString | Error | Hardcoded localizable text | | Missing LOCTEXT | Warning | Text should use LOCTEXT | | Print/Log with literals | Info | May need localization | | UI Text literals | Error | User-facing must be FText |
| Pattern | Severity | Description | |---------|----------|-------------| | Text literal nodes | Warning | Should use string table | | Print String | Info | Check if user-facing | | Widget text properties | Error | Must be localizable |
| Check | Severity | Description | |---------|----------|-------------| | Orphan entries | Warning | Unused string table entries | | Missing entries | Error | Referenced but not defined | | Duplicate keys | Error | Key conflicts |
## C++ Localization Scan
### Patterns Searched
```cpp
// VIOLATION: Hardcoded string in FText
FText::FromString("Attack failed") // Should be LOCTEXT
// VIOLATION: Literal in Format
FText::Format(LOCTEXT(...), "hardcoded") // Arg should be FText
// OK: Proper LOCTEXT usage
LOCTEXT("AttackFailed", "Attack failed")
// OK: String table reference
FText::FromStringTable(TEXT("ST_Combat"), TEXT("AttackFailed"))
| File | Line | Pattern | Text | |------|------|---------|------| | CombatUI.cpp | 142 | FromString | "Health: {0}" | | AbilitySystem.cpp | 89 | Literal | "Cannot activate" | | DialogueManager.cpp | 256 | Format arg | "Player" |
### Step 2: Blueprint Analysis
```markdown
## Blueprint Localization Scan
### Widget Text Properties
| Widget | Property | Value | Status |
|--------|----------|-------|--------|
| WBP_MainMenu | Button_Start | "Start Game" | Error |
| WBP_HUD | Text_Health | Bound | OK |
| WBP_Inventory | Item_Name | Literal | Error |
### Print String Nodes
| Blueprint | Node | Text | User-Facing |
|-----------|------|------|-------------|
| BP_Player | PrintString | "Debug" | No (OK) |
| BP_Tutorial | PrintString | "Press X" | Yes (Error) |
## String Table Audit
### Tables Found
| Table | Entries | Used | Unused |
|-------|---------|------|--------|
| ST_UI | 245 | 230 | 15 |
| ST_Combat | 89 | 85 | 4 |
| ST_Dialogue | 1250 | 1250 | 0 |
### Missing References
| Reference | Location | Expected Table |
|-----------|----------|----------------|
| "HUD_Stamina" | WBP_HUD | ST_UI |
| "Combat_Parry" | CombatManager.cpp | ST_Combat |
### Orphan Entries
| Table | Key | Last Modified |
|-------|-----|---------------|
| ST_UI | "OldButton_Label" | 2024-01-15 |
| ST_UI | "Deprecated_Title" | 2023-11-20 |
// WRONG
FText DisplayText = FText::FromString("Player Health");
// CORRECT - Using LOCTEXT
#define LOCTEXT_NAMESPACE "HUD"
FText DisplayText = LOCTEXT("PlayerHealth", "Player Health");
#undef LOCTEXT_NAMESPACE
// CORRECT - Using String Table
FText DisplayText = FText::FromStringTable(TEXT("ST_HUD"), TEXT("PlayerHealth"));
// WRONG - Hardcoded argument
FText::Format(LOCTEXT("Damage", "{0} dealt {1} damage"), "Player", DamageAmount);
// CORRECT - FText arguments
FText::Format(LOCTEXT("Damage", "{0} dealt {1} damage"), CharacterName, DamageAmount);
// WRONG
Text Block → Text: "Press X to interact"
// CORRECT
Text Block → Text: (Bound to String Table)
String Table: ST_Tutorial
Key: Interact_Prompt
# Hardcoded FText
FText::FromString\s*\(\s*"[^"]+"\s*\)
# Missing LOCTEXT namespace
^(?!.*LOCTEXT_NAMESPACE).*LOCTEXT\s*\(
# Literal in Format
FText::Format\s*\([^)]*,\s*"[^"]+"\s*[,)]
# UI text without FText
->SetText\s*\(\s*"[^"]+"\s*\)
# Text property with literal value
# (Requires asset parsing)
# Print String with user-facing text
# (Requires context analysis)
# Localization Scan Report
## Executive Summary
- **Files Scanned**: {N}
- **Violations**: {N}
- **Critical (User-Facing)**: {N}
- **Estimated Fix Time**: {N} hours
## Violations by Category
### Critical - User-Facing Text
| Location | Line | Text | Suggested Key |
|----------|------|------|---------------|
| {File} | {N} | "{Text}" | {Key} |
### Warning - Potentially User-Facing
| Location | Line | Text | Context |
|----------|------|------|---------|
| {File} | {N} | "{Text}" | {Context} |
### Info - Review Needed
| Location | Line | Text |
|----------|------|------|
| {File} | {N} | "{Text}" |
## String Table Health
| Table | Status | Issues |
|-------|--------|--------|
| ST_UI | Warning | 15 orphan entries |
| ST_Combat | OK | None |
| ST_Dialogue | OK | None |
## Recommendations
1. **Immediate**: Fix {N} critical user-facing strings
2. **Short-term**: Clean up {N} orphan entries
3. **Long-term**: Establish localization review process
## Localization Checklist
- [ ] All user-facing text uses FText
- [ ] String tables are organized by domain
- [ ] No orphan entries in string tables
- [ ] Format strings use FText arguments
- [ ] BP widgets use bound text or string tables
StringTables/
├── ST_UI.csv # All UI text
├── ST_Combat.csv # Combat messages
├── ST_Dialogue.csv # NPC dialogue
├── ST_Tutorial.csv # Tutorial prompts
├── ST_Items.csv # Item names/descriptions
└── ST_Achievements.csv # Achievement text
// File: CombatUI.cpp
#define LOCTEXT_NAMESPACE "CombatUI"
// All LOCTEXT in this file uses "CombatUI" namespace
FText DamageText = LOCTEXT("DamageDealt", "Damage Dealt");
#undef LOCTEXT_NAMESPACE
development
This skill should be used when implementing features in isolation using git worktrees. Triggers on "create worktree", "isolated workspace", "parallel development", or when starting implementation that should not affect main workspace.
testing
Manage VFX team issues on GitHub Projects - timeline scheduling, status updates, member commit checks, bulk assign. Use when managing VFX team project board, adding issues to timeline, checking member progress, or bulk-updating issue fields.
tools
Generate C++ validation rules from JSON definitions. Use when team updates ValidationRules.json or asks to add/modify validation rules.
development
Check codebase for Microsoft Xbox XR (Xbox Requirements) compliance issues. Scans for account picker, cloud saves, achievements, Quick Resume, and Xbox certification requirements. Use before console submission or when preparing for Microsoft certification. Triggers on "XR", "Xbox certification", "Microsoft compliance", "Xbox cert", "Xbox requirements", "GDK compliance".