# I18N Placeholder Remediation This document records the repeatable steps used to detect and fix leftover English placeholder text and invalid-quote issues in translation map files under `lib/core/translations/language/`. ## Problem Patterns ### 1) English placeholders inside non-English locales Symptoms: - UI shows English strings in a non-English locale. - `tools/i18n_audit.py --mode englishy` reports items for a locale file. Fix: - Replace English values with accurate localized text. - Keep placeholder syntax intact (examples: `@minutes`, `{count}`, `{filePath}`, `{error}`). ### 2) Invalid “smart quotes” used as Dart string delimiters Symptoms: - `flutter analyze` reports `illegal_character`, `expected_token`, `expression_in_map`, `undefined_identifier` in a language file. Root cause: - Curly quotes like `‘ ’` are not valid Dart string delimiters, so map entries stop being parsed as strings. Fix: - Replace `‘` and `’` with ASCII `'` and ensure every entry is in the form `'key': 'value',`. ## Verification Checklist Run these commands from the repo root: ```bash python3 tools/i18n_audit.py --mode englishy flutter analyze lib/core/translations/language/.dart dart format lib/core/translations/language/.dart flutter test test/_translations_test.dart ``` Recommended additional checks: ```bash rg "[‘’]" lib/core/translations/language/.dart ``` ## Test Convention For each locale file, add a `test/_translations_test.dart` test that asserts: - The map can be imported and accessed. - Its key set matches `enUS`. - It contains no empty string values.