From 51e3f590544411e7589ba4f64c121bcefbb82a7a Mon Sep 17 00:00:00 2001 From: Jeong Rok Suh <55661741+roksui@users.noreply.github.com> Date: Wed, 27 Nov 2024 07:34:09 +0900 Subject: [PATCH] fix: Hint labels showing default text regardless of localization (#1965) --- src/main/resources/i18n/messages.properties | 1 + .../resources/webgoat/static/js/goatApp/view/HintView.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index 2240b926c..08f691a9f 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -48,6 +48,7 @@ report.card=Report card about=About WebGoat contact=Contact Us show.hints=Show hints +hide.hints=Hide hints lesson.overview=Lesson overview reset.lesson=Reset lesson sign.in=Sign in diff --git a/src/main/resources/webgoat/static/js/goatApp/view/HintView.js b/src/main/resources/webgoat/static/js/goatApp/view/HintView.js index 97566de16..1ab5f05cc 100644 --- a/src/main/resources/webgoat/static/js/goatApp/view/HintView.js +++ b/src/main/resources/webgoat/static/js/goatApp/view/HintView.js @@ -32,9 +32,9 @@ function($, toggleLabel: function() { if (this.isVisible()) { - $('#show-hints-button').text('Hide hints'); - } else { - $('#show-hints-button').text('Show hints'); + $('#show-hints-button').text(polyglot.t("hide.hints")) + } else { + $('#show-hints-button').text(polyglot.t("show.hints")) } },