Skip to content

Conversation

@roksui
Copy link
Contributor

@roksui roksui commented Nov 26, 2024

Motivation:

Regardless of the presence of localized label for the hint button, when toggling the button, default hardcoded text would be displayed.

Modification:

In the toggleLabel function in HintView.js, polyglot is used to translate the hint labels rather than using hardcoded texts.

Result:

The hint button correctly shows the localized labels for the hint button and falling back to the English version if it is absent.

Fixes #1944

Motivation:

Regardless of the presence of localized label for the hint button, when
toggling the button, default hardcoded text would be displayed.

Modification:

In the `toggleLabel` function in `HintView.js`, `polyglot` is used to
translate the hint labels rather than using hardcoded texts.

Result:

The hint button correctly shows the localized labels for the hint
button and falling back to the English version if it is absent.

Fixes WebGoat#1944
@nbaars nbaars merged commit 51e3f59 into WebGoat:main Nov 26, 2024
5 checks passed
@nbaars
Copy link
Collaborator

nbaars commented Nov 26, 2024

@roksui merged, thanks for your help!

@roksui roksui deleted the fix-hint-label-localization branch November 26, 2024 22:48
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

Successfully merging this pull request may close these issues.

Clicking on 'Show hints' and 'Hide hints' in another language goes back to English text.

2 participants