core/utils/pseudo_locale
library
Classes
-
PseudoLocaleTranslations
-
A GetX
Translations that wraps baseKeys (typically a real locale's
map, e.g. AppTranslations().keys['en']!) with pseudoLocalize on
every value — every key baseKeys has is covered by construction (the
keys getter maps every entry, never a subset).
Functions
-
pseudoLocalize(String value)
→ String
-
Deterministically transforms
value into a "pseudo-localized" string:
every vowel becomes its accented look-alike (see _accentMap's doc),
the string is padded to roughly 40% longer (the commonly-cited
average real-world translation expansion factor — stress-tests
overflow before a real translator ever touches the key), and the
whole thing is wrapped in [[...]] so a truncated render (a missing
closing ]]) is visually obvious too.