diff --git a/frontend/nyanpasu/src/components/setting/modules/service-manual-prompt-dialog.tsx b/frontend/nyanpasu/src/components/setting/modules/service-manual-prompt-dialog.tsx index efe79fbcc3..010022f13e 100644 --- a/frontend/nyanpasu/src/components/setting/modules/service-manual-prompt-dialog.tsx +++ b/frontend/nyanpasu/src/components/setting/modules/service-manual-prompt-dialog.tsx @@ -18,9 +18,10 @@ type CopyToClipboardButtonProps = { } function CopyToClipboardButton({ onClick }: CopyToClipboardButtonProps) { + const { t } = useTranslation() return ( { console.log('copied') notification({ - title: t('Copy to clipboard'), + title: `Clash Nyanpasu - ${t('Service Manual Tips')}`, body: t('Copied to clipboard'), }) }) .catch((error) => { console.error(error) notification({ - title: t('Copy to clipboard'), + title: `Clash Nyanpasu - ${t('Service Manual Tips')}`, body: t('Failed to copy to clipboard'), }) }) diff --git a/frontend/nyanpasu/src/locales/en.json b/frontend/nyanpasu/src/locales/en.json index 3f7a892955..3d7ded17b1 100644 --- a/frontend/nyanpasu/src/locales/en.json +++ b/frontend/nyanpasu/src/locales/en.json @@ -272,6 +272,9 @@ "UI": "UI", "Service Manual Tips": "Service Manual Tips", "Unable to operation the service automatically": "Unable to {{operation}} the service automatically. Please navigate to the core directory, run PowerShell as administrator on Windows or a terminal emulator on macOS/Linux, and execute the following commands:", + "Copy to clipboard": "Copy to clipboard", + "Copied to clipboard": "Copied to clipboard~", + "Failed to copy to clipboard": "Failed to copy to clipboard!", "Successfully switched to the clash core": "Successfully switched to the {{core}} core.", "Failed to switch. You could see the details in the log": "Failed to switch. You could see the details in the log. \nError: {{error}}", "Successfully restarted the core": "Successfully restarted the core.", diff --git a/frontend/nyanpasu/src/locales/ru.json b/frontend/nyanpasu/src/locales/ru.json index 1bfdb35b4a..659c79f3f3 100644 --- a/frontend/nyanpasu/src/locales/ru.json +++ b/frontend/nyanpasu/src/locales/ru.json @@ -272,6 +272,9 @@ "UI": "Пользовательский интерфейс", "Service Manual Tips": "Руководство по обслуживанию", "Unable to operation the service automatically": "Не удается автоматически {{operation}} службу. Пожалуйста, перейдите в каталог ядра, запустите PowerShell как администратор на Windows или эмулятор терминала на macOS/Linux и выполните следующие команды:", + "Copy to clipboard": "Копировать в буфер обмена", + "Copied to clipboard": "Копируется в буфер обмена~", + "Failed to copy to clipboard": "Не удалось копировать в буфер обмена!", "Successfully switched to the clash core": "Успешно переключено на ядро {{core}}.", "Failed to switch. You could see the details in the log": "Не удалось переключить. Вы можете увидеть детали в журнале. \nОшибка: {{error}}", "Successfully restarted the core": "Ядро успешно перезапущено.", diff --git a/frontend/nyanpasu/src/locales/zh-CN.json b/frontend/nyanpasu/src/locales/zh-CN.json index 38bbc4d377..a87b24a7a9 100644 --- a/frontend/nyanpasu/src/locales/zh-CN.json +++ b/frontend/nyanpasu/src/locales/zh-CN.json @@ -273,6 +273,9 @@ "Service Manual Tips": "有关服务的提示", "Unable to operation the service automatically": "无法自动{{operation}}服务。请导航到内核所在目录,在 Windows 上以管理员身份打开 PowerShell或在 macOS/Linux 上打开终端仿真器,然后执行以下命令:", "Successfully switched to the clash core": "成功切换至 {{core}} 内核。", + "Copy to clipboard": "复制到剪贴板", + "Copied to clipboard": "已复制到剪贴板~", + "Failed to copy to clipboard": "复制失败!", "Failed to switch. You could see the details in the log": "切换失败,可以在日志中查看详细信息。\n错误:{{error}}", "Successfully restarted the core": "重启内核成功。", "Failed to restart. You could see the details in the log": "重启失败,详细信息请检查日志。\n\n错误:", diff --git a/frontend/nyanpasu/src/locales/zh-TW.json b/frontend/nyanpasu/src/locales/zh-TW.json index 9de41e784f..cb694ad5a2 100644 --- a/frontend/nyanpasu/src/locales/zh-TW.json +++ b/frontend/nyanpasu/src/locales/zh-TW.json @@ -272,6 +272,9 @@ "UI": "使用者介面", "Service Manual Tips": "有關服務的提示", "Unable to operation the service automatically": "無法自動{{operation}}服務。請開啟核心所在目錄,在 Windows 上以管理員身分開啟 PowerShell 或在 macOS/Linux 上開啟終端模擬器,然後執行以下指令:", + "Copy to clipboard": "複製到剪貼簿", + "Copied to clipboard": "已複製到剪貼簿~", + "Failed to copy to clipboard": "複製失敗!", "Successfully switched to the clash core": "成功切換至「{{core}}」核心。", "Failed to switch. You could see the details in the log": "切換失敗,可以在日誌中查看詳細資訊。\n錯誤:{{error}}", "Successfully restarted the core": "成功重啟核心。",