This document defines string length validation for TODOS.phase-72.72.11.1.10.
The validator checks translated text against the UI space budget from
maxCharacterLength and applies per-language character limits for each text
role.
Limits#
V2/ue/Content/Localization/V2/Length/StringLengthLimits_V2.json stores the
validated locale list, warningThresholdPercent, variable-token samples, and
per-language character limits. Each locale rule provides an expansion ratio and
role-specific caps for buttons, titles, subtitles, body copy, error titles,
names, and screen-reader labels.
Report#
V2/ue/Tools/validate-v2-string-lengths.py reads the configured .v2loc.json
files and writes
V2/ue/Content/Localization/V2/Length/StringLengthValidationReport_V2.json.
Each report row includes:
- locale, source file, string ID, and text role
- raw, runtime-estimated, and effective character counts
- UI space budget from
maxCharacterLength - per-language character limit
- near-budget, UI-budget, and locale-cap warnings or errors
Translations that exceed the UI space budget are reported as warnings so localization QA can review layout risk. Translations that exceed the per-language character limit are reported as errors.
Run the validator after translation files or limits change:
python3 V2/ue/Tools/validate-v2-string-lengths.py
Verification#
Run this gate after changing length limits, translation files, generated reports, docs, or CI wiring:
python3 V2/ue/Tools/check-v2-string-length-validation.py
Required release gates:
localization-string-length-validation-contractlocalization-string-length-validation-limitslocalization-string-length-validation-reportlocalization-string-length-validation-ui-budget-warninglocalization-string-length-validation-locale-caplocalization-string-length-validation-ci-wired