From 1e074c410b1da39b6a7930db04c5d0b575877718 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 30 Jul 2025 19:05:02 +0100 Subject: [PATCH] Use modal alert when remote editing fails --- app/assets/javascripts/index.js | 4 ++-- config/i18n.yml | 1 - config/locales/en.yml | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 7295df7f2..86e7ca89c 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -237,8 +237,8 @@ $(function () { } }) .catch(() => { - // eslint-disable-next-line no-alert - alert(OSM.i18n.t("site.index.remote_failed")); + OSM.showAlert(OSM.i18n.t("javascripts.remote_edit.failed.title"), + OSM.i18n.t("javascripts.remote_edit.failed.body")); }); function sendRemoteEditCommand(url) { diff --git a/config/i18n.yml b/config/i18n.yml index e2cff2109..975f0ce09 100644 --- a/config/i18n.yml +++ b/config/i18n.yml @@ -13,7 +13,6 @@ translations: - "*.browse.start_rjs.*" - "*.javascripts.*" - "*.site.edit.*" - - "*.site.index.remote_failed" - "*.site.sidebar.search_results" - "*.diary_entries.edit.marker_text" - "*.layouts.project_name.title" diff --git a/config/locales/en.yml b/config/locales/en.yml index 41a0dc7ba..ad5bd92ab 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2467,7 +2467,6 @@ en: copyright: "Copyright OpenStreetMap and contributors, under an open license" license_url: "https://openstreetmap.org/copyright" project_url: "https://openstreetmap.org" - remote_failed: "Editing failed - make sure JOSM or Merkaartor is loaded and the remote control option is enabled" not_public_flash: not_public: "You have not set your edits to be public." not_public_description_html: "You can no longer edit the map unless you do so. You can set your edits as public from your %{user_page}." @@ -3570,6 +3569,10 @@ en: contributions: one: "%{count} contribution on %{date}" other: "%{count} contributions on %{date}" + remote_edit: + failed: + title: "Editing failed" + body: "Make sure JOSM or Merkaartor is loaded and the remote control option is enabled" redactions: edit: heading: "Edit Redaction" -- 2.39.5