feat(i18n): internationalize password modal titles and submit button

This commit is contained in:
Mega Yu
2026-04-23 17:04:52 +08:00
parent b9745dbaec
commit d8cd3aec4e

View File

@@ -65,7 +65,7 @@
(shui/dialog-close!))]
[:div.e2ee-password-modal-overlay
[:div.e2ee-password-modal-content.flex.flex-col.gap-8.p-4
[:div.text-2xl.font-medium "Enter password for remote graphs"]
[:div.text-2xl.font-medium (t :encryption/enter-password-title)]
[:div.flex.flex-col.gap-4
(shui/toggle-password
{:value password
@@ -80,7 +80,7 @@
:on-key-press (fn [e]
(when (= "Enter" (util/ekey e))
(on-submit)))}
"Submit")]]]))
(t :ui/submit))]]]))
(rum/defc e2ee-password-to-decrypt-private-key
[encrypted-private-key private-key-promise]
@@ -108,11 +108,11 @@
:on-change (fn [e]
(set-decrypt-fail! false)
(set-password! (-> e .-target .-value)))})
(when decrypt-fail? [:p.text-warning.text-sm (t :encryption/wrong-password)])]
(when decrypt-fail? [:p.text-warning.text-sm (t :encryption/wrong-password)])]
(shui/button
{:on-click on-submit
:disabled (string/blank? password)
:on-key-press (fn [e]
(when (= "Enter" (util/ekey e))
(on-submit)))}
(t :ui/submit))]]]))
(t :ui/submit))]]]))