102 lines
3.9 KiB
JavaScript
102 lines
3.9 KiB
JavaScript
import { createI18n } from 'vue-i18n';
|
|
|
|
const messages = {
|
|
zh: {
|
|
howItWorks: {
|
|
title: '工作原理',
|
|
step1: '在上面的输入框中,随意编造一个以 {domain} 结尾的邮箱地址。',
|
|
step2: '使用这个地址去注册任何网站或接收邮件。',
|
|
step3: '在这里输入您刚刚使用的地址,点击“查看收件箱”,即可看到邮件。',
|
|
},
|
|
language: '语言',
|
|
home: {
|
|
title: '您的专属临时邮箱,无限且私密',
|
|
subtitle: '输入任何',
|
|
subtitleAfter: '地址,立即在此查看收件箱。',
|
|
placeholder: '输入您的临时邮箱地址...',
|
|
copyTitle: '复制地址',
|
|
random: '随机生成',
|
|
checkInbox: '查看收件箱',
|
|
inbox: '收件箱',
|
|
refresh: '刷新',
|
|
loading: '正在加载...',
|
|
noMail: '暂无邮件',
|
|
selectMail: '请从选择一封邮件查看',
|
|
from: '发件人',
|
|
to: '收件人',
|
|
attachments: '附件',
|
|
delete: '删除',
|
|
clearInbox: '清空收件箱',
|
|
alerts: {
|
|
enterEmail: '请输入一个邮箱地址',
|
|
fetchFailed: '无法获取邮件,请检查后端服务和 Nginx 配置是否正常。',
|
|
confirmDelete: '确定要删除这封邮件吗?',
|
|
deleteFailed: '删除邮件失败。',
|
|
confirmClearAll: '确定要清空这个收件箱的所有邮件吗?此操作不可恢复。',
|
|
clearFailed: '清空收件箱失败。',
|
|
generateRandomSuccess: '已生成随机邮箱地址',
|
|
checkInboxStart: '正在查询收件箱',
|
|
copyFailed: '复制失败!',
|
|
copySuccess: '复制成功!', // <-- 这里添加
|
|
actionCancelled: '操作已取消',
|
|
deleteSuccess: '删除成功!',
|
|
clearSuccess: '收件箱已清空!',
|
|
},
|
|
newMailNotification: '收到新邮件!',
|
|
}
|
|
},
|
|
en: {
|
|
howItWorks: {
|
|
title: 'How it Works',
|
|
step1: 'Invent any email address ending in {domain} in the input box above.',
|
|
step2: 'Use this address to register on any website or receive emails.',
|
|
step3: 'Enter the address you just used here and click "Check Inbox" to see the emails.',
|
|
},
|
|
language: 'Language',
|
|
home: {
|
|
title: 'Your Exclusive, Unlimited, and Private Temporary Email',
|
|
subtitle: 'Enter any address ending in ',
|
|
subtitleAfter: ' to check the inbox right here.',
|
|
placeholder: 'Enter your temporary email address...',
|
|
copyTitle: 'Copy Address',
|
|
random: 'Generate Random',
|
|
checkInbox: 'Check Inbox',
|
|
inbox: 'Inbox',
|
|
refresh: 'Refresh',
|
|
loading: 'Loading...',
|
|
noMail: 'No mail yet',
|
|
selectMail: 'Please select an email to view',
|
|
from: 'From',
|
|
to: 'To',
|
|
attachments: 'Attachments',
|
|
delete: 'Delete',
|
|
clearInbox: 'Clear Inbox',
|
|
alerts: {
|
|
enterEmail: 'Please enter an email address',
|
|
fetchFailed: 'Failed to fetch emails. Please check if the backend service and Nginx configuration are normal.',
|
|
confirmDelete: 'Are you sure you want to delete this email?',
|
|
deleteFailed: 'Failed to delete email.',
|
|
confirmClearAll: 'Are you sure you want to clear all emails in this inbox? This action cannot be undone.',
|
|
clearFailed: 'Failed to clear inbox.',
|
|
generateRandomSuccess: 'Random email address generated',
|
|
checkInboxStart: 'Checking inbox',
|
|
copyFailed: 'Copy failed!',
|
|
copySuccess: 'Copied successfully!', // <-- 这里添加
|
|
actionCancelled: 'Action cancelled',
|
|
deleteSuccess: 'Deleted successfully!',
|
|
clearSuccess: 'Inbox cleared!',
|
|
},
|
|
newMailNotification: 'New mail received!',
|
|
}
|
|
},
|
|
};
|
|
|
|
const i18n = createI18n({
|
|
legacy: false, // 使用组合式 API
|
|
locale: 'zh', // 设置默认语言
|
|
fallbackLocale: 'en', // 设置回退语言
|
|
messages, // 设置语言环境信息
|
|
});
|
|
|
|
export default i18n;
|