Compare commits
3 Commits
v11.3.31
...
interianat
Author | SHA1 | Date | |
---|---|---|---|
2707a6e69e | |||
fd3261cdf1 | |||
b4b53d2552 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloakify",
|
"name": "keycloakify",
|
||||||
"version": "11.3.31",
|
"version": "11.3.32",
|
||||||
"description": "Framework to create custom Keycloak UIs",
|
"description": "Framework to create custom Keycloak UIs",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -62,7 +62,12 @@ export async function command(params: { buildContext: BuildContext }) {
|
|||||||
2
|
2
|
||||||
)};`,
|
)};`,
|
||||||
``,
|
``,
|
||||||
`type KcContext =`,
|
`/**`,
|
||||||
|
` * NOTE: Do not import this type except maybe in your entrypoint. `,
|
||||||
|
` * If you need to import the KcContext import it either from src/login/KcContext.ts or src/account/KcContext.ts.`,
|
||||||
|
` * Depending on the theme type you are working on.`,
|
||||||
|
` */`,
|
||||||
|
`export type KcContext =`,
|
||||||
hasLoginTheme && ` | import("./login/KcContext").KcContext`,
|
hasLoginTheme && ` | import("./login/KcContext").KcContext`,
|
||||||
hasAccountTheme && ` | import("./account/KcContext").KcContext`,
|
hasAccountTheme && ` | import("./account/KcContext").KcContext`,
|
||||||
hasAdminTheme && ` | import("./admin/KcContext").KcContext`,
|
hasAdminTheme && ` | import("./admin/KcContext").KcContext`,
|
||||||
|
@ -94,7 +94,7 @@ export function createGetI18n<
|
|||||||
return cachedResult;
|
return cachedResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
const kcContextLocale = params.kcContext.realm.internationalizationEnabled ? params.kcContext.locale : undefined;
|
const kcContextLocale = kcContext.locale;
|
||||||
|
|
||||||
{
|
{
|
||||||
const currentLanguageTag = kcContextLocale?.currentLanguageTag ?? FALLBACK_LANGUAGE_TAG;
|
const currentLanguageTag = kcContextLocale?.currentLanguageTag ?? FALLBACK_LANGUAGE_TAG;
|
||||||
@ -214,6 +214,14 @@ export function createGetI18n<
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!kcContext.realm.internationalizationEnabled) {
|
||||||
|
const enabledLanguage = enabledLanguages.find(({ languageTag }) => languageTag === currentLanguage.languageTag);
|
||||||
|
|
||||||
|
assert(enabledLanguage !== undefined);
|
||||||
|
|
||||||
|
return [enabledLanguage];
|
||||||
|
}
|
||||||
|
|
||||||
return enabledLanguages;
|
return enabledLanguages;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user