fix(settings): show the SMTP failure reason instead of a raw i18n key

classifySMTPError returned keys already carrying "pages.settings.", while the
four keys TestConnection returns directly do not, and the alert renders every
Message under that one prefix. Any classified failure therefore looked up
pages.settings.pages.settings.smtpErrorAuth, which does not exist, so the panel
printed the key instead of "Authentication failed — check username and
password". The unknown case was worse: it appended the raw error to the key, and
its own text interpolated {{ .Error }}, Go template syntax the frontend's
i18next never fills.

Return the keys unprefixed like the rest, and point the unknown case at the
panel log, which already carries the underlying error.
This commit is contained in:
Sanaei
2026-09-09 00:51:44 +02:00
parent c392f367e1
commit efc603f59c
15 changed files with 55 additions and 22 deletions
+1 -1
View File
@@ -1394,7 +1394,7 @@
"smtpErrorTimeout": "Hết thời gian kết nối — không thể truy cập máy chủ",
"smtpErrorRelay": "Máy chủ từ chối gửi từ địa chỉ này",
"smtpErrorEof": "Kết nối đã bị máy chủ đóng",
"smtpErrorUnknown": "Lỗi SMTP: {{ .Error }}",
"smtpErrorUnknown": "Lỗi SMTP — xem nhật ký bảng điều khiển",
"eventMemoryHigh": "Sử dụng bộ nhớ cao (%)",
"remarkTemplate": "Mẫu ghi chú",
"remarkTemplateDesc": "Khi được đặt, mục này thay thế mô hình ghi chú cho mọi liên kết đăng ký — hãy viết định dạng riêng của bạn bằng các token biến (dùng nút để chèn chúng). Để trống để dùng mô hình ở trên.",