mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 03:30:04 +00:00
[i18n] Translate clipboard toast messages (#2462)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useToast } from 'primevue/usetoast'
|
||||
|
||||
import { t } from '@/i18n'
|
||||
|
||||
export function useCopyToClipboard() {
|
||||
const { copy, isSupported } = useClipboard()
|
||||
const toast = useToast()
|
||||
@@ -11,22 +13,22 @@ export function useCopyToClipboard() {
|
||||
await copy(text)
|
||||
toast.add({
|
||||
severity: 'success',
|
||||
summary: 'Success',
|
||||
detail: 'Copied to clipboard',
|
||||
summary: t('g.success'),
|
||||
detail: t('clipboard.successMessage'),
|
||||
life: 3000
|
||||
})
|
||||
} catch (err) {
|
||||
toast.add({
|
||||
severity: 'error',
|
||||
summary: 'Error',
|
||||
detail: 'Failed to copy report'
|
||||
summary: t('g.error'),
|
||||
detail: t('clipboard.errorMessage')
|
||||
})
|
||||
}
|
||||
} else {
|
||||
toast.add({
|
||||
severity: 'error',
|
||||
summary: 'Error',
|
||||
detail: 'Clipboard API not supported in your browser'
|
||||
summary: t('g.error'),
|
||||
detail: t('clipboard.errorNotSupported')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,5 +764,10 @@
|
||||
"title": "Updating ComfyUI Desktop",
|
||||
"description": "ComfyUI Desktop is installing new dependencies. This may take a few minutes.",
|
||||
"terminalDefaultMessage": "Any console output from the update will be shown here."
|
||||
},
|
||||
"clipboard": {
|
||||
"successMessage": "Copied to clipboard",
|
||||
"errorMessage": "Failed to copy to clipboard",
|
||||
"errorNotSupported": "Clipboard API not supported in your browser"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"clipboard": {
|
||||
"errorMessage": "Échec de la copie dans le presse-papiers",
|
||||
"errorNotSupported": "L'API du presse-papiers n'est pas prise en charge par votre navigateur",
|
||||
"successMessage": "Copié dans le presse-papiers"
|
||||
},
|
||||
"color": {
|
||||
"blue": "Bleu",
|
||||
"custom": "Personnalisé",
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"clipboard": {
|
||||
"errorMessage": "クリップボードへのコピーに失敗しました",
|
||||
"errorNotSupported": "お使いのブラウザではクリップボードAPIがサポートされていません",
|
||||
"successMessage": "クリップボードにコピーしました"
|
||||
},
|
||||
"color": {
|
||||
"blue": "青",
|
||||
"custom": "カスタム",
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"clipboard": {
|
||||
"errorMessage": "클립보드에 복사하지 못했습니다",
|
||||
"errorNotSupported": "당신의 브라우저에서 클립보드 API가 지원되지 않습니다",
|
||||
"successMessage": "클립보드에 복사됨"
|
||||
},
|
||||
"color": {
|
||||
"blue": "파란색",
|
||||
"custom": "사용자 정의",
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"clipboard": {
|
||||
"errorMessage": "Не удалось скопировать в буфер обмена",
|
||||
"errorNotSupported": "API буфера обмена не поддерживается в вашем браузере",
|
||||
"successMessage": "Скопировано в буфер обмена"
|
||||
},
|
||||
"color": {
|
||||
"blue": "Синий",
|
||||
"custom": "Пользовательский",
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"clipboard": {
|
||||
"errorMessage": "复制到剪贴板失败",
|
||||
"errorNotSupported": "您的浏览器不支持剪贴板API",
|
||||
"successMessage": "已复制到剪贴板"
|
||||
},
|
||||
"color": {
|
||||
"blue": "蓝色",
|
||||
"custom": "自定义",
|
||||
|
||||
Reference in New Issue
Block a user