Skip to content

Commit

Permalink
fix: 无系统用户提示国际化
Browse files Browse the repository at this point in the history
  • Loading branch information
gerry-f2c authored and BaiJiangJie committed Jan 16, 2023
1 parent 6f61ac2 commit 91820aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/app/elements/connect/connect.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
});
}
if (systemUserMaxPriority.length === 0) {
alert('没有系统用户');
alert(this._i18n.t('No System User'));
return new Promise<ConnectData>((resolve, reject) => {
reject('没有系统用户');
reject(this._i18n.t('No System User'));
});
} else if (systemUserMaxPriority.length > 1) {
return this.getConnectData(systemUserMaxPriority, node);
Expand All @@ -321,9 +321,9 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
const isRemoteApp = node.meta.type === 'application';
const connectTypes = this._appSvc.getProtocolConnectTypes(isRemoteApp)[systemUser.protocol];
if (!connectTypes) {
alert('没有匹配的连接方式');
alert(this._i18n.t('No Matching Connection'));
return new Promise<ConnectData>((resolve, reject) => {
reject('没有匹配的连接方式');
reject(this._i18n.t('No Matching Connection'));
});
}
let connectType = null;
Expand Down
4 changes: 3 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"Database info": "Database info",
"Command line": "Command line",
"Run it by client": "Run it by client",
"Name": "Name"
"Name": "Name",
"No System User": "No System User",
"No Matching Connection": "No Matching Connection"
}
4 changes: 3 additions & 1 deletion src/assets/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,7 @@
"Command line": "命令行",
"Run it by client": "クライアントで実行する",
"Name": "めいしょう",
"Failed to open address": "アドレスを開くことができませんでした"
"Failed to open address": "アドレスを開くことができませんでした",
"No System User": "システムユーザーなし",
"No Matching Connection": "一致する接続がありません"
}
5 changes: 3 additions & 2 deletions src/assets/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
"Command line": "连接命令行",
"Run it by client": "使用客户端执行",
"Name": "名称",
"Failed to open address": "打开地址失败"

"Failed to open address": "打开地址失败",
"No System User": "没有系统用户",
"No Matching Connection": "没有匹配的连接方式"
}

0 comments on commit 91820aa

Please sign in to comment.