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

Some languages do not have labels, it appears to be the iso code. #554

Closed
MuratKaragozgil opened this issue May 17, 2024 · 5 comments
Closed

Comments

@MuratKaragozgil
Copy link

This is the custom template that i develop with keycloakify-start project. But Portugese doesn't seem pretty. I couldn't find the label of these languages on Keycloakify-starter and keycloakify project. How can i change these language labels ?

CleanShot 2024-05-17 at 12 40 09

Keycloak version -> 23.0.6
Keycloakify version -> 9.6.7

@garronej
Copy link
Collaborator

Thank you for reporting, I'll have a look at it this week end

@MuratKaragozgil
Copy link
Author

@garronej Any news ? I really have no idea why this is happening. I changed my Keycloak version. Still not resolved.

@garronej
Copy link
Collaborator

garronej commented May 20, 2024

Hello @MuratKaragozgil,
Sorry I said that I'd look at this in the week end but I'm realy under for the Keycloakify 10 release.

After investigation it turns out it's not a Keycloakify bug.
It's a typo in Keycloak resources. Only for the brazilian language label.
In the language resources they defined the key locale_pt_BR but it should be locale_pt-BR.
I'll submit a PR to fix it.

In the meantime you can fix it in your Keycloakify theme by doing:

src/keycloak-theme/login/i18n.ts

import { createUseI18n } from "keycloakify/login";

export const { useI18n } = createUseI18n({
    en: {
       "locale_pt-BR": "portuguès (Brasil)",
    },
    // ... if you don't have any other custom translation you can just use english.  
    // otherwise copy paste the key/value in every langage.  
});

export type I18n = NonNullable<ReturnType<typeof useI18n>>;

@MuratKaragozgil
Copy link
Author

Really appreciate that ! Thank you.

garronej added a commit that referenced this issue May 20, 2024
@garronej
Copy link
Collaborator

garronej commented May 20, 2024

You're welcome, thank you for reporting.
I implemented a patch, it will be fixed in Keycloakify v10

64fe15c

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

No branches or pull requests

2 participants