Closed tackley closed 6 months ago
[puLL-Merge] - brave/ads-ui@1143
This pull request contains several changes that migrate the localization configuration from JavaScript to TypeScript and introduce functionality for language detection and pseudolocalization for testing internationalization. It also updates dependencies related to the internationalization process and modifies the way language activation is managed within the application.
Pseudolocalization visibility (src/locales/test.po
):
Dependency updates (package.json
):
@lingui/detect-locale
, etc.) should be carefully evaluated.Language detection and fallback (src/i18n.ts
):
//fromNavigator()
), requires a careful review to ensure that there are no edge cases or security implications, such as script injections via URL parameters.Public exposure of pseudolocalization configuration (lingui.config.ts
):
Until we've had a better chance to review the experience in other languages, don't default to it. Supply e.g.
lang=es
as a query string to switch language.And also support the pseudolang with
lang=test
.