From 2b1aee9e71dfb7e9ec3753ffe80d5f5361ca2fcb Mon Sep 17 00:00:00 2001 From: Yokayo <52032299+Yokayo@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:07:42 +0700 Subject: [PATCH] Localize two hard-coded strings --- public/scripts/secrets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/scripts/secrets.js b/public/scripts/secrets.js index f6ebd1f2a..f925f52bc 100644 --- a/public/scripts/secrets.js +++ b/public/scripts/secrets.js @@ -62,10 +62,11 @@ async function clearSecret() { $('#main_api').trigger('change'); } -function updateSecretDisplay() { +export function updateSecretDisplay() { for (const [secret_key, input_selector] of Object.entries(INPUT_MAP)) { const validSecret = !!secret_state[secret_key]; - const placeholder = validSecret ? '✔️ Key saved' : '❌ Missing key'; + + const placeholder = $('#viewSecrets').attr(validSecret ? 'key_saved_text' : 'missing_key_text'); $(input_selector).attr('placeholder', placeholder); } }