[chrome-gnome-shell/feature/network-errors] Provide better error message when network error occured.
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chrome-gnome-shell/feature/network-errors] Provide better error message when network error occured.
- Date: Tue, 19 Apr 2016 15:53:31 +0000 (UTC)
commit 6d72ff8c0677e548b1a81726f8208cb1b4a94e13
Author: Yuri Konotopov <ykonotopov gmail com>
Date: Tue Apr 19 18:52:59 2016 +0300
Provide better error message when network error occured.
https://github.com/nE0sIghT/chrome-gnome-shell-mirror/issues/2
extension/_locales/en/messages.json | 3 +++
extension/_locales/ru/messages.json | 3 +++
extension/include/update.js | 5 +++++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/extension/_locales/en/messages.json b/extension/_locales/en/messages.json
index 9f2bb96..d173bc1 100644
--- a/extension/_locales/en/messages.json
+++ b/extension/_locales/en/messages.json
@@ -21,6 +21,9 @@
}
}
},
+ "network_error": {
+ "message": "A network error has occured. Please check your Internet connection and/or proxy
settings."
+ },
"no_host_response": {
"message": "No host response"
},
diff --git a/extension/_locales/ru/messages.json b/extension/_locales/ru/messages.json
index e4d8b0b..fda27cb 100644
--- a/extension/_locales/ru/messages.json
+++ b/extension/_locales/ru/messages.json
@@ -21,6 +21,9 @@
}
}
},
+ "network_error": {
+ "message": "Произошла сетевая ошибка. Пожалуйста, проверьте ваше подключение к Интернет и/или
настройки прокси сервера."
+ },
"no_host_response": {
"message": "Нет ответа от хост-коннектора"
},
diff --git a/extension/include/update.js b/extension/include/update.js
index 51c374b..deea3a2 100644
--- a/extension/include/update.js
+++ b/extension/include/update.js
@@ -84,6 +84,11 @@ GSC.update = (function($) {
lastUpdateCheck: new Date().toLocaleString()
});
}).fail(function (jqXHR, textStatus, errorThrown) {
+ if(textStatus === 'error' && !errorThrown)
+ {
+ textStatus = m('network_error');
+ }
+
createUpdateFailedNotification(textStatus);
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]