@@ -66,7 +66,7 @@ export function createCodexConfigMethods(options = {}) {
6666 const maxLabel = res . maxMessages === 'all' ? 'all' : res . maxMessages ;
6767 this . showMessage ( `会话导出完成(已截断:最多 ${ maxLabel } 条消息)` , 'info' ) ;
6868 } else {
69- this . showMessage ( '操作成功' , 'success' ) ;
69+ this . showMessage ( this . t ( 'toast.operation.success' ) , 'success' ) ;
7070 }
7171 } catch ( e ) {
7272 this . showMessage ( '导出失败' , 'error' ) ;
@@ -325,7 +325,7 @@ export function createCodexConfigMethods(options = {}) {
325325 if ( hasResponseError ( res ) ) {
326326 this . healthCheckResult = null ;
327327 if ( ! silent ) {
328- this . showMessage ( getResponseMessage ( res , '检查失败' ) , 'error' ) ;
328+ this . showMessage ( getResponseMessage ( res , this . t ( 'toast.check.fail' ) ) , 'error' ) ;
329329 }
330330 return ;
331331 }
@@ -342,13 +342,13 @@ export function createCodexConfigMethods(options = {}) {
342342 this . healthCheckBatchDone = total ;
343343 this . healthCheckBatchFailed = errors + warns ;
344344 if ( ! silent && res . ok ) {
345- this . showMessage ( '检查通过' , 'success' ) ;
345+ this . showMessage ( this . t ( 'toast.check.success' ) , 'success' ) ;
346346 }
347347 return ;
348348 }
349349 this . healthCheckResult = null ;
350350 if ( ! silent ) {
351- this . showMessage ( '检查失败' , 'error' ) ;
351+ this . showMessage ( this . t ( 'toast.check.fail' ) , 'error' ) ;
352352 }
353353 return ;
354354 }
@@ -473,7 +473,7 @@ export function createCodexConfigMethods(options = {}) {
473473 } else {
474474 this . healthCheckResult = null ;
475475 if ( ! silent ) {
476- this . showMessage ( '检查失败' , 'error' ) ;
476+ this . showMessage ( this . t ( 'toast.check.fail' ) , 'error' ) ;
477477 }
478478 }
479479 } catch ( e ) {
@@ -561,7 +561,7 @@ export function createCodexConfigMethods(options = {}) {
561561 this . configTemplateContext = 'codex' ;
562562 this . showConfigTemplateModal = true ;
563563 } catch ( e ) {
564- this . showMessage ( '加载模板失败' , 'error' ) ;
564+ this . showMessage ( this . t ( 'toast.template.loadFail' ) , 'error' ) ;
565565 }
566566 } ,
567567
@@ -797,7 +797,7 @@ export function createCodexConfigMethods(options = {}) {
797797 return ;
798798 }
799799 if ( ! this . configTemplateContent || ! this . configTemplateContent . trim ( ) ) {
800- this . showMessage ( '模板不能为空' , 'error' ) ;
800+ this . showMessage ( this . t ( 'toast.template.empty' ) , 'error' ) ;
801801 return ;
802802 }
803803
@@ -822,15 +822,15 @@ export function createCodexConfigMethods(options = {}) {
822822 this . showMessage ( res . error , 'error' ) ;
823823 return ;
824824 }
825- this . showMessage ( '模板已应用' , 'success' ) ;
825+ this . showMessage ( this . t ( 'toast.template.applied' ) , 'success' ) ;
826826 this . closeConfigTemplateModal ( { force : true } ) ;
827827 try {
828828 await this . loadAll ( ) ;
829829 } catch ( _ ) {
830- this . showMessage ( '模板已应用,但界面刷新失败,请手动刷新' , 'error' ) ;
830+ this . showMessage ( this . t ( 'toast.template.appliedButRefreshFail' ) , 'error' ) ;
831831 }
832832 } catch ( e ) {
833- this . showMessage ( '应用模板失败' , 'error' ) ;
833+ this . showMessage ( this . t ( 'toast.template.applyFail' ) , 'error' ) ;
834834 } finally {
835835 this . configTemplateApplying = false ;
836836 }
0 commit comments