mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Improve updater messages
Improve the wording of updater messages for better UX.
This commit is contained in:
parent
d5ca6bb422
commit
c9eac42855
3 changed files with 13 additions and 12 deletions
|
@ -47,8 +47,8 @@ UPDATE_ERROR_MSG_INTRO = """\
|
|||
UPDATE_ERROR_MSG_OUTRO = """\
|
||||
<p>You are strongly advised to visit our
|
||||
<a href="https://dangerzone.rocks#downloads">downloads page</a> and check for new
|
||||
updates manually, or consult our
|
||||
<a href=https://github.com/freedomofpress/dangerzone/wiki/Updates>wiki page</a> for
|
||||
updates manually, or consult
|
||||
<a href=https://github.com/freedomofpress/dangerzone/wiki/Updates>this webpage</a> for
|
||||
common causes of errors. Alternatively, you can uncheck the "Check for updates" option
|
||||
in our menu, if you are in an air-gapped environment and have another way of learning
|
||||
about updates.</p>
|
||||
|
|
|
@ -28,17 +28,18 @@ log = logging.getLogger(__name__)
|
|||
|
||||
|
||||
MSG_CONFIRM_UPDATE_CHECKS = """\
|
||||
<p>Do you want to be notified about new Dangerzone releases?</p>
|
||||
<p><b>Do you want to be notified about new Dangerzone releases?</b></p>
|
||||
|
||||
<p>If <i>"Yes"</i>, Dangerzone will check GitHub for new releases on startup. If
|
||||
<i>"No"</i>, Dangerzone will make no network requests and won't inform you about new
|
||||
releases.</p>
|
||||
<p>If <i>"Yes"</i>, Dangerzone will check the
|
||||
<a href="https://github.com/freedomofpress/dangerzone/releases">latest releases page</a>
|
||||
in github.com on startup. If <i>"No"</i>, Dangerzone will make no network requests and
|
||||
won't inform you about new releases.</p>
|
||||
|
||||
<p>If you prefer another way of getting notified about new releases, we suggest adding
|
||||
to your RSS reader our
|
||||
<a href="https://fosstodon.org/@dangerzone.rss">Mastodon feed</a>. For more information
|
||||
about updates, check our
|
||||
<a href="https://github.com/freedomofpress/dangerzone/wiki/Updates">wiki page</a>.</p>
|
||||
about updates, check
|
||||
<a href="https://github.com/freedomofpress/dangerzone/wiki/Updates">this webpage</a>.</p>
|
||||
"""
|
||||
|
||||
UPDATE_CHECK_COOLDOWN_SECS = 60 * 60 * 12 # Check for updates at most every 12 hours.
|
||||
|
@ -214,12 +215,12 @@ class UpdaterThread(QtCore.QThread):
|
|||
res = requests.get(self.GH_RELEASE_URL, timeout=self.REQ_TIMEOUT)
|
||||
except Exception as e:
|
||||
raise RuntimeError(
|
||||
f"Encountered an exception while querying {self.GH_RELEASE_URL}: {e}"
|
||||
f"Encountered an exception while checking {self.GH_RELEASE_URL}: {e}"
|
||||
)
|
||||
|
||||
if res.status_code != 200:
|
||||
raise RuntimeError(
|
||||
f"Encountered an HTTP {res.status_code} error while querying"
|
||||
f"Encountered an HTTP {res.status_code} error while checking"
|
||||
f" {self.GH_RELEASE_URL}"
|
||||
)
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ def test_update_checks(
|
|||
requests_mock.side_effect = Exception("failed") # type: ignore [attr-defined]
|
||||
report = updater.check_for_updates()
|
||||
error_msg = (
|
||||
f"Encountered an exception while querying {updater.GH_RELEASE_URL}: failed"
|
||||
f"Encountered an exception while checking {updater.GH_RELEASE_URL}: failed"
|
||||
)
|
||||
assert_report_equal(report, UpdateReport(error=error_msg))
|
||||
|
||||
|
@ -297,7 +297,7 @@ def test_update_checks_cooldown(updater: UpdaterThread, mocker: MockerFixture) -
|
|||
assert cooldown_spy.spy_return == False
|
||||
assert updater.dangerzone.settings.get("updater_last_check") == curtime
|
||||
error_msg = (
|
||||
f"Encountered an exception while querying {updater.GH_RELEASE_URL}: failed"
|
||||
f"Encountered an exception while checking {updater.GH_RELEASE_URL}: failed"
|
||||
)
|
||||
assert_report_equal(report, UpdateReport(error=error_msg))
|
||||
|
||||
|
|
Loading…
Reference in a new issue