Skip to content

Conversation

@ahus1
Copy link
Contributor

@ahus1 ahus1 commented Jul 22, 2023

Closes #21887

The code that was used to convert the different languages (except English) is present in LinkExpirationFormatterMethodTest#convert.

To test the result, consider for example jshell:

jshell> java.text.MessageFormat.format("{0,choice,0#Sekunden|1#Sekunde|1<Sekunden}",2)
==> "Sekunden"


jshell> java.text.MessageFormat.format("{0,choice,0#Sekunden|1#Sekunde|1<Sekunden}",1)
==> "Sekunde"

Discussion: #9270

@ahus1
Copy link
Contributor Author

ahus1 commented Jul 23, 2023

@hmlnarik - as we've talked about translation formats recently, I wonder if you could review and merge this PR as well. I wasn't sure where to put the code for the conversion, so I placed it in a test case as it can be run interactively from the IDE. I could also remove it from there and paste it into this PR. WDYT?

Thanks!

@ahus1 ahus1 requested a review from hmlnarik July 23, 2023 14:04
@ahus1 ahus1 marked this pull request as ready for review July 23, 2023 14:04
@ahus1 ahus1 requested a review from a team as a code owner July 23, 2023 14:04
@ahus1 ahus1 force-pushed the is-21887-fix-translations-for-language-counts branch from 1864aff to 8de973d Compare July 26, 2023 09:05
@ahus1 ahus1 requested review from stianst and removed request for hmlnarik July 26, 2023 09:06
@ahus1
Copy link
Contributor Author

ahus1 commented Jul 26, 2023

@stianst - this is now ready for another review. Thanks!

@ahus1 ahus1 force-pushed the is-21887-fix-translations-for-language-counts branch from 8de973d to 1838920 Compare July 26, 2023 09:18
@ahus1 ahus1 requested a review from stianst July 26, 2023 09:19
stianst
stianst previously approved these changes Jul 26, 2023
@stianst stianst enabled auto-merge (squash) July 26, 2023 09:53
@hmlnarik hmlnarik disabled auto-merge July 26, 2023 11:43
Copy link
Contributor

@hmlnarik hmlnarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this PR, this simplifies the automatic translation. Thank you.

However, four locales (ar, cz, sk, pl) lose their translations. Could you please fix?

@ahus1 ahus1 force-pushed the is-21887-fix-translations-for-language-counts branch from 1838920 to e600a6a Compare July 26, 2023 13:12
@ahus1 ahus1 requested a review from hmlnarik July 26, 2023 13:19
Copy link
Contributor

@hmlnarik hmlnarik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes

@hmlnarik hmlnarik merged commit 1ec8d3a into keycloak:main Jul 27, 2023
@ahus1 ahus1 deleted the is-21887-fix-translations-for-language-counts branch September 21, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify translations for LinkExpirationFormatterMethod

3 participants