modify tip of connected to aria2 in case tip would show before language resource loaded

This commit is contained in:
MaysWind 2019-08-20 22:06:28 +08:00
parent 95fc7e6b42
commit cbc3bcdb04
5 changed files with 9 additions and 7 deletions

View file

@ -2,7 +2,7 @@
AriaNg Version=AriaNg 版本 AriaNg Version=AriaNg 版本
Operation Result=操作结果 Operation Result=操作结果
Operation Succeeded=操作成功 Operation Succeeded=操作成功
{{name}} is connected={{name}} 已连接 is connected=已连接
Error=错误 Error=错误
OK=确定 OK=确定
Confirm=确认 Confirm=确认

View file

@ -2,7 +2,7 @@
AriaNg Version=AriaNg 版本 AriaNg Version=AriaNg 版本
Operation Result=操作結果 Operation Result=操作結果
Operation Succeeded=操作成功 Operation Succeeded=操作成功
{{name}} is connected={{name}} 已連線 is connected=已連線
Error=錯誤 Error=錯誤
OK=確定 OK=確定
Confirm=確認 Confirm=確認

View file

@ -6,7 +6,7 @@
'AriaNg Version': 'AriaNg Version', 'AriaNg Version': 'AriaNg Version',
'Operation Result': 'Operation Result', 'Operation Result': 'Operation Result',
'Operation Succeeded': 'Operation Succeeded', 'Operation Succeeded': 'Operation Succeeded',
'{{name}} is connected': '{{name}} is connected', 'is connected': 'is connected',
'Error': 'Error', 'Error': 'Error',
'OK': 'OK', 'OK': 'OK',
'Confirm': 'Confirm', 'Confirm': 'Confirm',

View file

@ -346,11 +346,9 @@
}); });
aria2TaskService.onFirstSuccess(function (event) { aria2TaskService.onFirstSuccess(function (event) {
ariaNgLocalizationService.notifyInPage('', '{{name}} is connected', { ariaNgLocalizationService.notifyInPage('', 'is connected', {
type: 'success', type: 'success',
contentParams: { contentPrefix: event.rpcName + ' '
name: event.rpcName
}
}); });
}); });

View file

@ -81,6 +81,10 @@
if (content) { if (content) {
content = this.getLocalizedText(content, options.contentParams); content = this.getLocalizedText(content, options.contentParams);
if (options.contentPrefix) {
content = options.contentPrefix + content;
}
} }
return ariaNgNotificationService.notifyInPage(title, content, options); return ariaNgNotificationService.notifyInPage(title, content, options);