i18n(panel): translate Copy/Cancel buttons, Stream/Sniffing tabs, and All-Inbounds filenames

- TextModal: route the Copy button label and the post-copy toast
  through t('copy')/t('copied') instead of hardcoded English.
- PromptModal: route cancelText through t('cancel') and default okText
  through t('confirm') so the import-inbound prompt stops showing
  "Cancel" in non-English UI.
- InboundsPage: pass the All-Inbounds and All-Inbounds-Subs download
  filenames through t(...) so each locale can localize them.
- en-US.json: add pages.inbounds.exportAllLinksFileName and
  pages.inbounds.exportAllSubsFileName.
- All 12 non-English locales: translate streamTab and sniffingTab
  (previously left as literal English) and add the two new filename
  keys with appropriate translations.

All 13 locale files now have 1541 lines.
This commit is contained in:
MHSanaei
2026-05-28 18:45:59 +02:00
parent bee8288d41
commit c5b5606bf5
16 changed files with 60 additions and 30 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
import { Button, Input, Modal, message } from 'antd';
import { CopyOutlined, DownloadOutlined } from '@ant-design/icons';
import { useTranslation } from 'react-i18next';
import { ClipboardManager, FileManager } from '@/utils';
@@ -12,11 +13,12 @@ interface TextModalProps {
}
export default function TextModal({ open, onClose, title, content, fileName = '' }: TextModalProps) {
const { t } = useTranslation();
const [messageApi, messageContextHolder] = message.useMessage();
async function copy() {
const ok = await ClipboardManager.copyText(content || '');
if (ok) {
messageApi.success('Copied');
messageApi.success(t('copied'));
onClose();
}
}
@@ -39,7 +41,7 @@ export default function TextModal({ open, onClose, title, content, fileName = ''
{fileName && (
<Button icon={<DownloadOutlined />} onClick={download}>{fileName}</Button>
)}
<Button type="primary" icon={<CopyOutlined />} onClick={copy}>Copy</Button>
<Button type="primary" icon={<CopyOutlined />} onClick={copy}>{t('copy')}</Button>
</>
)}
>