From 7dc4dd9da6dfbc809db080494f93fa373f1225db Mon Sep 17 00:00:00 2001 From: Nils Maier Date: Sun, 25 Aug 2019 23:29:13 +0200 Subject: [PATCH] Better error messages (somewhat) --- _locales/en/messages.json | 28 ++++++++++++++++++++++++++++ windows/manager/table.ts | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ccf2ca5..e0a555f 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1,4 +1,32 @@ { + "CRASH": { + "description": "", + "message": "Interal Browser Error" + }, + "FILE_FAILED": { + "description": "", + "message": "File Access Error" + }, + "NETWORK_FAILED": { + "description": "", + "message": "Network Failure" + }, + "SERVER_BAD_CONTENT": { + "description": "", + "message": "Not Found" + }, + "SERVER_FAILED": { + "description": "", + "message": "Server Error" + }, + "SERVER_FORBIDDEN": { + "description": "", + "message": "Forbidden" + }, + "SERVER_UNAUTHORIZED": { + "description": "", + "message": "Unauthorized" + }, "add-download": { "description": "Action for adding a download", "message": "Add Download" diff --git a/windows/manager/table.ts b/windows/manager/table.ts index 51cc626..cd667c5 100644 --- a/windows/manager/table.ts +++ b/windows/manager/table.ts @@ -188,7 +188,7 @@ export class DownloadItem extends EventEmitter { return this.eta; } if (this.error) { - return this.error; + return _(this.error) || this.error; } return StateTexts.get(this.state); }