From 6940612688ed4e3bc144a5f1442097c9d3d60bec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?=
 <baris@nodebb.org>
Date: Tue, 29 May 2018 10:27:56 -0400
Subject: [PATCH] closes #6410

---
 public/language/en-GB/error.json | 3 ++-
 public/src/ajaxify.js            | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/public/language/en-GB/error.json b/public/language/en-GB/error.json
index 7514803f10..b44eb6e07c 100644
--- a/public/language/en-GB/error.json
+++ b/public/language/en-GB/error.json
@@ -182,5 +182,6 @@
 	"cant-move-to-same-topic": "Can't move post to same topic!",
 
 	"cannot-block-self": "You cannot block yourself!",
-	"cannot-block-privileged": "You cannot block administrators or global moderators"
+	"cannot-block-privileged": "You cannot block administrators or global moderators",
+	"no-connection": "There seems to be a problem with your internet connection"
 }
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 291856d175..a84f6023de 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -18,6 +18,7 @@ $(document).ready(function () {
 	// When ajaxify is migrated to a require.js module, then this can be merged into the "define" call
 	require(['translator', 'benchpress'], function (_translator, _Benchpress) {
 		translator = _translator;
+		translator.translate('[[error:no-connection]]', app.inAdmin ? config.acpLang : config.userLang);
 		Benchpress = _Benchpress;
 	});
 
@@ -318,6 +319,8 @@ $(document).ready(function () {
 			error: function (data, textStatus) {
 				if (data.status === 0 && textStatus === 'error') {
 					data.status = 500;
+					data.responseJSON = data.responseJSON || {};
+					data.responseJSON.error = '[[error:no-connection]]';
 				}
 				callback({
 					data: data,