Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions packages/renderer/src/lang/en_us.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@

const en = {
lang:"English",
usbconfig:{
title:{
button:{
file:"file",
project:"project",
view:"view",
compile:"compile",
help:"help",
about:"about",
lang: "Language",
},
dropdown:{
file0:"Create New File",
file1:"Open a file",
file2:"Close a file",
file3:"Save a file",
file4:"Save As...",
file5:"Save ALL",
file6:"Exit",
project0:"Create a new project",
project1:"Open Project",
project2:"Close Project",
project3:"Save project",
project4:"Save As...",
view0:"Dark mode",
view1:"Light mode",
view2:"High Contrast Dark",
view3:"high Contrast Light",
compile0:"Generate CherryUSB style descriptors",
compile1:"Generate STM32 style descriptors",
compile2:"Generate ESP32 style descriptors",
help0:"Documentation tutorials",
help1:"Video tutorials",
help2:"GITHUB",
about0:"Contact us",
about1:"Donate to us",
about2:"Software Instructions"
},
str_desc: {
add: "Add a string descriptor",
delete:"Delete a string descriptor"
},
conf_desc: {
add: "Add a config descriptor",
delete:"Delete a config descriptor"
},
group_conf: {
add:"Add group config",
delete:"Delete group config"
},
intf_desc: {
add: "Add interface descriptor",
delete: "Delete interface descriptor",
},
alt: {
add: "Add alternate descriptor",
delete: "Delete alternate descriptor",
},
spec: {
delete: "Delete specific descriptor"
},
endpoint: {
add: "Add endpoint descriptor",
delete: "Delete endpoint descriptor"
},
iad: {
add: "",
delete: "Delete intf assoc descriptor"
},
treeselect: "Init project, reset descriptor",
},
file:{
basename:"CherryUSB project file (*.chrybase)",
filename:"CherryUSB description file (*.chry)",
cname:"C name",
savebase:"savebase",
savefile:"savefile",
savec:"save C file",
openbase:"openbas",
openfile:"openfile",
fileok:"fileOK",
filefaild:"fileFAILD",
filecancel:"fileCANCEL",
parseok:"parseOK"
},
jsonerror:{
error0:"syntax error at character [",
error1:"] error type: ",
error2:"",
"0":"Success",
"1":"Invalid identifier",
"2":"Invalid number format",
"3":"Missing attribute name",
"4":"Missing attribute value",
"5":"Missing ':'",
"6":"Misisng ','",
"7":"Misisng '}'",
"8":"Misisng ']'",
"9":"Misisng 'EOF'",
"10":"Illegal comment",
"11":"Extra multi-line comment terminator",
"12":"Extra '\'' or '\"'",
"13":"Extra decimal point",
"14":"Illegal unicode character",
"15":"Illegal escape character",
"16":"Illegal character"
},
group:{
add_iad_desc: "Add IAD",
init_as_msc: "Init as MSC",
init_as_hid: "Init as HID",
init_as_cdc: "Init as CDC ACM",
init_as_uac1: "Init as UAC 1.0",
init_as_uac2: "Init as UAC 2.0",
init_as_uvc: "Init as UVC"
}
},
dialogs: {
buttons: {
ok: "OK",
exit: "Exit",
save_close: "Save and close",
save_close_all: "Save and close all files",
close_no_save: "Close without saving",
close_no_save_all: "Close all files without saving",
cancel: "Cancel",
},
init_project: {
title: "Initialize project",
msg: "Are you sure you want to init project? The descriptor will be reset",
},
unsaved_file: {
title: "Unsaved file",
msg: "Are you sure you want to close the file? You haven't saved it yet...",
},
init_packet_interface: {
title:"Initialize packet interface",
msg: "Initialize as CDC ACM serial communication device.\nA packet file is used to describe a group of functional classes. Do not combine multiple classes in a single packet file.\nAre you sure you want to initialize? The descriptor will be reset.",
},
init_msc: {
title: "Initialize group MSC",
msg: "Initialize to MSC Mass Storage Device. Group files are used to describe a group of functional classes. Do not combine multiple classes into one group file. Are you sure you want to initialize? The descriptors will be reset"
},
init_hid: {
title: "Initialize group HID",
msg: "Initialize to HID Human-Computer Interaction Device. Group files are used to describe a group of functional classes. Do not combine multiple classes into one group file. Are you sure you want to initialize? The descriptors will be reset."
},
close_file: {
title: "Close file",
msg: "Are you sure? file has not been saved. Please choose whether to save"
},
close_project: {
title: "Close project",
msg: "Are you sure? project has not been saved. Please choose whether to save project and all files"
},
exit: {
title: "Close software",
msg: "Are you sure you want to exit?"
},
save_project: {
title: "Save project",
msg: "Select whether to save all project files",
},

}
}

export default en
4 changes: 3 additions & 1 deletion packages/renderer/src/lang/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { createI18n } from 'vue-i18n'

import en_us from './en_us'
import zh_cn from './zh_cn'

const i18n = createI18n({
locale: 'zh-cn',
locale: 'en-us',
fallbackLocale: 'zh-cn',
messages: {
"en-us": en_us,
"zh-cn": zh_cn
}
})
Expand Down
95 changes: 93 additions & 2 deletions packages/renderer/src/lang/zh_cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const zh = {
view:"视图",
compile:"编译",
help:"帮助",
about:"关于"
about:"关于",
lang: "语言",
},
dropdown:{
file0:"新建文件",
Expand Down Expand Up @@ -37,7 +38,39 @@ const zh = {
about0:"联系我们",
about1:"赞助我们",
about2:"软件说明"
}
},
str_desc: {
add: "添加字符串描述符",
delete:"删除字符串描述符"
},
conf_desc: {
add: "添加配置描述符",
delete: "删除配置描述符",
},
group_conf: {
add:"添加分组配置",
delete:"删除分组配置"
},
intf_desc: {
add: "添加接口描述符",
delete: "删除接口描述符",
},
alt: {
add: "添加接口复用描述符",
delete: "删除接口复用描述符",
},
spec: {
delete: "删除特定描述符"
},
endpoint: {
add: "添加端点描述符",
delete: "删除端点描述符"
},
iad: {
add: "",
delete: "删除接口关联描述符"
},
treeselect: "初始化工程, 重置描述符",
},
file:{
basename:"CherryUSB 工程文件",
Expand Down Expand Up @@ -74,8 +107,66 @@ const zh = {
"14":"非法的Unicode字符",
"15":"非法的转义字符",
"16":"非法的字符"
},
group:{
add_iad_desc: "添加 IAD 接口关联描述符",
init_as_msc: "初始化为 MSC",
init_as_hid: "初始化为 HID",
init_as_cdc: "初始化为 CDC ACM",
init_as_uac1: "初始化为 UAC 1.0",
init_as_uac2: "初始化为 UAC 2.0",
init_as_uvc: "初始化为 UVC"
}
},
dialogs: {
buttons: {
ok: "确定",
exit: "退出",
save_close: "保存并关闭",
save_close_all: "保存并关闭所有文件",
close_no_save: "仅关闭不保存",
close_no_save_all: "仅关闭所有文件不保存",
cancel: "取消"
},
init_project: {
title: "初始化工程",
msg: "确定要初始化工程文件吗? 将会重置描述符",
},
unsaved_file: {
title: "初始化工程",
msg: "确定要关闭文件吗? 您还没有保存文件, 请选择是否保存文件",
},
init_packet_interface: {
title:"初始化分组接口",
msg: "初始化为 CDC ACM 串行通信设备\n分组文件用于描述一组功能类, 请勿将多个类合并在一个分组文件中\n确定要初始化吗? 将会重置描述符",
},
init_msc: {
title: "初始化分组接口",
msg: "初始化为 MSC 大容量存储设备\n分组文件用于描述一组功能类, 请勿将多个类合并在一个分组文件中\n确定要初始化吗? 将会重置描述符"
},
init_hid: {
title: "初始化分组接口",
msg: "初始化为 HID 人机交互设备\n分组文件用于描述一组功能类, 请勿将多个类合并在一个分组文件中\n确定要初始化吗? 将会重置描述符"
},
close_file: {
title: "关闭文件",
msg: "确定要关闭文件吗? 您还没有保存文件, 请选择是否保存文件"
},
close_project: {
title: "关闭工程",
msg: "确定要关闭工程吗? 请选择是否保存并关闭所有工程相关文件"
},
exit: {
title: "关闭软件",
msg: "确定要退出软件吗?"
},
save_project: {
title: "保存工程",
msg: "请选择是否保存所有工程相关文件",
},

}

}

export default zh
Loading