Address review feedback on portal i18n

Swallow locale mutation rejections after the toast, close the
mobile drawer on locale change, escape SEO paths, share the
IAM locale list with SEO, and finish dropping /trust leftovers.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-21 18:30:45 +02:00
parent e4260d50d3
commit 418bb5a8f8
12 changed files with 88 additions and 39 deletions

View File

@@ -68,9 +68,9 @@ type (
}
)
// Short URL locale tags accepted for Identity.locale (must stay in sync with
// the compliance-portal URL_LOCALES list).
var supportedIdentityLocales = []string{
// SupportedIdentityLocales are short URL locale tags accepted for
// Identity.locale. Keep in sync with the compliance-portal URL_LOCALES list.
var SupportedIdentityLocales = []string{
"en", "fr", "de", "es", "id", "it", "ja", "ko", "pl", "pt", "tr", "uk", "zh",
}
@@ -106,7 +106,7 @@ func (req UpdateLocaleRequest) Validate() error {
"locale",
validator.NotEmpty(),
validator.MaxLen(8),
validator.OneOfSlice(supportedIdentityLocales),
validator.OneOfSlice(SupportedIdentityLocales),
)
return v.Error()