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