mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6564] [MERGED] fix(tgbot): localize QR caption via I18nBot #6353
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6353
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6564
Author: @sdhfsl
Created: 9/16/2026
Status: ✅ Merged
Merged: 9/16/2026
Merged by: @MHSanaei
Base:
main← Head:fix-bot-qr-i18n📝 Commits (8)
959e6fdfix(panel): accept 2FA codes from adjacent TOTP windowsf3096bbfix(panel): share TOTP skew tolerance with VerifyTwoFactorCode198ac75Merge branch 'main' into main19f2e95fix(tgbot): localize QR caption via I18nBotea79df3fix(tgbot): repair locale JSON syntax, harden QR i18n test60e2ecaMerge branch 'main' into fix-bot-qr-i18n1a4c60fMerge branch 'main' into fix-bot-qr-i18n7c8b2cachore(tgbot): drop QR caption tests that cannot catch the bug📊 Changes
14 files changed (+27 additions, -14 deletions)
View changed files
📝
internal/web/service/tgbot/tgbot_client.go(+1 -1)📝
internal/web/translation/ar-EG.json(+2 -1)📝
internal/web/translation/en-US.json(+2 -1)📝
internal/web/translation/es-ES.json(+2 -1)📝
internal/web/translation/fa-IR.json(+2 -1)📝
internal/web/translation/id-ID.json(+2 -1)📝
internal/web/translation/ja-JP.json(+2 -1)📝
internal/web/translation/pt-BR.json(+2 -1)📝
internal/web/translation/ru-RU.json(+2 -1)📝
internal/web/translation/tr-TR.json(+2 -1)📝
internal/web/translation/uk-UA.json(+2 -1)📝
internal/web/translation/vi-VN.json(+2 -1)📝
internal/web/translation/zh-CN.json(+2 -1)📝
internal/web/translation/zh-TW.json(+2 -1)📄 Description
Problem
Fixes #6562.
sendClientQRLinkshardcoded English"QRCode for client "+email+":", bypassingI18nBot{}localization, so the caption stays English no matter the configured bot language (e.g. ru-RU).Fix
t.I18nBot("tgbot.answers.qrCodeForClient", "Email=="+email).qrCodeForClientkey (QRCode for client {{ .Email }}:pattern) to all 13 locale files (en-US original wording kept; ru-RU/zh-CN/zh-TW and others translated).Tests
New
TestQRCodeForClientLocalizes: en renders the original wording, ru renders Russian, no hardcoded English leaks into ru. Fulltgbotpackage suite passes,go vetclean.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.