Feature action (#149)

* ci: 👷 整合github action配置文件

* docs: 📝 贡献文档修改

* style: 💄 更新版本

* style: 💄 cargo.lock版本更新

* feat(husky): 增强Git标签版本校验脚本

添加了对Git标签指向提交与release分支一致性的校验功能。
脚本现在会检查tag指向的提交是否与当前或任何release分支的最新提交一致,
确保发布流程的准确性。如果当前在release分支上,直接比较分支HEAD与tag指向的提交;
如果不在release分支上,则遍历所有release分支查找匹配的提交。

* feat:  国际化
This commit is contained in:
LOG1997
2025-12-30 14:34:56 +08:00
committed by GitHub
parent 8f0c3848d0
commit 80aacffe07
34 changed files with 920 additions and 666 deletions

View File

@@ -0,0 +1,63 @@
export const buttonEn = {
enterLottery: 'Enter Lottery',
start: 'Start',
selectLucky: 'Draw the Lucky',
continue: 'Continue',
confirm: 'Confirm',
cancel: 'Cancel',
setting: 'Setting',
delete: 'Delete',
allDelete: 'Delete All',
downloadTemplate: 'Download Template',
importData: 'Import Data',
resetData: 'Reset Data',
exportResult: 'Export Result',
add: 'Add',
resetDefault: 'Reset Default',
resetAllData: 'Reset All Data',
clearPattern: 'Clear Pattern',
DefaultPattern: 'Default Pattern',
upload: 'Upload',
reset: 'Reset',
play: 'Play',
setLayout: 'Set Layout',
close: 'Close',
noInfoAndImport: 'No Info and import it',
useDefault: 'Use Default Data',
loading: 'Loading...',
}
export const buttonZhCn = {
enterLottery: '进入抽奖',
start: '开始',
selectLucky: '抽取幸运儿',
continue: '继续',
confirm: '确认',
cancel: '取消',
setting: '设置',
delete: '删除',
allDelete: '删除全部',
downloadTemplate: '下载模板',
importData: '导入数据',
resetData: '重置数据',
exportResult: '导出结果',
add: '添加',
resetDefault: '重置为默认',
resetAllData: '重置所有数据',
clearPattern: '清除图案',
DefaultPattern: '默认图案',
upload: '上传',
reset: '重置',
play: '播放',
setLayout: '重设布局',
close: '关闭',
noInfoAndImport: '暂无人员信息,前往导入',
useDefault: '使用默认数据',
loading: '加载中...',
}
// 导出一个值
export const button = {
en: buttonEn,
zhCn: buttonZhCn,
}

View File

@@ -0,0 +1,42 @@
export const dataEn = {
yes: 'Yes',
no: 'No',
number: 'Number',
isWin: 'isWin',
avatar: 'avatar',
department: 'Department',
name: 'Name',
identity: 'Identity',
prizeName: 'Prize Name',
prizeTime: 'Prize Time',
operation: 'Operation',
delete: 'Delete',
removePerson: 'Remove the Person',
defaultTitle: 'The Prelude to the Six Ministries of the Ming Dynasty Cabinet',
xlsxName: 'personListTemplate-en.xlsx',
readmeName: 'readme-en.md',
}
export const dataZhCn = {
yes: '是',
no: '否',
number: '编号',
isWin: '是否中奖',
avatar: '头像',
department: '部门',
name: '姓名',
identity: '身份',
prizeName: '获奖',
prizeTime: '获奖时间',
operation: '操作',
delete: '删除',
removePerson: '移入未中奖名单',
defaultTitle: '大明内阁六部御前奏对',
xlsxName: '人口登记表-zhCn.xlsx',
readmeName: 'readme-zhCn.md',
}
export const data = {
en: dataEn,
zhCn: dataZhCn,
}

View File

@@ -0,0 +1,34 @@
export const dialogEn = {
titleTip: 'Tip!',
titleTemporary: 'Add Temporary Activity',
dialogPCWeb: 'Please use a PC browser to access for optimal display performance',
dialogDelAllPerson: 'This operation will delete all personnel list data. Do you want to continue?',
dialogResetWinner: 'This operation will clear the winning information of personnel. Do you want to continue?',
dialogResetAllData: 'This operation will reset all data. Do you want to continue?',
dialogSingleDrawLimit: 'Only 10 characters can be extracted in a single draw',
dialogLatestBrowser: 'Please use the latest version of Chrome or Edge browser',
tipResetPrize: 'Performing operations may reset data and cant recover, please proceed with caution',
uploadFileTitle: 'Upload File',
uploadImageTitle: 'Upload Image',
uploadAudioTitle: 'Upload Audio',
}
export const dialogZhCn = {
titleTip: '提示!',
titleTemporary: '增加临时抽奖',
dialogPCWeb: '请使用PC进行访问以获得最佳显示效果',
dialogDelAllPerson: '该操作会删除所有人员数据,是否继续?',
dialogResetWinner: '该操作会清空人员中奖信息,是否继续?',
dialogResetAllData: '该操作会重置所有数据,是否继续?',
dialogSingleDrawLimit: '单次抽取只能抽取10位',
dialogLatestBrowser: '请使用最新版Chrome或者Edge浏览器',
tipResetPrize: '进行操作可能会重置数据并不可恢复,请谨慎操作',
uploadFileTitle: '上传文件',
uploadImageTitle: '上传图片',
uploadAudioTitle: '上传音频',
}
export const dialog = {
en: dialogEn,
zhCn: dialogZhCn,
}

View File

@@ -0,0 +1,60 @@
import { success } from 'zod'
export const errorEn = {
require: 'required field',
requireNumber: 'please enter a number',
minNumber1: 'the minimum is 1',
maxNumber100: 'the maximum is 100',
uploadSuccess: 'Upload Success',
uploadFail: 'Upload Failed',
notImage: 'Not Image',
personIsAllDone: 'All Person Is Done',
personNotEnough: 'Person Is Not Enough',
startDraw: 'Now Draw {count} {leftover} people',
completeInformation: 'Please provide complete information',
notJsonFile: 'it isn\'t a JSON file',
notAudioFile: 'it isn\'t an audio file',
personNameEmpty: 'Please enter name',
excelFileError: 'The header is inconsistent, please download the template, modify it, and then upload it',
exportSuccess: 'Export Success',
exportFail: 'Export Failed',
importSuccess: 'Import Success',
importFail: 'Import Failed',
downloadSuccess: '下载成功',
deleteSuccess: '删除成功',
deleteFail: '删除失败',
success: 'Success',
fail: 'Failed',
}
export const errorZhCn = {
require: '必填项',
requireNumber: '请输入数字',
minNumber1: '最小为1',
maxNumber100: '最大为100',
uploadSuccess: '上传成功',
uploadFail: '上传失败',
notImage: '不是图片',
personIsAllDone: '抽奖抽完了',
personNotEnough: '抽奖人数不足',
startDraw: '现在抽取{count}{leftover}人',
completeInformation: '请填写完整信息',
notJsonFile: '这不是一个JSON文件',
notAudioFile: '这不是一个音频文件',
personNameEmpty: '请填写姓名',
excelFileError: '表头不一致,请先下载模板然后修改后再上传',
exportSuccess: '导出成功',
exportFail: '导出失败',
importSuccess: '导入成功',
importFail: '导入失败',
downloadSuccess: '下载成功',
deleteSuccess: '删除成功',
deleteFail: '删除失败',
success: '成功',
fail: '失败',
}
export const error = {
en: errorEn,
zhCn: errorZhCn,
}

View File

@@ -0,0 +1,14 @@
export const footerEn = {
'self-reflection': 'Turn inward and examine yourself when you encounter difficulties in life.',
'thiefEasy': 'Thief difficult mountain thief easily, breaking heart.',
}
export const footerZhCn = {
'self-reflection': '行有不得,反求诸己',
'thiefEasy': '破山中贼易,破心中贼难',
}
export const footer = {
en: footerEn,
zhCn: footerZhCn,
}

View File

@@ -0,0 +1,11 @@
// 导出该文件夹下的内容
export * from './button'
export * from './data'
export * from './dialog'
export * from './error'
export * from './footer'
export * from './placeHolder'
export * from './sidebar'
export * from './table'
export * from './tooltip'
export * from './viewTitle'

View File

@@ -0,0 +1,24 @@
export const placeHolderEn = {
enterTitle: 'Enter Title',
name: 'Name',
winnerCount: 'Lucky Person Count',
selectFont: 'Select Font',
timedStop: 'will stop at a scheduled time after starting',
imageName: 'Image Name',
personName: 'Please enter name',
}
export const placeHolderZhCn = {
enterTitle: '输入标题',
name: '名称',
winnerCount: '中奖人数',
selectFont: '选择字体',
timedStop: '开始后定时抽取',
imageName: '图片名称',
personName: '请填写姓名',
}
export const placeHolder = {
en: placeHolderEn,
zhCn: placeHolderZhCn,
}

View File

@@ -0,0 +1,28 @@
export const sidebarEn = {
personConfiguration: 'Person Configuration',
personList: 'Person List',
winnerList: 'Winner List',
prizeConfiguration: 'Prize Configuration',
globalSetting: 'Global Configuration',
viewSetting: 'View Setting',
imagesManagement: 'Images Management',
musicManagement: 'Music Management',
operatingInstructions: 'Operating Instructions',
}
export const sidebarZhCn = {
personConfiguration: '人员配置',
personList: '人员列表',
winnerList: '中奖人员',
prizeConfiguration: '奖品配置',
globalSetting: '全局配置',
viewSetting: '界面设置',
imagesManagement: '图片管理',
musicManagement: '音乐管理',
operatingInstructions: '操作说明',
}
export const sidebar = {
en: sidebarEn,
zhCn: sidebarZhCn,
}

View File

@@ -0,0 +1,104 @@
import { reset } from 'canvas-confetti'
import { time } from 'zod/v4/core/regexes.cjs'
export const tableEn = {
// field block name
abilitySetting: 'Ability Setting',
dataSetting: 'Data Setting',
layoutSetting: 'Layout Setting',
patternSetting: 'Pattern Setting',
textSetting: 'Text Setting',
themeSetting: 'Theme Setting',
// person configuration
number: 'Number',
name: 'Name',
prizeName: 'Name',
department: 'Department',
identity: 'Identity',
isLucky: 'Is Lucky',
operation: 'Operation',
setLuckyNumber: 'Set Lucky Number',
luckyPeopleNumber: 'Lucky People Number',
detail: 'Detail',
noneData: 'No Data',
// prize configuration
fullParticipation: 'FullParticipation',
numberParticipants: 'NumberParticipants',
isDone: 'is Done',
image: 'Image',
onceNumber: 'Once Number',
time: 'Time',
// view setting
title: 'Main Title',
columnNumber: 'Column Number',
theme: 'Theme',
language: 'Language',
cardColor: 'Card Color',
winnerColor: 'Winner Color',
textColor: 'Text Color',
cardWidth: 'Card Width',
cardHeight: 'Card Height',
textSize: 'Text Size',
highlightColor: 'HighLight Color',
alwaysDisplay: 'Always Display Prize List',
avatarDisplay: 'Show avatars or not',
selectPicture: 'Select a Picture',
backgroundImage: 'Select Background Image',
timedStop: 'Timed Stop',
playWinMusic: 'Play Win Music',
resetAllData: 'Reset All Data',
}
export const tableZhCn = {
// field block name
abilitySetting: '功能设置',
dataSetting: '数据设置',
layoutSetting: '布局设置',
patternSetting: '图案设置',
textSetting: '文字设置',
themeSetting: '主题设置',
// person configuration
number: '编号',
name: '姓名',
prizeName: '名称',
department: '部门',
identity: '身份',
isLucky: '是否中奖',
operation: '操作',
setLuckyNumber: '设置中奖人数',
luckyPeopleNumber: '中奖人数',
detail: '详细信息',
noneData: '暂无数据',
// prize configuration
fullParticipation: '可重复',
numberParticipants: '抽奖人数',
isDone: '已抽取',
image: '图片',
onceNumber: '单次抽取个数',
time: '时间',
// view setting
title: '主标题',
columnNumber: '列数',
theme: '主题',
language: '语言',
cardColor: '卡片颜色',
winnerColor: '中奖卡片颜色',
textColor: '文字颜色',
cardWidth: '卡片宽度',
cardHeight: '卡片高度',
textSize: '文字大小',
highlightColor: '高亮颜色',
alwaysDisplay: '常显奖项列表',
avatarDisplay: '是否显示头像',
selectPicture: '选择一张图片',
backgroundImage: '选择背景图片',
timedStop: '定时停止',
playWinMusic: '播放中奖音乐',
resetAllData: '重置数据',
}
export const table = {
en: tableEn,
zhCn: tableZhCn,
}

View File

@@ -0,0 +1,44 @@
export const tooltipEn = {
settingConfiguration: 'Setting/Configuration',
nextSong: 'Right Click to Next Song',
noSongPlay: 'No Song to Play',
prizeList: 'Prize List',
addActivity: 'Add Activity',
downloadTemplateTip: 'After downloading the file, please fill in the data in Excel and save it in xlsx format',
uploadExcelTip: 'Upload the modified Excel file',
leftClick: 'Left Click to Slice',
toHome: 'to Home',
resetLayout: 'This item is time-consuming and performance intensive',
defaultLayout: 'The default pattern setting is valid for 17 columns, please set the number of other columns yourself',
doneCount: 'Number of winners',
edit: 'Edit',
delete: 'Delete',
timedStop: 'After the lottery begins, it will stop at a scheduled time by default, set to 0, with the unit in seconds. A value of 0 disables the scheduled stopping function',
uploadImage: 'Upload Image',
pleaseGoto: 'Please go to',
}
export const tooltipZhCn = {
settingConfiguration: '设置/配置',
nextSong: '右键点击下一首',
noSongPlay: '没有音乐可以播放',
prizeList: '奖项列表',
addActivity: '添加抽奖',
downloadTemplateTip: '下载文件后请在excel中填写数据并保存为xlsx格式',
uploadExcelTip: '上传修改好的excel文件',
leftClick: '左键切割',
toHome: '主页',
resetLayout: '该项比较耗费时间和性能',
defaultLayout: '默认图案设置针对17列时有效其他列数请自行设置',
doneCount: '已抽取',
edit: '编辑',
delete: '删除',
timedStop: '开始抽奖过后定时停止默认为0单位为秒0为关闭定时停止功能',
uploadImage: '上传图片',
pleaseGoto: '请先前往',
}
export const tooltip = {
en: tooltipEn,
zhCn: tooltipZhCn,
}

View File

@@ -0,0 +1,20 @@
export const viewTitleEn = {
personManagement: 'Person Management',
winnerManagement: 'Winner Management',
prizeManagement: 'Prize Management',
globalSetting: 'Global Setting',
operatingInstructions: 'Operating Instructions',
}
export const viewTitleZhCn = {
personManagement: '人员管理',
winnerManagement: '已中奖人员管理',
prizeManagement: '奖项配置',
globalSetting: '全局配置',
operatingInstructions: '操作说明',
}
export const viewTitle = {
en: viewTitleEn,
zhCn: viewTitleZhCn,
}