From dfa442903d8ac1d4413ea8fba60351c02399e58c Mon Sep 17 00:00:00 2001 From: Jakub Wieczorek Date: Wed, 15 Oct 2014 20:57:29 +0200 Subject: [PATCH] Improve the error message on saving when offline (fixes #2373) --- data/core.yaml | 1 + dist/locales/en.json | 1 + js/id/modes/save.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/core.yaml b/data/core.yaml index efb948d32..1e5eb737e 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -246,6 +246,7 @@ en: help: "Save changes to OpenStreetMap, making them visible to other users." no_changes: No changes to save. error: An error occurred while trying to save + unknown_error_details: "Please ensure you are connected to the internet." uploading: Uploading changes to OpenStreetMap. unsaved_changes: You have unsaved changes success: diff --git a/dist/locales/en.json b/dist/locales/en.json index a04c2cfb4..fdcd04bda 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -301,6 +301,7 @@ "help": "Save changes to OpenStreetMap, making them visible to other users.", "no_changes": "No changes to save.", "error": "An error occurred while trying to save", + "unknown_error_details": "Please ensure you are connected to the internet.", "uploading": "Uploading changes to OpenStreetMap.", "unsaved_changes": "You have unsaved changes" }, diff --git a/js/id/modes/save.js b/js/id/modes/save.js index 270de91c4..ab41f507d 100644 --- a/js/id/modes/save.js +++ b/js/id/modes/save.js @@ -30,7 +30,7 @@ iD.modes.Save = function(context) { confirm .select('.modal-section.message-text') .append('p') - .text(err.responseText); + .text(err.responseText || t('save.unknown_error_details')); } else { context.flush(); success(e, changeset_id);