Skip to content

Commit

Permalink
fix(projects): request modal title use i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jun 21, 2024
1 parent e110dd0 commit f97e74e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/locales/langs/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const local: App.I18n.Schema = {
deleteSuccess: 'Delete Success',
confirmDelete: 'Are you sure you want to delete?',
edit: 'Edit',
error: 'Error',
index: 'Index',
keywordSearch: 'Please enter keyword',
logout: 'Logout',
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/zh-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const local: App.I18n.Schema = {
deleteSuccess: '删除成功',
confirmDelete: '确认删除吗?',
edit: '编辑',
error: '错误',
index: '序号',
keywordSearch: '请输入关键词搜索',
logout: '退出登录',
Expand Down
2 changes: 1 addition & 1 deletion src/service/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt
window.addEventListener('beforeunload', handleLogout);

window.$modal?.error({
title: 'Error',
title: $t('common.error'),
content: response.data.msg,
okText: $t('common.confirm'),
maskClosable: false,
Expand Down
1 change: 1 addition & 0 deletions src/typings/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ declare namespace App {
deleteSuccess: string;
confirmDelete: string;
edit: string;
error: string;
index: string;
keywordSearch: string;
logout: string;
Expand Down

0 comments on commit f97e74e

Please sign in to comment.