Resolves a localize key against localizedStrings, falling back when the key has not actually
resolved to translated text. useLocalizedStrings seeds every requested key to itself and
returns that seed both before the subscription delivers and permanently on a PlatformError, so
localizedStrings[key] ?? fallback can never catch that case — the value is a truthy string
equal to the key, not undefined. Centralized so every visible (non-aria-label) localized string
in this component tree resolves the same way.
Parameters
key: `%${string}%`
The localize key to look up.
localizedStrings: LanguageStrings
The localized strings to resolve key against.
fallback: string
English text to show while key has not resolved to anything else.
Returns string
The resolved string, or fallback when key is missing or still unresolved.
Resolves a localize key against
localizedStrings, falling back when the key has not actually resolved to translated text.useLocalizedStringsseeds every requested key to itself and returns that seed both before the subscription delivers and permanently on aPlatformError, solocalizedStrings[key] ?? fallbackcan never catch that case — the value is a truthy string equal to the key, notundefined. Centralized so every visible (non-aria-label) localized string in this component tree resolves the same way.