web: locales: rename fr_FR to fr to match transifex
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
parent
29de5d34d6
commit
9c3ff1d71b
|
@ -4,7 +4,7 @@
|
||||||
"targetLocales": [
|
"targetLocales": [
|
||||||
"en",
|
"en",
|
||||||
"pseudo-LOCALE",
|
"pseudo-LOCALE",
|
||||||
"fr_FR",
|
"fr",
|
||||||
"tr",
|
"tr",
|
||||||
"es",
|
"es",
|
||||||
"pl",
|
"pl",
|
||||||
|
|
|
@ -29,7 +29,7 @@ export class AKLocaleSensitiveDemoComponent extends LitElement {
|
||||||
|
|
||||||
export const InFrench = () =>
|
export const InFrench = () =>
|
||||||
html`<div style="background: #fff; padding: 4em">
|
html`<div style="background: #fff; padding: 4em">
|
||||||
<ak-locale-context locale="fr_FR"
|
<ak-locale-context locale="fr"
|
||||||
><ak-locale-demo-component
|
><ak-locale-demo-component
|
||||||
>Everything is not ok.</ak-locale-demo-component
|
>Everything is not ok.</ak-locale-demo-component
|
||||||
></ak-locale-context
|
></ak-locale-context
|
||||||
|
@ -39,12 +39,12 @@ export const InFrench = () =>
|
||||||
export const SwitchingBackAndForth = () => {
|
export const SwitchingBackAndForth = () => {
|
||||||
let lang = "en";
|
let lang = "en";
|
||||||
window.setInterval(() => {
|
window.setInterval(() => {
|
||||||
lang = lang === "en" ? "fr_FR" : "en";
|
lang = lang === "en" ? "fr" : "en";
|
||||||
window.dispatchEvent(customEvent(EVENT_LOCALE_REQUEST, { locale: lang }));
|
window.dispatchEvent(customEvent(EVENT_LOCALE_REQUEST, { locale: lang }));
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
return html`<div style="background: #fff; padding: 4em">
|
return html`<div style="background: #fff; padding: 4em">
|
||||||
<ak-locale-context locale="fr_FR">
|
<ak-locale-context locale="fr">
|
||||||
<ak-locale-sensitive-demo-component></ak-locale-sensitive-demo-component
|
<ak-locale-sensitive-demo-component></ak-locale-sensitive-demo-component
|
||||||
></ak-locale-context>
|
></ak-locale-context>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
|
@ -24,9 +24,6 @@ export { enLocale };
|
||||||
// language uses both "regional" and "script" suffixes. The regexes use the language and any region
|
// language uses both "regional" and "script" suffixes. The regexes use the language and any region
|
||||||
// or script.
|
// 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
|
// 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
|
// (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";
|
// 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")],
|
["en", /^en([_-]|$)/i, () => msg("English"), async () => await import("@goauthentik/locales/en")],
|
||||||
["es", /^es([_-]|$)/i, () => msg("Spanish"), async () => await import("@goauthentik/locales/es")],
|
["es", /^es([_-]|$)/i, () => msg("Spanish"), async () => await import("@goauthentik/locales/es")],
|
||||||
["de", /^de([_-]|$)/i, () => msg("German"), async () => await import("@goauthentik/locales/de")],
|
["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")],
|
["pl", /^pl([_-]|$)/i, () => msg("Polish"), async () => await import("@goauthentik/locales/pl")],
|
||||||
["tr", /^tr([_-]|$)/i, () => msg("Turkish"), async () => await import("@goauthentik/locales/tr")],
|
["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")],
|
["zh-Hant", /^zh[_-](HK|Hant)/i, () => msg("Chinese (traditional)"), async () => await import("@goauthentik/locales/zh-Hant")],
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const targetLocales = [
|
||||||
`de`,
|
`de`,
|
||||||
`en`,
|
`en`,
|
||||||
`es`,
|
`es`,
|
||||||
`fr_FR`,
|
`fr`,
|
||||||
`pl`,
|
`pl`,
|
||||||
`pseudo-LOCALE`,
|
`pseudo-LOCALE`,
|
||||||
`tr`,
|
`tr`,
|
||||||
|
@ -31,7 +31,7 @@ export const allLocales = [
|
||||||
`en`,
|
`en`,
|
||||||
`en`,
|
`en`,
|
||||||
`es`,
|
`es`,
|
||||||
`fr_FR`,
|
`fr`,
|
||||||
`pl`,
|
`pl`,
|
||||||
`pseudo-LOCALE`,
|
`pseudo-LOCALE`,
|
||||||
`tr`,
|
`tr`,
|
||||||
|
|
Reference in a new issue