@@ -73,17 +73,17 @@ const handleDefaultModelChange = (item: any) => {
7373 if (current_default_node ?.id === item .id ) {
7474 return
7575 }
76- ElMessageBox .confirm (` 是否设置 ${ item .name } 为系统默认模型? ` , {
76+ ElMessageBox .confirm (t ( ' model.system_default_model ' , { msg: item .name }) , {
7777 confirmButtonType: ' primary' ,
78- tip: ' 系统默认模型被替换后,智能问数的结果将会受到影响,请谨慎操作。 ' ,
78+ tip: t ( ' model.operate_with_caution ' ) ,
7979 confirmButtonText: t (' datasource.confirm' ),
8080 cancelButtonText: t (' common.cancel' ),
8181 customClass: ' confirm-no_icon' ,
8282 autofocus: false ,
8383 callback : (val : string ) => {
8484 if (val === ' confirm' ) {
8585 modelApi .setDefault (item .id ).then (() => {
86- ElMessage .success (' 设置成功 ' )
86+ ElMessage .success (t ( ' model.set_successfully ' ) )
8787 search ()
8888 })
8989 }
@@ -114,12 +114,12 @@ const handleEditModel = (id: any) => {
114114
115115const deleteHandler = (item : any ) => {
116116 if (item .default_model ) {
117- ElMessageBox .confirm (` 无法删除模型:${ item .name }? ` , {
117+ ElMessageBox .confirm (t ( ' model.del_default_tip ' , { msg: item .name }) , {
118118 confirmButtonType: ' primary' ,
119- tip: ' 该模型为系统默认模型,请先设置其他模型为系统默认模型,再删除此模型。 ' ,
119+ tip: t ( ' model.del_default_warn ' ) ,
120120 showConfirmButton: false ,
121- confirmButtonText: ' 确定 ' ,
122- cancelButtonText: ' 知道了 ' ,
121+ confirmButtonText: t ( ' datasource.confirm ' ) ,
122+ cancelButtonText: t ( ' datasource.got_it ' ) ,
123123 customClass: ' confirm-no_icon' ,
124124 autofocus: false ,
125125 callback : (val : string ) => {
@@ -128,18 +128,18 @@ const deleteHandler = (item: any) => {
128128 })
129129 return
130130 }
131- ElMessageBox .confirm (` 是否删除模型:${ item .name }? ` , {
131+ ElMessageBox .confirm (t ( ' model.del_warn_tip ' , { msg: item .name }) , {
132132 confirmButtonType: ' danger' ,
133- confirmButtonText: ' 删除 ' ,
134- cancelButtonText: ' 取消 ' ,
133+ confirmButtonText: t ( ' dashboard.delete ' ) ,
134+ cancelButtonText: t ( ' common.cancel ' ) ,
135135 customClass: ' confirm-no_icon' ,
136136 autofocus: false ,
137137 callback : (value : string ) => {
138138 if (value === ' confirm' ) {
139139 modelApi .delete (item .id ).then (() => {
140140 ElMessage ({
141141 type: ' success' ,
142- message: ' 删除成功 ' ,
142+ message: t ( ' dashboard.delete_success ' ) ,
143143 })
144144 search ()
145145 })
0 commit comments