Lan
2025-09-04 16:14:42 +08:00
parent f83b3d7152
commit 2e52ed61bd
25 changed files with 1678 additions and 245 deletions
+50
View File
@@ -0,0 +1,50 @@
import { createI18n } from 'vue-i18n'
import zhCN from './locales/zh-CN'
import enUS from './locales/en-US'
// 获取浏览器语言设置
const getDefaultLocale = (): string => {
const savedLocale = localStorage.getItem('locale')
if (savedLocale) {
return savedLocale
}
const browserLocale = navigator.language.toLowerCase()
if (browserLocale.startsWith('zh')) {
return 'zh-CN'
}
return 'en-US'
}
const messages = {
'zh-CN': zhCN,
'en-US': enUS
}
const i18n = createI18n({
legacy: false, // 使用 Composition API 模式
locale: getDefaultLocale(),
fallbackLocale: 'zh-CN',
messages,
globalInjection: true // 全局注入 $t 函数
})
export default i18n
// 导出切换语言的函数
export const setLocale = (locale: string) => {
i18n.global.locale.value = locale as 'zh-CN' | 'en-US'
localStorage.setItem('locale', locale)
document.documentElement.lang = locale
}
// 导出获取当前语言的函数
export const getCurrentLocale = () => {
return i18n.global.locale.value
}
// 导出可用语言列表
export const availableLocales = [
{ code: 'zh-CN', name: '中文' },
{ code: 'en-US', name: 'English' }
]
+597
View File
@@ -0,0 +1,597 @@
export default {
// Common
common: {
confirm: 'Confirm',
cancel: 'Cancel',
close: 'Close',
delete: 'Delete',
edit: 'Edit',
save: 'Save',
add: 'Add',
back: 'Back',
next: 'Next',
previous: 'Previous',
loading: 'Loading...',
noData: 'No Data',
success: 'Success',
error: 'Error',
warning: 'Warning',
info: 'Information',
search: 'Search',
copy: 'Copy',
uploadSuccess: 'Upload successful',
uploadFailed: 'Upload failed',
copySuccess: 'Copy successful',
copyFailed: 'Copy failed',
deleteSuccess: 'Delete successful',
deleteFailed: 'Delete failed',
downloadSuccess: 'Download successful',
downloadFailed: 'Download failed',
shareSuccess: 'Share successful',
shareFailed: 'Share failed',
expiredFile: 'File has expired',
fileNotFound: 'File not found',
networkError: 'Network error',
unknownError: 'Unknown error',
invalidFileType: 'Invalid file type',
fileTooLarge: 'File too large',
uploadCanceled: 'Upload canceled',
processing: 'Processing',
pleaseWait: 'Please wait',
fileDetails: 'File Details',
enabled: 'Enabled',
disabled: 'Disabled',
minute: 'minute',
files: 'files',
second: 'second',
hour: 'hour',
day: 'day',
times: 'times',
appName: 'FileCodeBox - File Transfer',
appDescription: 'Ready-to-use file transfer system'
},
// Admin module
admin: {
dashboard: {
title: 'Dashboard',
totalFiles: 'Total Files',
storageSpace: 'Storage Space',
activeUsers: 'Active Users',
systemStatus: 'System Status',
yesterday: 'Yesterday:',
today: 'Today:',
weeklyChange: '↓ 5% from last week',
normal: 'Normal',
serverUptime: 'Server Uptime:',
version: 'Version v2.2.1 Updated: 2025-09-04'
},
fileManage: {
title: 'File Management'
},
settings: {
title: 'System Settings',
basicSettings: 'Basic Settings',
websiteInfo: 'Website Basic Information',
websiteName: 'Website Name',
websiteDescription: 'Website Description',
siteName: 'Site Name',
adminPassword: 'Admin Password',
passwordPlaceholder: 'Leave blank to keep current password',
passwordNote: 'Leave blank to keep unchanged',
keywords: 'Keywords',
themeSelection: 'Theme Selection',
robotsFile: 'Robots.txt',
notificationSettings: 'Notification Settings',
notificationTitle: 'Notification Title',
notificationContent: 'Notification Content',
storageSettings: 'Storage Settings',
storagePath: 'Storage Path',
storagePathPlaceholder: 'Leave blank to use default path, optional',
storageMethod: 'Storage Method',
localStorage: 'Local Storage',
s3Storage: 'S3 Storage',
webdavStorage: 'Webdav Storage',
chunkUploadNote: 'Enable chunk upload (experimental feature, still in development, currently only available for local storage, may have unknown issues)',
s3AccessKeyId: 'S3 AccessKeyId',
s3SecretAccessKey: 'S3 SecretAccessKey',
s3BucketName: 'S3 BucketName',
s3EndpointUrl: 'S3 EndpointUrl',
s3RegionName: 'S3 Region Name',
s3SignatureVersion: 'S3 Signature Version',
s3Hostname: 'S3 Hostname',
s3v2: 'S3v2',
s3v4: 'S3v4',
autoPlaceholder: 'auto',
enabled: 'Enabled',
disabled: 'Disabled',
webdavUrl: 'Please enter Webdav URL',
webdavUsername: 'Please enter Webdav Username',
webdavPassword: 'Please enter Webdav Password',
webdavUrlPlaceholder: 'Please enter Webdav URL',
webdavUsernamePlaceholder: 'Please enter Webdav Username',
webdavPasswordPlaceholder: 'Please enter Webdav Password',
enableProxy: 'Enable Proxy',
uploadLimits: 'Upload Limits',
uploadRateLimit: 'Upload Rate Limit',
uploadPerMinute: 'Upload Per Minute',
minute: 'minute',
uploadCountLimit: 'Upload Count Limit',
files: 'files',
fileSizeLimit: 'File Size Limit',
expirationMethod: 'Expiration Method',
expirationType: 'Expiration Type',
expiration: {
day: 'By Day',
hour: 'By Hour',
minute: 'By Minute',
forever: 'Forever',
count: 'By Count'
},
maxSaveTime: 'Maximum Save Time',
timeUnits: {
second: 'second',
minute: 'minute',
hour: 'hour',
day: 'day'
},
guestUpload: 'Guest Upload',
errorLimits: 'Error Limits',
errorRateLimit: 'Error Rate Limit',
errorPerMinute: 'Error Per Minute',
errorCountLimit: 'Error Count Limit',
times: 'times',
saveChanges: 'Save Changes',
fileSizeUnits: {
kb: 'KB',
mb: 'MB',
gb: 'GB'
}
}
},
// Navigation
nav: {
sendFile: 'Send File',
retrieveFile: 'Retrieve',
fileRecords: 'File Records'
},
// Retrieve page
retrieve: {
title: 'File Retrieval',
codeInput: {
placeholder: 'Enter 5-digit retrieval code',
label: 'Retrieval Code'
},
submit: 'Retrieve',
needSendFile: 'Need to send a file? Click here',
recordsDrawer: 'Retrieval Records',
messages: {
invalidCode: 'Please enter a 5-digit retrieval code',
retrieveSuccess: 'File retrieved successfully',
invalidCodeError: 'Invalid retrieval code',
retrieveFailure: 'Failed to retrieve file: ',
networkError: 'Retrieval failed, please try again later: ',
unknownError: 'Unknown error'
}
},
// Send page
send: {
title: 'File Send',
sendText: 'Send Text',
uploadArea: {
dragText: 'Drag files here or',
clickText: 'click to select files',
textInput: 'Enter text to send here...',
placeholder: 'Click or drag files here to upload',
description: 'Supports various common formats'
},
submit: 'Secure Send',
needRetrieveFile: 'Need to retrieve? Click here',
sendRecords: 'Send Records',
secureEncryption: 'Secure Encryption',
fileDetails: 'File Details',
expirationMethod: 'Expiration Method',
expiration: {
day: 'By Day',
hour: 'By Hour',
minute: 'By Minute',
forever: 'Forever',
count: 'By Count',
label: 'Expiration Time',
placeholders: {
days: 'Enter days',
hours: 'Enter hours',
minutes: 'Enter minutes',
count: 'Enter view count',
forever: 'Forever',
default: 'Enter value'
},
units: {
days: 'days',
hours: 'hours',
minutes: 'minutes',
times: 'times',
forever: 'Forever'
}
},
time: {
day: 'By Day',
hour: 'By Hour',
minute: 'By Minute',
forever: 'Forever',
count: 'By Count'
},
messages: {
selectFile: 'Please select a file to upload',
enterText: 'Please enter text to send',
enterExpirationValue: 'Please enter expiration value',
expirationTooLong: 'Expiration time cannot exceed {days} days',
sendSuccess: 'File sent successfully! Retrieve code: {code}',
initChunkUploadFailed: 'Failed to initialize chunk upload',
chunkUploadFailed: 'Chunk {index} upload failed',
completeUploadFailed: 'Failed to complete upload',
uploadFailed: 'Upload failed, please try again later',
guestUploadDisabled: 'Guest upload feature is disabled',
fileSizeExceeded: 'File size exceeds limit ({size})',
serverError: 'Server response error',
sendFailed: 'Send failed, please try again later',
expiresAfterCount: 'Expires after {count} times',
expiresAt: 'Expires at {date}',
emptyFileError: 'Cannot read empty file',
fileAddedFromClipboard: 'File added from clipboard: {filename}',
fileProcessingFailed: 'File processing failed',
expiresAfter: 'Expires after {value} {unit}'
}
},
// File records
fileRecord: {
filename: 'Filename',
size: 'Size',
date: 'Date',
code: 'Code',
actions: 'Actions',
download: 'Download',
viewDetails: 'View Details',
deleteRecord: 'Delete Record',
preview: 'Preview',
copyContent: 'Copy Content',
contentCopied: 'Content copied to clipboard',
copyFailed: 'Copy failed, please try again'
},
// File Detail Modal
fileDetail: {
title: 'File Details',
content: 'File Content',
previewContent: 'Preview Content',
download: 'Click to Download',
qrCode: 'Retrieve QR Code',
scanQrCode: 'Scan QR code for quick retrieval'
},
// Content Preview Modal
contentPreview: {
title: 'Content Preview'
},
// File Management
fileManage: {
title: 'File Management',
searchPlaceholder: 'Search file name, description...',
allFiles: 'All Files',
editFileInfo: 'Edit File Information',
saveChanges: 'Save Changes',
headers: {
code: 'Retrieve Code',
name: 'Name',
size: 'Size',
description: 'Description',
expiration: 'Expiration',
actions: 'Actions'
},
form: {
code: 'Retrieve Code',
codePlaceholder: 'Enter retrieve code',
filename: 'File Name',
filenamePlaceholder: 'Enter file name',
suffix: 'File Extension',
suffixPlaceholder: 'Enter file extension',
downloadLimit: 'Download Limit',
downloadLimitPlaceholder: 'Enter download limit'
}
},
// Side drawer
drawer: {
noRecords: 'No records'
},
// Admin pages
manage: {
settings: {
title: 'System Settings',
basicSettings: 'Basic Settings',
websiteInfo: 'Website Basic Information',
websiteName: 'Website Name',
websiteDescription: 'Website Description',
siteName: 'Site Name',
adminPassword: 'Admin Password',
passwordPlaceholder: 'Leave blank to keep current password',
passwordNote: 'Leave blank to keep unchanged',
keywords: 'Keywords',
themeSelection: 'Theme Selection',
notificationSettings: 'Notification Settings',
notificationTitle: 'Notification Title',
notificationContent: 'Notification Content',
storageSettings: 'Storage Settings',
storagePath: 'Storage Path',
storagePathPlaceholder: 'Leave blank to use default path, optional',
storageMethod: 'Storage Method',
localStorage: 'Local Storage',
s3Storage: 'S3 Storage',
webdavStorage: 'Webdav Storage',
chunkUploadNote: 'Enable chunk upload (experimental feature, still in development, currently only available for local storage, may have unknown issues)',
enabled: 'Enabled',
disabled: 'Disabled',
webdavUrl: 'Please enter Webdav URL',
webdavUsername: 'Please enter Webdav Username',
webdavPassword: 'Please enter Webdav Password',
webdavUrlPlaceholder: 'Please enter Webdav URL',
webdavUsernamePlaceholder: 'Please enter Webdav Username',
webdavPasswordPlaceholder: 'Please enter Webdav Password',
enableProxy: 'Enable Proxy',
uploadLimits: 'Upload Limits',
uploadRateLimit: 'Upload Rate Limit',
uploadPerMinute: 'Upload Per Minute',
minute: 'minute',
uploadCountLimit: 'Upload Count Limit',
files: 'files',
fileSizeLimit: 'File Size Limit',
expirationMethod: 'Expiration Method',
expirationType: 'Expiration Type',
expiration: {
day: 'By Day',
hour: 'By Hour',
minute: 'By Minute',
forever: 'Forever',
count: 'By Count'
},
maxSaveTime: 'Maximum Save Time',
timeUnits: {
second: 'second',
minute: 'minute',
hour: 'hour',
day: 'day'
},
guestUpload: 'Guest Upload',
errorLimits: 'Error Limits',
errorRateLimit: 'Error Rate Limit',
errorPerMinute: 'Error Per Minute',
errorCountLimit: 'Error Count Limit',
times: 'times',
fileSizeUnits: {
kb: 'KB',
mb: 'MB',
gb: 'GB'
},
saveChanges: 'Save Changes'
},
systemSettings: {
title: 'System Settings',
basicSettings: 'Basic Settings',
websiteInfo: 'Website Basic Information',
websiteName: 'Website Name',
websiteDescription: 'Website Description',
adminPassword: 'Admin Password',
passwordPlaceholder: 'Leave blank to keep current password',
passwordNote: 'Leave blank to keep unchanged',
keywords: 'Keywords',
themeSelection: 'Theme Selection',
notificationSettings: 'Notification Settings',
notificationTitle: 'Notification Title',
notificationContent: 'Notification Content',
storageSettings: 'Storage Settings',
storagePath: 'Storage Path',
storagePathPlaceholder: 'Leave blank to use default path, optional',
storageMethod: 'Storage Method',
localStorage: 'Local Storage',
s3Storage: 'S3 Storage',
webdavStorage: 'Webdav Storage',
chunkUploadNote: 'Enable chunk upload (experimental feature, still in development, currently only available for local storage, may have unknown issues)',
enabled: 'Enabled',
disabled: 'Disabled',
webdavUrl: 'Please enter Webdav URL',
webdavUsername: 'Please enter Webdav Username',
webdavPassword: 'Please enter Webdav Password',
enableProxy: 'Enable Proxy',
uploadLimits: 'Upload Limits',
uploadRateLimit: 'Upload Rate Limit',
minute: 'minute',
uploadCountLimit: 'Upload Count Limit',
files: 'files',
fileSizeLimit: 'File Size Limit',
expirationMethod: 'Expiration Method',
expirationMethods: {
day: 'By Day',
hour: 'By Hour',
minute: 'By Minute',
forever: 'Forever',
count: 'By Count'
},
expiration: {
day: 'By Day',
hour: 'By Hour',
minute: 'By Minute',
forever: 'Forever',
count: 'By Count'
},
maxSaveTime: 'Maximum Save Time',
timeUnits: {
second: 'second',
minute: 'minute',
hour: 'hour',
day: 'day'
},
guestUpload: 'Guest Upload',
errorLimits: 'Error Limits',
errorRateLimit: 'Error Rate Limit',
errorCountLimit: 'Error Count Limit',
times: 'times',
saveSettings: 'Save Settings',
saveSuccess: 'Save successful',
saveFailed: 'Save failed',
getConfigFailed: 'Failed to get configuration'
},
dashboard: {
title: 'Dashboard',
totalFiles: 'Total Files',
storageSpace: 'Storage Space',
activeUsers: 'Active Users',
systemStatus: 'System Status',
yesterday: 'Yesterday:',
today: 'Today:',
weeklyChange: '↓ 5% from last week',
normal: 'Normal',
serverUptime: 'Server Uptime:',
version: 'Version v2.2.1 Updated: 2025-09-04'
},
fileManage: {
title: 'File Management',
searchPlaceholder: 'Search file name, description...',
allFiles: 'All Files',
editFileInfo: 'Edit File Info',
saveChanges: 'Save Changes',
headers: {
code: 'Code',
name: 'Name',
size: 'Size',
description: 'Description',
expiration: 'Expiration',
actions: 'Actions'
},
form: {
code: 'Code',
codePlaceholder: 'Enter code',
filename: 'File Name',
filenamePlaceholder: 'Enter file name',
suffix: 'File Suffix',
suffixPlaceholder: 'Enter file suffix',
downloadLimit: 'Download Limit',
downloadLimitPlaceholder: 'Enter download limit'
},
updateFailed: 'Update failed',
deleteFailed: 'Delete failed',
loadFileListFailed: 'Failed to load file list'
},
login: {
title: 'Login',
password: 'Password',
passwordPlaceholder: 'Password',
loginButton: 'Login',
loggingIn: 'Logging in...',
invalidPassword: 'Invalid password',
passwordTooShort: 'Password must be at least 6 characters',
loginFailed: 'Login failed',
noValidToken: 'Login failed: No valid token received'
}
},
// File size units
fileSize: {
bytes: 'Bytes',
kb: 'KB',
mb: 'MB',
gb: 'GB',
tb: 'TB'
},
// Utility functions
utils: {
// Time formatting
formatTime: 'Format timestamp to readable format',
formatFileSize: 'Format file size',
formatDuration: 'Format duration',
time: {
forever: 'Forever',
day: 'day',
hour: 'hour',
minute: 'minute',
second: 'second'
},
copyToClipboard: 'Copy text to clipboard',
copyFailed: 'Copy failed:',
debounce: 'Debounce function',
throttle: 'Throttle function',
validateEmail: 'Validate email format',
validateUrl: 'Validate URL format',
generateRandomString: 'Generate random string',
deepClone: 'Deep clone object',
getFileExtension: 'Get file extension',
isMobileDevice: 'Check if mobile device',
formatNumber: 'Format number with thousand separators',
clipboard: {
title: 'Clipboard utility functions',
copyText: 'Copy text to clipboard',
copySuccess: 'Copy successful',
copyFailed: 'Copy failed, please copy manually'
}
},
// Components
components: {
pagination: {
showing: 'Showing',
to: 'to',
of: 'of',
total: 'total',
previous: 'Previous',
next: 'Next'
},
languageSwitcher: {
clickOutsideToClose: 'Click outside to close dropdown menu'
},
borderProgressBar: {
borderWidth: 'Border width',
cornerRadius: 'Corner radius',
createGradient: 'Create gradient',
drawBackground: 'Draw background',
calculateProgress: 'Calculate progress',
drawProgress: 'Draw progress'
}
},
// Miscellaneous
misc: {
emptyFileError: 'Cannot read empty file',
fileAddedFromClipboard: 'File added from clipboard: ',
fileProcessFailed: 'File processing failed',
chunkSize: 'Keep 2MB chunk size for hash calculation',
secureContext: 'If not in secure context (HTTP), return an alternative hash based on file info',
cryptoFallback: 'If crypto.subtle.digest fails, use fallback method',
generateAlternativeHash: 'Function to generate alternative hash',
fileInfoHash: 'Generate simple hash using filename, size and last modified time',
convertToHex: 'Convert to hex string and pad to 64 bits',
defaultChunkSize: 'Default chunk size is 5MB',
initChunkUpload: '1. Initialize chunk upload',
uploadChunk: '2. Upload chunk',
completeUpload: '3. Complete upload',
chunkUploadFailed: 'Chunk upload failed: ',
uploadProgressListener: 'Add upload progress listener',
noLimitCheck: 'If no limit, return true directly',
expirationValidation: 'Add expiration time validation',
chunkUploadReplacement: 'Use chunk upload to replace direct upload',
textUploadUnchanged: 'Text upload remains unchanged',
addSendRecord: 'Add new send record',
permanent: 'Permanent',
sendSuccessMessage: 'Show send success message',
resetForm: 'Reset form - only reset file and text content, keep expiration info',
showDetails: 'Show details',
autoCopyLink: 'Auto copy retrieve code link',
delayedLoading: 'Use onMounted hook to delay load non-critical resources or initialization',
nonCriticalInit: 'Place non-immediately needed initialization code here'
}
}
+604
View File
@@ -0,0 +1,604 @@
export default {
// 通用
common: {
confirm: '确认',
cancel: '取消',
close: '关闭',
delete: '删除',
edit: '编辑',
save: '保存',
add: '添加',
back: '返回',
next: '下一页',
previous: '上一页',
loading: '加载中...',
success: '成功',
error: '错误',
warning: '警告',
info: '信息',
search: '搜索',
copy: '复制',
uploadSuccess: '上传成功',
uploadFailed: '上传失败',
copySuccess: '复制成功',
copyFailed: '复制失败',
deleteSuccess: '删除成功',
deleteFailed: '删除失败',
downloadSuccess: '下载成功',
downloadFailed: '下载失败',
shareSuccess: '分享成功',
shareFailed: '分享失败',
expiredFile: '文件已过期',
fileNotFound: '文件不存在',
networkError: '网络错误',
unknownError: '未知错误',
invalidFileType: '不支持的文件类型',
fileTooLarge: '文件过大',
uploadCanceled: '上传已取消',
processing: '处理中...',
pleaseWait: '请稍候...',
fileDetails: '文件详情',
enabled: '已开启',
disabled: '已关闭',
minute: '分钟',
files: '个文件',
second: '秒',
hour: '小时',
day: '天',
times: '次',
appName: '文件快递柜 - FileCodeBox',
appDescription: '开箱即用的文件快传系统'
},
// 管理员模块
admin: {
dashboard: {
title: '仪表盘',
totalFiles: '总文件数',
storageSpace: '存储空间',
activeUsers: '活跃用户',
systemStatus: '系统状态',
yesterday: '昨天:',
today: '今天:',
weeklyChange: '↓ 5% 较上周',
normal: '正常',
serverUptime: '服务器运行时间:',
version: '版本 v2.2.1 更新时间:2025-09-04'
},
fileManage: {
title: '文件管理'
},
settings: {
title: '系统设置',
basicSettings: '基本设置',
websiteInfo: '网站基本信息',
websiteName: '网站名称',
websiteDescription: '网站描述',
siteName: '网站名称',
adminPassword: '管理员密码',
passwordPlaceholder: '留空则不修改密码',
passwordNote: '留空则不修改',
keywords: '关键词',
themeSelection: '主题选择',
robotsFile: 'Robots.txt',
notificationSettings: '通知设置',
notificationTitle: '通知标题',
notificationContent: '通知内容',
storageSettings: '存储设置',
storagePath: '存储路径',
storagePathPlaceholder: '留空则使用默认路径,可不填写',
storageMethod: '存储方式',
localStorage: '本地存储',
s3Storage: 'S3 存储',
webdavStorage: 'Webdav 存储',
chunkUploadNote: '开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题)',
s3AccessKeyId: 'S3 AccessKeyId',
s3SecretAccessKey: 'S3 SecretAccessKey',
s3BucketName: 'S3 BucketName',
s3EndpointUrl: 'S3 EndpointUrl',
s3RegionName: 'S3 Region Name',
s3SignatureVersion: 'S3 Signature Version',
s3Hostname: 'S3 Hostname',
s3v2: 'S3v2',
s3v4: 'S3v4',
autoPlaceholder: 'auto',
enabled: '已开启',
disabled: '已关闭',
webdavUrl: '请输入 Webdav URL',
webdavUsername: '请输入 Webdav Username',
webdavPassword: '请输入 Webdav Password',
webdavUrlPlaceholder: '请输入 Webdav URL',
webdavUsernamePlaceholder: '请输入 Webdav Username',
webdavPasswordPlaceholder: '请输入 Webdav Password',
enableProxy: '启用代理',
uploadLimits: '上传限制',
uploadRateLimit: '每分钟上传限制',
uploadPerMinute: '每分钟上传限制',
minute: '分钟',
uploadCountLimit: '上传数量限制',
files: '个文件',
fileSizeLimit: '文件大小限制',
expirationMethod: '过期方式',
expirationType: '过期类型',
expiration: {
day: '按天',
hour: '按小时',
minute: '按分钟',
forever: '永久',
count: '按次数'
},
maxSaveTime: '最长保存时间',
timeUnits: {
second: '秒',
minute: '分',
hour: '时',
day: '天'
},
guestUpload: '游客上传',
errorLimits: '错误限制',
errorRateLimit: '每分钟错误限制',
errorPerMinute: '每分钟错误限制',
errorCountLimit: '错误次数限制',
times: '次',
saveChanges: '保存更改',
fileSizeUnits: {
kb: 'KB',
mb: 'MB',
gb: 'GB'
}
}
},
// 页面标题和导航
nav: {
sendFile: '发送文件',
retrieveFile: '取件',
fileRecords: '取件记录'
},
// 取件页面
retrieve: {
title: '文件取件',
codeInput: {
placeholder: '请输入5位取件码',
label: '取件码'
},
submit: '取件',
needSendFile: '需要发送文件?点击这里',
recordsDrawer: '取件记录',
messages: {
invalidCode: '请输入5位取件码',
retrieveSuccess: '文件获取成功',
invalidCodeError: '无效的取件码',
retrieveFailure: '获取文件失败:',
networkError: '取件失败,请稍后重试:',
unknownError: '未知错误'
}
},
// 发送页面
send: {
title: '文件发送',
sendText: '发送文本',
fileDetails: '文件详情',
expirationMethod: '过期方式',
uploadArea: {
dragText: '拖拽文件到此处或',
clickText: '点击选择文件',
textInput: '在此输入要发送的文本...',
placeholder: '点击或拖放文件到此处上传',
description: '支持各种常见格式'
},
submit: '安全寄送',
needRetrieveFile: '需要取件?点击这里',
sendRecords: '发件记录',
secureEncryption: '安全加密',
fileDetail: {
title: '文件详情',
content: '文件内容',
previewContent: '预览内容',
download: '点击下载',
qrCode: '取件二维码',
scanQrCode: '扫描二维码快速取件'
},
contentPreview: {
title: '内容预览'
},
fileManage: {
title: '文件管理',
searchPlaceholder: '搜索文件名称、描述...',
allFiles: '所有文件',
editFileInfo: '编辑文件信息',
saveChanges: '保存更改',
headers: {
code: '取件码',
name: '名称',
size: '大小',
description: '描述',
expiration: '过期时间',
actions: '操作'
},
form: {
code: '取件码',
codePlaceholder: '输入取件码',
filename: '文件名称',
filenamePlaceholder: '输入文件名称',
suffix: '文件后缀',
suffixPlaceholder: '输入文件后缀',
downloadLimit: '下载次数限制',
downloadLimitPlaceholder: '输入下载次数限制'
}
},
expiration: {
label: '过期时间',
placeholders: {
days: '输入天数',
hours: '输入小时数',
minutes: '输入分钟数',
count: '输入查看次数',
forever: '永久',
default: '输入值'
},
units: {
days: '天',
hours: '小时',
minutes: '分钟',
times: '次',
forever: '永久'
}
},
time: {
day: '按天',
hour: '按小时',
minute: '按分钟',
forever: '永久',
count: '按次数'
},
messages: {
selectFile: '请选择要上传的文件',
enterText: '请输入要发送的文本',
enterExpirationValue: '请输入过期值',
expirationTooLong: '过期时间不能超过{days}天',
sendSuccess: '文件发送成功!取件码:{code}',
initChunkUploadFailed: '初始化切片上传失败',
chunkUploadFailed: '切片 {index} 上传失败',
completeUploadFailed: '完成上传失败',
uploadFailed: '上传失败,请稍后重试',
guestUploadDisabled: '游客上传功能已关闭',
fileSizeExceeded: '文件大小超过限制 ({size})',
serverError: '服务器响应异常',
sendFailed: '发送失败,请稍后重试',
expiresAfterCount: '{count}次后过期',
expiresAt: '{date}过期',
emptyFileError: '无法读取空文件',
fileAddedFromClipboard: '已从剪贴板添加文件:{filename}',
fileProcessingFailed: '文件处理失败',
expiresAfter: '{value}{unit}后过期'
}
},
// 文件管理
fileManage: {
title: '文件管理',
searchPlaceholder: '搜索文件名称、描述...',
allFiles: '所有文件',
editFileInfo: '编辑文件信息',
saveChanges: '保存更改',
headers: {
code: '取件码',
name: '名称',
size: '大小',
description: '描述',
expiration: '过期时间',
actions: '操作'
},
form: {
code: '取件码',
codePlaceholder: '输入取件码',
filename: '文件名称',
filenamePlaceholder: '输入文件名称',
suffix: '文件后缀',
suffixPlaceholder: '输入文件后缀',
downloadLimit: '下载次数限制',
downloadLimitPlaceholder: '输入下载次数限制'
}
},
// 文件记录
fileRecord: {
filename: '文件名',
size: '文件大小',
date: '取件日期',
code: '取件码',
actions: '操作',
download: '下载',
viewDetails: '查看详情',
deleteRecord: '删除记录',
preview: '预览',
copyContent: '复制内容',
contentCopied: '内容已复制到剪贴板',
copyFailed: '复制失败,请重试'
},
// 文件详情模态框
fileDetail: {
title: '文件详情',
content: '文件内容',
previewContent: '预览内容',
download: '点击下载',
qrCode: '取件二维码',
scanQrCode: '扫描二维码快速取件'
},
// 内容预览
contentPreview: {
title: '内容预览'
},
// 侧边抽屉
drawer: {
noRecords: '暂无记录'
},
// 文件大小单位
fileSize: {
bytes: 'Bytes',
kb: 'KB',
mb: 'MB',
gb: 'GB',
tb: 'TB'
},
// 管理页面
manage: {
settings: {
title: '系统设置',
basicSettings: '基本设置',
siteName: '网站名称',
adminPassword: '管理员密码',
passwordPlaceholder: '留空则不修改密码',
passwordNote: '留空则不修改',
keywords: '关键词',
themeSelection: '主题选择',
robotsFile: 'Robots.txt',
notificationSettings: '通知设置',
notificationTitle: '通知标题',
notificationContent: '通知内容',
storageSettings: '存储设置',
storagePath: '存储路径',
storagePathPlaceholder: '留空则使用默认路径,可不填写',
storageMethod: '存储方式',
localStorage: '本地存储',
chunkUploadNote: '开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题)',
uploadLimits: '上传限制',
uploadPerMinute: '每分钟上传限制',
uploadCountLimit: '上传数量限制',
fileSizeLimit: '文件大小限制',
expiration: {
day: '按天',
hour: '按小时',
minute: '按分钟',
forever: '永久',
count: '按次数'
},
maxSaveTime: '最长保存时间',
s3SecretAccessKey: 'S3 SecretAccessKey',
fileSizeUnits: {
kb: 'KB',
mb: 'MB',
gb: 'GB'
},
expirationType: '过期类型',
guestUpload: '游客上传',
errorLimits: '错误限制',
errorPerMinute: '每分钟错误限制',
errorCountLimit: '错误次数限制',
saveChanges: '保存更改'
},
dashboard: {
title: '仪表盘',
totalFiles: '总文件数',
storageSpace: '存储空间',
activeUsers: '活跃用户',
systemStatus: '系统状态',
yesterday: '昨天:',
today: '今天:',
weeklyChange: '↓ 5% 较上周',
normal: '正常',
serverUptime: '服务器运行时间:',
version: '版本 v2.2.1 更新时间:2025-09-04'
},
fileManage: {
title: '文件管理',
searchPlaceholder: '搜索文件名称、描述...',
allFiles: '所有文件',
editFileInfo: '编辑文件信息',
saveChanges: '保存更改',
headers: {
code: '取件码',
name: '名称',
size: '大小',
description: '描述',
expiration: '过期时间',
actions: '操作'
},
form: {
code: '取件码',
codePlaceholder: '输入取件码',
filename: '文件名称',
filenamePlaceholder: '输入文件名称',
suffix: '文件后缀',
suffixPlaceholder: '输入文件后缀',
downloadLimit: '下载次数限制',
downloadLimitPlaceholder: '输入下载次数限制'
},
updateFailed: '更新失败',
deleteFailed: '删除失败',
loadFileListFailed: '加载文件列表失败'
},
systemSettings: {
title: '系统设置',
basicSettings: '基本设置',
websiteInfo: '网站基本信息',
websiteName: '网站名称',
websiteDescription: '网站描述',
adminPassword: '管理员密码',
passwordPlaceholder: '留空则不修改密码',
passwordNote: '留空则不修改',
keywords: '关键词',
themeSelection: '主题选择',
notificationSettings: '通知设置',
notificationTitle: '通知标题',
notificationContent: '通知内容',
storageSettings: '存储设置',
storagePath: '存储路径',
storagePathPlaceholder: '留空则使用默认路径,可不填写',
storageMethod: '存储方式',
localStorage: '本地存储',
s3Storage: 'S3 存储',
webdavStorage: 'Webdav 存储',
chunkUploadNote: '开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题)',
enabled: '已开启',
disabled: '已关闭',
webdavUrl: '请输入 Webdav URL',
webdavUsername: '请输入 Webdav Username',
webdavPassword: '请输入 Webdav Password',
enableProxy: '启用代理',
uploadLimits: '上传限制',
uploadRateLimit: '每分钟上传限制',
minute: '分钟',
uploadCountLimit: '上传数量限制',
files: '个文件',
fileSizeLimit: '文件大小限制',
expirationMethod: '过期方式',
expirationMethods: {
day: '按天',
hour: '按小时',
minute: '按分钟',
forever: '永久',
count: '按次数'
},
expiration: {
day: '按天',
hour: '按小时',
minute: '按分钟',
forever: '永久',
count: '按次数'
},
maxSaveTime: '最长保存时间',
timeUnits: {
second: '秒',
minute: '分',
hour: '时',
day: '天'
},
guestUpload: '游客上传',
errorLimits: '错误限制',
errorRateLimit: '每分钟错误限制',
errorCountLimit: '错误次数限制',
times: '次',
saveSettings: '保存设置',
saveSuccess: '保存成功',
saveFailed: '保存失败',
getConfigFailed: '获取配置失败'
},
login: {
title: '登录',
password: '密码',
passwordPlaceholder: '密码',
loginButton: '登录',
loggingIn: '登录中...',
invalidPassword: '无效的密码',
passwordTooShort: '密码长度至少为6位',
loginFailed: '登录失败',
noValidToken: '登录失败:未获取到有效令牌'
}
},
// 工具函数相关
utils: {
common: {
formatTime: '格式化时间戳为可读格式',
formatFileSize: '格式化文件大小',
formatDuration: '格式化持续时间',
time: {
forever: '永久',
day: '天',
hour: '小时',
minute: '分钟',
second: '秒'
},
copyToClipboard: '复制文本到剪贴板',
copyFailed: '复制失败:',
debounce: '防抖函数',
throttle: '节流函数',
validateEmail: '验证邮箱格式',
validateUrl: '验证URL格式',
generateRandomString: '生成随机字符串',
deepClone: '深度克隆对象',
getFileExtension: '获取文件扩展名',
isMobileDevice: '检查是否为移动设备',
formatNumber: '格式化数字,添加千分位分隔符'
},
clipboard: {
title: '剪贴板工具函数',
copyText: '复制文本到剪贴板',
copySuccess: '复制成功',
copyFailed: '复制失败,请手动复制'
}
},
// 组件相关
components: {
pagination: {
showing: '显示第',
to: '到',
of: '条,共',
total: '条',
previous: '上一页',
next: '下一页'
},
languageSwitcher: {
clickOutsideToClose: '点击外部关闭下拉菜单'
},
borderProgressBar: {
borderWidth: '边框宽度',
cornerRadius: '拐角半径',
createGradient: '创建渐变',
drawBackground: '绘制背景',
calculateProgress: '计算进度',
drawProgress: '绘制进度'
}
},
// 其他通用文本
misc: {
emptyFileError: '无法读取空文件',
fileAddedFromClipboard: '已从剪贴板添加文件:',
fileProcessFailed: '文件处理失败',
chunkSize: '保持 2MB 的切片大小用于计算哈希',
secureContext: '如果不是安全上下文(HTTP),则返回一个基于文件信息的替代哈希',
cryptoFallback: '如果 crypto.subtle.digest 失败,使用替代方案',
generateAlternativeHash: '生成替代哈希的函数',
fileInfoHash: '使用文件名、大小和最后修改时间生成一个简单的哈希',
convertToHex: '转换为16进制字符串并填充到64位',
defaultChunkSize: '默认切片大小为5MB',
initChunkUpload: '1. 初始化切片上传',
uploadChunk: '2. 上传切片',
completeUpload: '3. 完成上传',
chunkUploadFailed: '切片上传失败:',
uploadProgressListener: '添加上传进度监听',
noLimitCheck: '如果没有限制,直接返回true',
expirationValidation: '添加过期时间验证',
chunkUploadReplacement: '使用切片上传替代原来的直接上传',
textUploadUnchanged: '文本上传保持不变',
addSendRecord: '添加新的发送记录',
permanent: '永久',
sendSuccessMessage: '显示发送成功消息',
resetForm: '重置表单 - 只重置文件和文本内容,保留过期信息',
showDetails: '显示详情',
autoCopyLink: '自动复制取件码链接',
delayedLoading: '使用 onMounted 钩子延迟加载一些非关键资源或初始化',
nonCriticalInit: '这里可以放置一些非立即需要的初始化代码'
}
}