diff --git a/web/lit-localize.json b/web/lit-localize.json index 75092b375..19a901a91 100644 --- a/web/lit-localize.json +++ b/web/lit-localize.json @@ -4,7 +4,7 @@ "targetLocales": [ "en", "pseudo-LOCALE", - "fr_FR", + "fr", "tr", "es", "pl", diff --git a/web/src/elements/ak-locale-context/ak-locale-context.stories.ts b/web/src/elements/ak-locale-context/ak-locale-context.stories.ts index 8eaa91769..2d144f149 100644 --- a/web/src/elements/ak-locale-context/ak-locale-context.stories.ts +++ b/web/src/elements/ak-locale-context/ak-locale-context.stories.ts @@ -29,7 +29,7 @@ export class AKLocaleSensitiveDemoComponent extends LitElement { export const InFrench = () => html`
- Everything is not ok. export const SwitchingBackAndForth = () => { let lang = "en"; window.setInterval(() => { - lang = lang === "en" ? "fr_FR" : "en"; + lang = lang === "en" ? "fr" : "en"; window.dispatchEvent(customEvent(EVENT_LOCALE_REQUEST, { locale: lang })); }, 1000); return html`
- +
`; diff --git a/web/src/elements/ak-locale-context/definitions.ts b/web/src/elements/ak-locale-context/definitions.ts index 2af591eae..63ec25025 100644 --- a/web/src/elements/ak-locale-context/definitions.ts +++ b/web/src/elements/ak-locale-context/definitions.ts @@ -24,9 +24,6 @@ export { enLocale }; // language uses both "regional" and "script" suffixes. The regexes use the language and any region // or script. // -// French is currently an oddity; the translator provided the France regional version explicitly, -// and we fall back to that regardless of region. Sorry, Québécois. -// // Chinese locales usually (but not always) use the script rather than region suffix. The default // (optional) fallback for Chinese (zh) is "Chinese (simplified)", which is why it has that odd // regex syntax at the end which means "match zh as long as it's not followed by a [:word:] token"; @@ -43,7 +40,7 @@ const LOCALE_TABLE: LocaleRow[] = [ ["en", /^en([_-]|$)/i, () => msg("English"), async () => await import("@goauthentik/locales/en")], ["es", /^es([_-]|$)/i, () => msg("Spanish"), async () => await import("@goauthentik/locales/es")], ["de", /^de([_-]|$)/i, () => msg("German"), async () => await import("@goauthentik/locales/de")], - ["fr_FR", /^fr([_-]|$)/i, () => msg("French"), async () => await import("@goauthentik/locales/fr_FR")], + ["fr", /^fr([_-]|$)/i, () => msg("French"), async () => await import("@goauthentik/locales/fr")], ["pl", /^pl([_-]|$)/i, () => msg("Polish"), async () => await import("@goauthentik/locales/pl")], ["tr", /^tr([_-]|$)/i, () => msg("Turkish"), async () => await import("@goauthentik/locales/tr")], ["zh-Hant", /^zh[_-](HK|Hant)/i, () => msg("Chinese (traditional)"), async () => await import("@goauthentik/locales/zh-Hant")], diff --git a/web/src/locale-codes.ts b/web/src/locale-codes.ts index affe2b48a..86337dc8d 100644 --- a/web/src/locale-codes.ts +++ b/web/src/locale-codes.ts @@ -14,7 +14,7 @@ export const targetLocales = [ `de`, `en`, `es`, - `fr_FR`, + `fr`, `pl`, `pseudo-LOCALE`, `tr`, @@ -31,7 +31,7 @@ export const allLocales = [ `en`, `en`, `es`, - `fr_FR`, + `fr`, `pl`, `pseudo-LOCALE`, `tr`, diff --git a/web/xliff/fr_FR.xlf b/web/xliff/fr.xlf similarity index 100% rename from web/xliff/fr_FR.xlf rename to web/xliff/fr.xlf