From 7011459fe9f895495a79613476f42d01b10db0db Mon Sep 17 00:00:00 2001 From: James Addison <55152140+jayaddison@users.noreply.github.com> Date: Sat, 13 Jul 2024 17:45:16 +0100 Subject: [PATCH] linkcheck: Use old-style string formatting to fix gettext (#12560) --- sphinx/builders/linkcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 266c964ae..c58140352 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -473,7 +473,7 @@ class HyperlinkAvailabilityCheckWorker(Thread): ) as response: if (self.check_anchors and response.ok and anchor and not contains_anchor(response, anchor)): - raise Exception(__(f'Anchor {quote(anchor)!r} not found')) + raise Exception(__("Anchor '%s' not found") % quote(anchor)) # Copy data we need from the (closed) response status_code = response.status_code