Compare commits

..

4 Commits

Author SHA1 Message Date
947efe8d63 Bump version 2025-03-16 00:49:08 +01:00
64189bf8fe #815 2025-03-16 00:48:50 +01:00
400c630418 Bump version 2025-03-13 22:03:16 +01:00
402360b436 #814 https://github.com/keycloak/keycloak/issues/38029 2025-03-13 22:03:02 +01:00
5 changed files with 9 additions and 23 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "keycloakify", "name": "keycloakify",
"version": "11.8.20", "version": "11.8.22",
"description": "Framework to create custom Keycloak UIs", "description": "Framework to create custom Keycloak UIs",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -45,12 +45,12 @@ export async function getExtensionModuleFileSourceCodeReadyToBeCopied(params: {
`This file has been claimed for ownership from ${extensionModuleName} version ${extensionModuleVersion}.`, `This file has been claimed for ownership from ${extensionModuleName} version ${extensionModuleVersion}.`,
`To relinquish ownership and restore this file to its original content, run the following command:`, `To relinquish ownership and restore this file to its original content, run the following command:`,
``, ``,
`$ npx keycloakify own --path '${path}' --revert` `$ npx keycloakify own --path "${path}" --revert`
] ]
: [ : [
`WARNING: Before modifying this file, run the following command:`, `WARNING: Before modifying this file, run the following command:`,
``, ``,
`$ npx keycloakify own --path '${path}'`, `$ npx keycloakify own --path "${path}"`,
``, ``,
`This file is provided by ${extensionModuleName} version ${extensionModuleVersion}.`, `This file is provided by ${extensionModuleName} version ${extensionModuleVersion}.`,
`It was copied into your repository by the postinstall script: \`keycloakify sync-extensions\`.` `It was copied into your repository by the postinstall script: \`keycloakify sync-extensions\`.`

View File

@ -14,6 +14,8 @@ export function getAbsoluteAndInOsFormatPath(params: {
let pathOut = pathIsh; let pathOut = pathIsh;
pathOut = pathOut.replace(/^['"]/, "").replace(/['"]$/, "");
pathOut = pathOut.replace(/\//g, pathSep); pathOut = pathOut.replace(/\//g, pathSep);
if (pathOut.startsWith("~")) { if (pathOut.startsWith("~")) {

View File

@ -90,7 +90,6 @@ export default function UserProfileFormFields(props: UserProfileFormFieldsProps<
{advancedMsg(attribute.annotations.inputHelperTextAfter)} {advancedMsg(attribute.annotations.inputHelperTextAfter)}
</div> </div>
)} )}
{AfterField !== undefined && ( {AfterField !== undefined && (
<AfterField <AfterField
attribute={attribute} attribute={attribute}
@ -107,6 +106,10 @@ export default function UserProfileFormFields(props: UserProfileFormFieldsProps<
</Fragment> </Fragment>
); );
})} })}
{/* See: https://github.com/keycloak/keycloak/issues/38029 */}
{kcContext.locale !== undefined && formFieldStates.find(x => x.attribute.name === "locale") === undefined && (
<input type="hidden" name="locale" value={i18n.currentLanguage.languageTag} />
)}
</> </>
); );
} }

View File

@ -217,25 +217,6 @@ export function createGetI18n<
return enabledLanguages; return enabledLanguages;
})(); })();
// See: https://github.com/keycloak/keycloak/issues/38029
patch_keycloak_issue_38029: {
const enabledLanguage_current = enabledLanguages.find(({ languageTag }) => languageTag === currentLanguage.languageTag);
assert(enabledLanguage_current !== undefined);
if (!enabledLanguage_current.href.includes("kc_locale=")) {
// NOTE: Probably a mock
break patch_keycloak_issue_38029;
}
// NOTE: Best effort, we don't wait for it to be done
// and we don't handle errors
fetch(enabledLanguage_current.href).then(
() => {},
() => {}
);
}
const { createI18nTranslationFunctions } = createI18nTranslationFunctionsFactory<MessageKey_themeDefined>({ const { createI18nTranslationFunctions } = createI18nTranslationFunctionsFactory<MessageKey_themeDefined>({
themeName: kcContext.themeName, themeName: kcContext.themeName,
messages_themeDefined: messages_themeDefined: