Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to import localizations message bundles #945

Closed
antikalk opened this issue Nov 15, 2023 · 3 comments · Fixed by #950
Closed

Add a way to import localizations message bundles #945

antikalk opened this issue Nov 15, 2023 · 3 comments · Fixed by #950

Comments

@antikalk
Copy link
Contributor

Problem Statement

As far as I know there is currently no way to import the localization message bundles with keycloak-config-cli.

You are able to enable internationalization, set the supported locales and default locale, but providing custom message bundles is not possible. This would be a cool feature to add.

Proposed Solution

Support a new property messageBundles in the realm json which could look like this:

{
  ...
  "messageBundles": {
    "de": {
      "hello": "Hallo",
      "world": "Welt"
      ...
    },
    "en": {
      "hello": "Hello",
      "world": "World"
      ...
    }
  }
}

For each locale in messageBundles post the content of the object to the corresponding locale endpoint, e.g.:
POST realms/$realm/localization/de
Body:

{
  "hello": "Hallo",
  "world": "Welt"
  ...
}

and
POST realms/$realm/localization/en
Body:

{
  "hello": "Hello",
  "world": "World"
  ...
}

Environment

  • Keycloak Version: [e.g. 22.0.5]
  • keycloak-config-cli Version: [5.9.0]

Additional information

No response

Acceptance Criteria

No response

@antikalk
Copy link
Contributor Author

antikalk commented Mar 27, 2024

@st3v0rr sorry for bothering you, but is there any chance we could get that feature in? I created a PR some time ago, that allows for adding localization message bundles with keycloak config-cli.

Only issue I faced is, I could not get the 18.0.2 build running. Mostly because I had to introduce a legacy file already for kc pre 22. And then below version 20, the behavior changed again. But as keycloak-config-cli claims to support only the latest four keycloak releases, it might make sure to drop the support for versions below 20 anyway...

@st3v0rr
Copy link
Member

st3v0rr commented Mar 27, 2024

Hello @antikalk ,
if we apply this change we would break with the Red Hat SSO compatibility.
So for now I need some more feedback of potential Red Hat SSO users.
I think the reason @thomasdarimont wanted to keep it was because there are still projects that are dependent on this version.

There is also no new announcement from Red Hat on their new Keycloak product that would help us with the other pinned issue. #992

@antikalk
Copy link
Contributor Author

@st3v0rr Thanks for your response! I did just have another look at my PR and found a way to enable support for KC18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants