(
i18nGetter: (() => string) | undefined,
legacyValue: string | undefined,
defaultValue: string,
)
| 79 | ): TextResolver { |
| 80 | // Helper function to resolve text with priority: i18n > legacy > default |
| 81 | const resolve = ( |
| 82 | i18nGetter: (() => string) | undefined, |
| 83 | legacyValue: string | undefined, |
| 84 | defaultValue: string, |
| 85 | ): string => { |
| 86 | if (i18nGetter) { |
| 87 | const i18nValue = i18nGetter(); |
| 88 | if (i18nValue !== undefined) return i18nValue; |
| 89 | } |
| 90 | return legacyValue !== undefined ? legacyValue : defaultValue; |
| 91 | }; |
| 92 | |
| 93 | return { |
| 94 | // Navigation texts |
no outgoing calls
no test coverage detected