Commit 5ddf3dfd authored by Administrator's avatar Administrator
Browse files

style(locales): prettier sweep — trailing commas + line wrapping



No semantic changes. Trailing commas in object literals, paren-spaced
arrow params, line wrapping at column 80. Mirrored across en + zh-CN.
Co-Authored-By: default avatarClaude <noreply@anthropic.com>
parent 4bca327d
...@@ -13,5 +13,5 @@ export default { ...@@ -13,5 +13,5 @@ export default {
close: 'Close', close: 'Close',
ok: 'OK', ok: 'OK',
yes: 'Yes', yes: 'Yes',
no: 'No' no: 'No',
} }
...@@ -4,7 +4,7 @@ export default { ...@@ -4,7 +4,7 @@ export default {
create: 'Created successfully', create: 'Created successfully',
update: 'Updated successfully', update: 'Updated successfully',
delete: 'Deleted successfully', delete: 'Deleted successfully',
upload: 'Uploaded successfully' upload: 'Uploaded successfully',
}, },
error: { error: {
general: 'An error occurred, please try again', general: 'An error occurred, please try again',
...@@ -15,22 +15,22 @@ export default { ...@@ -15,22 +15,22 @@ export default {
upload: 'Upload failed', upload: 'Upload failed',
save: 'Save failed, please try again', save: 'Save failed, please try again',
create: 'Creation failed, please try again', create: 'Creation failed, please try again',
delete: 'Deletion failed, please try again' delete: 'Deletion failed, please try again',
}, },
loading: { loading: {
general: 'Loading...', general: 'Loading...',
saving: 'Saving...', saving: 'Saving...',
creating: 'Creating...', creating: 'Creating...',
deleting: 'Deleting...', deleting: 'Deleting...',
uploading: 'Uploading...' uploading: 'Uploading...',
}, },
confirmation: { confirmation: {
delete: 'Are you sure you want to delete this item?', delete: 'Are you sure you want to delete this item?',
unsavedChanges: 'You have unsaved changes. Are you sure you want to leave?', unsavedChanges: 'You have unsaved changes. Are you sure you want to leave?',
irreversible: 'This operation cannot be undone. Please proceed with caution.' irreversible: 'This operation cannot be undone. Please proceed with caution.',
}, },
dialogs: { dialogs: {
deleteConfirmation: 'Delete Confirmation' deleteConfirmation: 'Delete Confirmation',
}, },
deleteWarning: 'This action cannot be undone. Deleted data cannot be recovered.' deleteWarning: 'This action cannot be undone. Deleted data cannot be recovered.',
} }
...@@ -10,5 +10,5 @@ export default { ...@@ -10,5 +10,5 @@ export default {
rejected: 'Rejected', rejected: 'Rejected',
completed: 'Completed', completed: 'Completed',
inProgress: 'In Progress', inProgress: 'In Progress',
cancelled: 'Cancelled' cancelled: 'Cancelled',
} }
...@@ -5,16 +5,16 @@ export default { ...@@ -5,16 +5,16 @@ export default {
noDataText: 'No data available', noDataText: 'No data available',
loadingText: 'Loading items...', loadingText: 'Loading items...',
pageText: '{0}-{1} of {2}', pageText: '{0}-{1} of {2}',
rowsPerPageText: 'Rows per page:' rowsPerPageText: 'Rows per page:',
}, },
actions: { actions: {
edit: 'Edit', edit: 'Edit',
delete: 'Delete', delete: 'Delete',
view: 'View' view: 'View',
}, },
filter: { filter: {
search: 'Search', search: 'Search',
clear: 'Clear', clear: 'Clear',
apply: 'Apply' apply: 'Apply',
} },
} }
...@@ -9,5 +9,5 @@ export default { ...@@ -9,5 +9,5 @@ export default {
fileType: 'Please select a valid file type', fileType: 'Please select a valid file type',
imageFile: 'Please select an image file', imageFile: 'Please select an image file',
passwordMatch: 'Passwords do not match', passwordMatch: 'Passwords do not match',
uniqueValue: 'This value already exists' uniqueValue: 'This value already exists',
} }
...@@ -2,25 +2,25 @@ export default { ...@@ -2,25 +2,25 @@ export default {
title: 'Student Management System', title: 'Student Management System',
search: { search: {
placeholder: 'Search...', placeholder: 'Search...',
button: 'Search' button: 'Search',
}, },
notifications: { notifications: {
button: 'Notifications', button: 'Notifications',
empty: 'No notifications', empty: 'No notifications',
title: 'Notifications' title: 'Notifications',
}, },
moreMenu: 'More', moreMenu: 'More',
user: { user: {
menu: 'User menu', menu: 'User menu',
profile: 'Profile', profile: 'Profile',
settings: 'Settings', settings: 'Settings',
logout: 'Logout' logout: 'Logout',
}, },
// 登出对话框 // 登出对话框
logoutDialog: { logoutDialog: {
title: 'Confirm Logout', title: 'Confirm Logout',
message: 'Are you sure you want to logout?', message: 'Are you sure you want to logout?',
confirm: 'Confirm', confirm: 'Confirm',
cancel: 'Cancel' cancel: 'Cancel',
} },
} }
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
messages, messages,
status, status,
validation, validation,
table table,
}, },
student, student,
subject, subject,
...@@ -32,6 +32,6 @@ export default { ...@@ -32,6 +32,6 @@ export default {
navigation, navigation,
settings, settings,
components: { components: {
appHeader appHeader,
} },
} }
export default { export default {
login: { login: {
title: 'Welcome!', title: 'Welcome!',
description: 'Welcome to the Student Management System! This system is a one-stop service platform for tracking student courses, assignments, and exams. Please log in to use all features.', description:
'Welcome to the Student Management System! This system is a one-stop service platform for tracking student courses, assignments, and exams. Please log in to use all features.',
form: { form: {
username: 'Username', username: 'Username',
password: 'Password', password: 'Password',
rememberMe: 'Remember me', rememberMe: 'Remember me',
forgotPassword: 'Forgot password?' forgotPassword: 'Forgot password?',
}, },
buttons: { buttons: {
signIn: 'Login', signIn: 'Login',
signUp: 'Sign Up' signUp: 'Sign Up',
}, },
messages: { messages: {
success: 'Login successful', success: 'Login successful',
...@@ -18,8 +19,8 @@ export default { ...@@ -18,8 +19,8 @@ export default {
unauthorized: 'Invalid username or password', unauthorized: 'Invalid username or password',
fillRequired: 'Please fill in username and password', fillRequired: 'Please fill in username and password',
loginFailed: 'Login failed', loginFailed: 'Login failed',
loginError: 'An error occurred during login' loginError: 'An error occurred during login',
} },
}, },
profile: { profile: {
...@@ -29,17 +30,17 @@ export default { ...@@ -29,17 +30,17 @@ export default {
displayName: 'Display Name', displayName: 'Display Name',
email: 'Email', email: 'Email',
phone: 'Phone', phone: 'Phone',
bio: 'Bio' bio: 'Bio',
}, },
messages: { messages: {
updateSuccess: 'Profile updated successfully', updateSuccess: 'Profile updated successfully',
updateError: 'Failed to update profile' updateError: 'Failed to update profile',
} },
}, },
logout: { logout: {
title: 'Logout', title: 'Logout',
message: 'Are you sure you want to logout?', message: 'Are you sure you want to logout?',
success: 'Logout successful' success: 'Logout successful',
} },
} }
...@@ -2,7 +2,7 @@ export default { ...@@ -2,7 +2,7 @@ export default {
// 抽屉欢迎信息 // 抽屉欢迎信息
welcome: { welcome: {
title: 'Welcome to Students App', title: 'Welcome to Students App',
subtitle: 'powered by vuetify' subtitle: 'powered by vuetify',
}, },
menu: { menu: {
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
tasks: 'Task Management', tasks: 'Task Management',
dashboard: 'Dashboard', dashboard: 'Dashboard',
settings: 'Settings', settings: 'Settings',
about: 'About' about: 'About',
}, },
breadcrumb: { breadcrumb: {
...@@ -28,12 +28,12 @@ export default { ...@@ -28,12 +28,12 @@ export default {
stories: 'Story', stories: 'Story',
tasks: 'Task Management', tasks: 'Task Management',
profile: 'Profile', profile: 'Profile',
settings: 'Settings' settings: 'Settings',
}, },
drawer: { drawer: {
title: 'Navigation', title: 'Navigation',
collapse: 'Collapse menu', collapse: 'Collapse menu',
expand: 'Expand menu' expand: 'Expand menu',
} },
} }
...@@ -9,18 +9,18 @@ export default { ...@@ -9,18 +9,18 @@ export default {
notifications: { label: 'Notifications', description: 'Reminders, alerts, sound' }, notifications: { label: 'Notifications', description: 'Reminders, alerts, sound' },
data: { label: 'Data', description: 'Import, export, cache, reset' }, data: { label: 'Data', description: 'Import, export, cache, reset' },
account: { label: 'Account', description: 'Profile, password, devices' }, account: { label: 'Account', description: 'Profile, password, devices' },
about: { label: 'About', description: 'Version, licenses, acknowledgements' } about: { label: 'About', description: 'Version, licenses, acknowledgements' },
}, },
// 顶部动作 // 顶部动作
actions: { actions: {
reset: 'Reset to defaults', reset: 'Reset to defaults',
save: 'Save changes' save: 'Save changes',
}, },
// 占位说明(各 tab 卡片复用) // 占位说明(各 tab 卡片复用)
placeholders: { placeholders: {
comingSoon: 'This section is not implemented yet (phase-1 skeleton).' comingSoon: 'This section is not implemented yet (phase-1 skeleton).',
}, },
// 各分类的字段(phase-1 仅占位) // 各分类的字段(phase-1 仅占位)
...@@ -32,11 +32,11 @@ export default { ...@@ -32,11 +32,11 @@ export default {
weekStart: 'Week starts on', weekStart: 'Week starts on',
reminderLeadTime: 'Default reminder lead time', reminderLeadTime: 'Default reminder lead time',
exportFormat: 'Default export format', exportFormat: 'Default export format',
autoBackup: 'Auto-backup enabled' autoBackup: 'Auto-backup enabled',
}, },
messages: { messages: {
phase1Hint: 'Skeleton only — values are not persisted yet.', phase1Hint: 'Skeleton only — values are not persisted yet.',
resetConfirm: 'Reset all settings to defaults?' resetConfirm: 'Reset all settings to defaults?',
} },
} }
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
creationDate: 'Creation Date', creationDate: 'Creation Date',
lastUpdatedBy: 'Last Updated By', lastUpdatedBy: 'Last Updated By',
lastUpdateDate: 'Last Update Date', lastUpdateDate: 'Last Update Date',
actions: 'Actions' actions: 'Actions',
}, },
form: { form: {
storyName: 'Story Name', storyName: 'Story Name',
...@@ -20,12 +20,12 @@ export default { ...@@ -20,12 +20,12 @@ export default {
studentId: 'Student', studentId: 'Student',
subjectId: 'Subject', subjectId: 'Subject',
termId: 'Term', termId: 'Term',
trackedFlag: 'Tracked' trackedFlag: 'Tracked',
}, },
dialog: { dialog: {
create: 'Create Story', create: 'Create Story',
edit: 'Edit Story', edit: 'Edit Story',
delete: 'Delete Story' delete: 'Delete Story',
}, },
button: { button: {
create: 'Create Story', create: 'Create Story',
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
delete: 'Delete', delete: 'Delete',
save: 'Save', save: 'Save',
cancel: 'Cancel', cancel: 'Cancel',
confirm: 'Confirm' confirm: 'Confirm',
}, },
message: { message: {
createSuccess: 'Story created successfully', createSuccess: 'Story created successfully',
...@@ -42,25 +42,25 @@ export default { ...@@ -42,25 +42,25 @@ export default {
createError: 'Failed to create story', createError: 'Failed to create story',
updateError: 'Failed to update story', updateError: 'Failed to update story',
deleteError: 'Failed to delete story', deleteError: 'Failed to delete story',
loadError: 'Failed to load stories' loadError: 'Failed to load stories',
}, },
deleteConfirm: { deleteConfirm: {
title: 'Delete Story', title: 'Delete Story',
message: 'Are you sure you want to delete this story?', message: 'Are you sure you want to delete this story?',
description: 'This action cannot be undone.', description: 'This action cannot be undone.',
warning: 'This action cannot be undone. Please proceed with caution.', warning: 'This action cannot be undone. Please proceed with caution.',
storyInfo: '{name}' storyInfo: '{name}',
}, },
validation: { validation: {
storyNameRequired: 'Story name is required', storyNameRequired: 'Story name is required',
studentRequired: 'Student is required', studentRequired: 'Student is required',
subjectRequired: 'Subject is required', subjectRequired: 'Subject is required',
termRequired: 'Term is required' termRequired: 'Term is required',
}, },
status: { status: {
tracked: 'Tracked', tracked: 'Tracked',
notTracked: 'Not Tracked', notTracked: 'Not Tracked',
enabled: 'Enabled', enabled: 'Enabled',
disabled: 'Disabled' disabled: 'Disabled',
} },
} }
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
age: 'Age', age: 'Age',
grade: 'Grade', grade: 'Grade',
enabled: 'Status', enabled: 'Status',
actions: 'Actions' actions: 'Actions',
}, },
// 数据表分页 // 数据表分页
pagination: { pagination: {
...@@ -19,8 +19,8 @@ export default { ...@@ -19,8 +19,8 @@ export default {
itemsPerPageText: '{start}-{end} of {total}', itemsPerPageText: '{start}-{end} of {total}',
pageText: 'Page {page} of {pages}', pageText: 'Page {page} of {pages}',
noDataText: 'No data available', noDataText: 'No data available',
loadingText: 'Loading items...' loadingText: 'Loading items...',
} },
}, },
// 表单字段 // 表单字段
...@@ -33,21 +33,21 @@ export default { ...@@ -33,21 +33,21 @@ export default {
avatar: 'Avatar', avatar: 'Avatar',
namePlaceholder: 'Please enter student name', namePlaceholder: 'Please enter student name',
agePlaceholder: 'Please enter age', agePlaceholder: 'Please enter age',
gradePlaceholder: 'Please enter grade' gradePlaceholder: 'Please enter grade',
}, },
// 对话框标题 // 对话框标题
dialog: { dialog: {
add: 'Add Student', add: 'Add Student',
edit: 'Edit Student Information', edit: 'Edit Student Information',
delete: 'Confirm Delete' delete: 'Confirm Delete',
}, },
// 按钮文本 // 按钮文本
buttons: { buttons: {
addStudent: 'Add Student', addStudent: 'Add Student',
uploadAvatar: 'Upload Avatar', uploadAvatar: 'Upload Avatar',
changeAvatar: 'Change Avatar' changeAvatar: 'Change Avatar',
}, },
// 消息 // 消息
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
createError: 'Creation failed, please try again', createError: 'Creation failed, please try again',
updateError: 'Save failed, please try again', updateError: 'Save failed, please try again',
deleteError: 'Deletion failed, please try again', deleteError: 'Deletion failed, please try again',
loadError: 'Failed to load students' loadError: 'Failed to load students',
}, },
// 删除确认 // 删除确认
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
title: 'Confirm Delete', title: 'Confirm Delete',
message: 'Are you sure you want to delete this student?', message: 'Are you sure you want to delete this student?',
warning: 'This operation cannot be undone. Please proceed with caution.', warning: 'This operation cannot be undone. Please proceed with caution.',
studentInfo: '{name} | {age} years old | {grade}' studentInfo: '{name} | {age} years old | {grade}',
}, },
// 头像上传 // 头像上传
...@@ -80,12 +80,12 @@ export default { ...@@ -80,12 +80,12 @@ export default {
sizeLimit: 'File size up to 2MB', sizeLimit: 'File size up to 2MB',
selectImage: 'Please select an image file', selectImage: 'Please select an image file',
sizeExceeded: 'File size cannot exceed 2MB', sizeExceeded: 'File size cannot exceed 2MB',
readError: 'File reading failed, please try again' readError: 'File reading failed, please try again',
}, },
fallback: { fallback: {
alt: 'avatar', alt: 'avatar',
placeholder: 'No Avatar' placeholder: 'No Avatar',
} },
}, },
// 滑块图标:替换 TaskView 编辑对话框里完成度 v-slider 的拖动按钮 // 滑块图标:替换 TaskView 编辑对话框里完成度 v-slider 的拖动按钮
...@@ -97,14 +97,14 @@ export default { ...@@ -97,14 +97,14 @@ export default {
hint: 'Replaces the drag handle on the completion slider inside the task edit dialog. Use a transparent or high-contrast image, up to 2 MB.', hint: 'Replaces the drag handle on the completion slider inside the task edit dialog. Use a transparent or high-contrast image, up to 2 MB.',
selectImage: 'Please select an image file', selectImage: 'Please select an image file',
sizeExceeded: 'File size cannot exceed 2MB', sizeExceeded: 'File size cannot exceed 2MB',
readError: 'File reading failed, please try again' readError: 'File reading failed, please try again',
}, },
previewAlt: 'slider icon preview' previewAlt: 'slider icon preview',
}, },
// 验证消息 // 验证消息
validation: { validation: {
nameRequired: 'Name is required', nameRequired: 'Name is required',
enabledRequired: 'Status is required' enabledRequired: 'Status is required',
} },
} }
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
primary_flag: 'Primary Subject', primary_flag: 'Primary Subject',
calendar_color: 'Calendar Color', calendar_color: 'Calendar Color',
sort_sequence: 'Sort Order', sort_sequence: 'Sort Order',
actions: 'Actions' actions: 'Actions',
}, },
// Data table pagination // Data table pagination
pagination: { pagination: {
...@@ -19,8 +19,8 @@ export default { ...@@ -19,8 +19,8 @@ export default {
itemsPerPageText: '{start}-{end} of {total}', itemsPerPageText: '{start}-{end} of {total}',
pageText: 'Page {page} of {pages}', pageText: 'Page {page} of {pages}',
noDataText: 'No data available', noDataText: 'No data available',
loadingText: 'Loading items...' loadingText: 'Loading items...',
} },
}, },
// Form fields // Form fields
...@@ -32,19 +32,19 @@ export default { ...@@ -32,19 +32,19 @@ export default {
sort_sequence: 'Sort Order', sort_sequence: 'Sort Order',
subject_namePlaceholder: 'Enter subject name', subject_namePlaceholder: 'Enter subject name',
sort_sequencePlaceholder: 'Enter sort order number', sort_sequencePlaceholder: 'Enter sort order number',
calendar_colorPlaceholder: 'Select calendar color' calendar_colorPlaceholder: 'Select calendar color',
}, },
// Dialog titles // Dialog titles
dialog: { dialog: {
add: 'Add Subject', add: 'Add Subject',
edit: 'Edit Subject Information', edit: 'Edit Subject Information',
delete: 'Confirm Delete' delete: 'Confirm Delete',
}, },
// Button text // Button text
buttons: { buttons: {
addSubject: 'Add Subject' addSubject: 'Add Subject',
}, },
// Messages // Messages
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
createError: 'Creation failed, please try again', createError: 'Creation failed, please try again',
updateError: 'Save failed, please try again', updateError: 'Save failed, please try again',
deleteError: 'Delete failed, please try again', deleteError: 'Delete failed, please try again',
loadError: 'Failed to load subject list' loadError: 'Failed to load subject list',
}, },
// Delete confirmation // Delete confirmation
...@@ -63,13 +63,13 @@ export default { ...@@ -63,13 +63,13 @@ export default {
title: 'Confirm Delete', title: 'Confirm Delete',
message: 'Are you sure you want to delete this subject?', message: 'Are you sure you want to delete this subject?',
warning: 'This action cannot be undone, please proceed with caution.', warning: 'This action cannot be undone, please proceed with caution.',
subjectInfo: '{name} | Sort: {sort}' subjectInfo: '{name} | Sort: {sort}',
}, },
// Validation messages // Validation messages
validation: { validation: {
subjectNameRequired: 'Subject name is required', subjectNameRequired: 'Subject name is required',
enabledFlagRequired: 'Status is required' enabledFlagRequired: 'Status is required',
}, },
// Status display // Status display
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
enabled: 'Enabled', enabled: 'Enabled',
disabled: 'Disabled', disabled: 'Disabled',
primary: 'Primary', primary: 'Primary',
notPrimary: 'Regular' notPrimary: 'Regular',
}, },
// Calendar color options // Calendar color options
...@@ -112,6 +112,6 @@ export default { ...@@ -112,6 +112,6 @@ export default {
'color-amber': 'Amber', 'color-amber': 'Amber',
'color-deeporange': 'Deep Orange', 'color-deeporange': 'Deep Orange',
'color-silver': 'Silver', 'color-silver': 'Silver',
'color-bluesky': 'Blue Sky' 'color-bluesky': 'Blue Sky',
} },
} }
...@@ -5,25 +5,25 @@ export default { ...@@ -5,25 +5,25 @@ export default {
viewTypes: { viewTypes: {
month: 'Month View', month: 'Month View',
week: 'Week View', week: 'Week View',
day: 'Day View' day: 'Day View',
}, },
navigation: { navigation: {
today: 'Today', today: 'Today',
previous: 'Previous', previous: 'Previous',
next: 'Next' next: 'Next',
}, },
noEvents: 'No tasks this month', noEvents: 'No tasks this month',
enterFullscreen: 'Enter Fullscreen', enterFullscreen: 'Enter Fullscreen',
exitFullscreen: 'Exit Fullscreen', exitFullscreen: 'Exit Fullscreen',
tooltip: { tooltip: {
progress: 'Progress: {percent}%' progress: 'Progress: {percent}%',
}, },
buttonText: { buttonText: {
today: 'Today', today: 'Today',
month: 'Month', month: 'Month',
week: 'Week', week: 'Week',
day: 'Day' day: 'Day',
} },
}, },
task: { task: {
name: 'Task Name', name: 'Task Name',
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
status: { status: {
notStarted: 'Not Started', notStarted: 'Not Started',
inProgress: 'In Progress', inProgress: 'In Progress',
completed: 'Completed' completed: 'Completed',
}, },
images: 'Task Images', images: 'Task Images',
image: 'Image', image: 'Image',
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
addImage: 'Add Image', addImage: 'Add Image',
pendingUpload: 'Pending upload', pendingUpload: 'Pending upload',
cancelPendingImage: 'Cancel this upload', cancelPendingImage: 'Cancel this upload',
undoDeleteImage: 'Undo delete' undoDeleteImage: 'Undo delete',
}, },
filters: { filters: {
title: 'Filters', title: 'Filters',
...@@ -65,18 +65,18 @@ export default { ...@@ -65,18 +65,18 @@ export default {
selectTermFirst: 'Please select a term first', selectTermFirst: 'Please select a term first',
expand: 'Expand Filter Panel', expand: 'Expand Filter Panel',
collapse: 'Collapse Filter Panel', collapse: 'Collapse Filter Panel',
expandToReselect: 'Click to Expand and Reselect' expandToReselect: 'Click to Expand and Reselect',
}, },
edit: { edit: {
title: 'Edit Task', title: 'Edit Task',
createTitle: 'Create New Task' createTitle: 'Create New Task',
}, },
dialog: { dialog: {
delete: 'Delete Confirmation' delete: 'Delete Confirmation',
}, },
deleteConfirmation: { deleteConfirmation: {
message: 'Are you sure you want to delete this task? This action cannot be undone.', message: 'Are you sure you want to delete this task? This action cannot be undone.',
warning: 'This action is irreversible.' warning: 'This action is irreversible.',
}, },
messages: { messages: {
loadError: 'Failed to load task data', loadError: 'Failed to load task data',
...@@ -89,8 +89,9 @@ export default { ...@@ -89,8 +89,9 @@ export default {
deleteError: 'Failed to delete task', deleteError: 'Failed to delete task',
deleteConfirmation: 'Are you sure you want to delete this task? This action cannot be undone.', deleteConfirmation: 'Are you sure you want to delete this task? This action cannot be undone.',
// spec 0004: image sub-resource commit partial / full failure // spec 0004: image sub-resource commit partial / full failure
imagePartialFailure: 'Image upload partially succeeded: {uploaded} uploaded, {failed} failed. Please retry.', imagePartialFailure:
imageCommitError: 'Image save failed. Please retry.' 'Image upload partially succeeded: {uploaded} uploaded, {failed} failed. Please retry.',
imageCommitError: 'Image save failed. Please retry.',
}, },
validation: { validation: {
nameRequired: 'Task name is required', nameRequired: 'Task name is required',
...@@ -102,6 +103,6 @@ export default { ...@@ -102,6 +103,6 @@ export default {
startDateRequired: 'Please select a start date', startDateRequired: 'Please select a start date',
endDateRequired: 'Please select an end date', endDateRequired: 'Please select an end date',
// spec 0004: soft cap of 20 images // spec 0004: soft cap of 20 images
imageLimitReached: 'Each task can hold at most 20 images. Please delete some images first.' imageLimitReached: 'Each task can hold at most 20 images. Please delete some images first.',
} },
} }
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
studentName: 'Student Name', studentName: 'Student Name',
startDate: 'Start Date', startDate: 'Start Date',
endDate: 'End Date', endDate: 'End Date',
actions: 'Actions' actions: 'Actions',
}, },
// Data table pagination // Data table pagination
pagination: { pagination: {
...@@ -18,8 +18,8 @@ export default { ...@@ -18,8 +18,8 @@ export default {
itemsPerPageText: '{start}-{end} of {total}', itemsPerPageText: '{start}-{end} of {total}',
pageText: 'Page {page} of {pages}', pageText: 'Page {page} of {pages}',
noDataText: 'No data available', noDataText: 'No data available',
loadingText: 'Loading...' loadingText: 'Loading...',
} },
}, },
// Form fields // Form fields
...@@ -29,19 +29,19 @@ export default { ...@@ -29,19 +29,19 @@ export default {
startDate: 'Start Date', startDate: 'Start Date',
endDate: 'End Date', endDate: 'End Date',
termNamePlaceholder: 'Enter term name', termNamePlaceholder: 'Enter term name',
studentPlaceholder: 'Select a student' studentPlaceholder: 'Select a student',
}, },
// Dialog titles // Dialog titles
dialog: { dialog: {
add: 'Add Term', add: 'Add Term',
edit: 'Edit Term Information', edit: 'Edit Term Information',
delete: 'Confirm Deletion' delete: 'Confirm Deletion',
}, },
// Button text // Button text
buttons: { buttons: {
addTerm: 'Add Term' addTerm: 'Add Term',
}, },
// Messages // Messages
...@@ -53,14 +53,14 @@ export default { ...@@ -53,14 +53,14 @@ export default {
updateError: 'Save failed, please try again', updateError: 'Save failed, please try again',
deleteError: 'Deletion failed, please try again', deleteError: 'Deletion failed, please try again',
loadError: 'Failed to load term list', loadError: 'Failed to load term list',
unknownStudent: 'Unknown Student' unknownStudent: 'Unknown Student',
}, },
// Delete confirmation // Delete confirmation
deleteConfirmation: { deleteConfirmation: {
title: 'Confirm Deletion', title: 'Confirm Deletion',
message: 'Are you sure you want to delete this term?', message: 'Are you sure you want to delete this term?',
warning: 'This action cannot be undone. Please proceed with caution.' warning: 'This action cannot be undone. Please proceed with caution.',
}, },
// Validation messages // Validation messages
...@@ -68,6 +68,6 @@ export default { ...@@ -68,6 +68,6 @@ export default {
studentRequired: 'Student is required', studentRequired: 'Student is required',
termNameRequired: 'Term name is required', termNameRequired: 'Term name is required',
startDateRequired: 'Start date is required', startDateRequired: 'Start date is required',
endDateRequired: 'End date is required' endDateRequired: 'End date is required',
} },
} }
...@@ -8,13 +8,13 @@ const defaultLocale = 'en' ...@@ -8,13 +8,13 @@ const defaultLocale = 'en'
// 支持的语言列表 // 支持的语言列表
export const supportedLocales = [ export const supportedLocales = [
{ code: 'en', name: 'English' }, { code: 'en', name: 'English' },
{ code: 'zh-CN', name: '中文' } { code: 'zh-CN', name: '中文' },
] ]
// 从localStorage获取用户偏好语言 // 从localStorage获取用户偏好语言
function getStoredLocale() { function getStoredLocale() {
const stored = localStorage.getItem('preferred-locale') const stored = localStorage.getItem('preferred-locale')
if (stored && supportedLocales.some(locale => locale.code === stored)) { if (stored && supportedLocales.some((locale) => locale.code === stored)) {
return stored return stored
} }
return null return null
...@@ -26,14 +26,14 @@ function getBrowserLocale() { ...@@ -26,14 +26,14 @@ function getBrowserLocale() {
const browserLocale = navigator.language || navigator.userLanguage || defaultLocale const browserLocale = navigator.language || navigator.userLanguage || defaultLocale
// 检查是否直接支持 // 检查是否直接支持
if (supportedLocales.some(locale => locale.code === browserLocale)) { if (supportedLocales.some((locale) => locale.code === browserLocale)) {
return browserLocale return browserLocale
} }
// 检查是否支持语言的主要部分(如 zh-CN -> zh) // 检查是否支持语言的主要部分(如 zh-CN -> zh)
const primaryLanguage = browserLocale.split('-')[0] const primaryLanguage = browserLocale.split('-')[0]
const matchedLocale = supportedLocales.find(locale => const matchedLocale = supportedLocales.find(
locale.code.split('-')[0] === primaryLanguage (locale) => locale.code.split('-')[0] === primaryLanguage,
) )
return matchedLocale?.code || defaultLocale return matchedLocale?.code || defaultLocale
...@@ -49,7 +49,7 @@ const i18n = createI18n({ ...@@ -49,7 +49,7 @@ const i18n = createI18n({
fallbackLocale: defaultLocale, fallbackLocale: defaultLocale,
messages: { messages: {
en, en,
'zh-CN': zhCN 'zh-CN': zhCN,
}, },
// 全局注入属性 // 全局注入属性
globalInjection: true, globalInjection: true,
...@@ -57,12 +57,12 @@ const i18n = createI18n({ ...@@ -57,12 +57,12 @@ const i18n = createI18n({
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
silentTranslationWarn: process.env.NODE_ENV === 'production', silentTranslationWarn: process.env.NODE_ENV === 'production',
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
silentFallbackWarn: process.env.NODE_ENV === 'production' silentFallbackWarn: process.env.NODE_ENV === 'production',
}) })
// 语言切换函数 // 语言切换函数
export function setLocale(locale) { export function setLocale(locale) {
if (supportedLocales.some(l => l.code === locale)) { if (supportedLocales.some((l) => l.code === locale)) {
i18n.global.locale.value = locale i18n.global.locale.value = locale
localStorage.setItem('preferred-locale', locale) localStorage.setItem('preferred-locale', locale)
// 设置HTML lang属性 // 设置HTML lang属性
......
...@@ -13,5 +13,5 @@ export default { ...@@ -13,5 +13,5 @@ export default {
close: '关闭', close: '关闭',
ok: '确定', ok: '确定',
yes: '', yes: '',
no: '' no: '',
} }
...@@ -4,7 +4,7 @@ export default { ...@@ -4,7 +4,7 @@ export default {
create: '创建成功', create: '创建成功',
update: '更新成功', update: '更新成功',
delete: '删除成功', delete: '删除成功',
upload: '上传成功' upload: '上传成功',
}, },
error: { error: {
general: '发生错误,请重试', general: '发生错误,请重试',
...@@ -15,22 +15,22 @@ export default { ...@@ -15,22 +15,22 @@ export default {
upload: '上传失败', upload: '上传失败',
save: '保存失败,请重试', save: '保存失败,请重试',
create: '创建失败,请重试', create: '创建失败,请重试',
delete: '删除失败,请重试' delete: '删除失败,请重试',
}, },
loading: { loading: {
general: '加载中...', general: '加载中...',
saving: '保存中...', saving: '保存中...',
creating: '创建中...', creating: '创建中...',
deleting: '删除中...', deleting: '删除中...',
uploading: '上传中...' uploading: '上传中...',
}, },
confirmation: { confirmation: {
delete: '确定要删除此项吗?', delete: '确定要删除此项吗?',
unsavedChanges: '您有未保存的更改,确定要离开吗?', unsavedChanges: '您有未保存的更改,确定要离开吗?',
irreversible: '此操作无法撤销,请谨慎操作。' irreversible: '此操作无法撤销,请谨慎操作。',
}, },
dialogs: { dialogs: {
deleteConfirmation: '删除确认' deleteConfirmation: '删除确认',
}, },
deleteWarning: '此操作无法撤销,删除后数据将无法恢复。' deleteWarning: '此操作无法撤销,删除后数据将无法恢复。',
} }
...@@ -10,5 +10,5 @@ export default { ...@@ -10,5 +10,5 @@ export default {
rejected: '已拒绝', rejected: '已拒绝',
completed: '已完成', completed: '已完成',
inProgress: '进行中', inProgress: '进行中',
cancelled: '已取消' cancelled: '已取消',
} }
...@@ -5,16 +5,16 @@ export default { ...@@ -5,16 +5,16 @@ export default {
noDataText: '暂无数据', noDataText: '暂无数据',
loadingText: '加载中...', loadingText: '加载中...',
pageText: '{0}-{1} 共 {2}', pageText: '{0}-{1} 共 {2}',
rowsPerPageText: '每页行数:' rowsPerPageText: '每页行数:',
}, },
actions: { actions: {
edit: '编辑', edit: '编辑',
delete: '删除', delete: '删除',
view: '查看' view: '查看',
}, },
filter: { filter: {
search: '搜索', search: '搜索',
clear: '清除', clear: '清除',
apply: '应用' apply: '应用',
} },
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment