Repository navigation
Glossary: related terms link to the reader's language, not English (36 Turkish and German links) - #1197
Merged
Conversation
Contributor
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
Contributor
✅ Spell Check PassedNo spelling issues found when checking 3 changed file(s)! 🎉 |
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/check_seo_html.py">
<violation number="1" location="scripts/check_seo_html.py:296">
P2: Check 23 is not base-URL aware, so the rebrand preview silently misses every translated related-term link: its English keys omit `/rebrand-doors/`, while the parsed target and hreflang paths include it. Normalize both sides from canonical URLs or strip the build prefix consistently before matching.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
LukasWallrich
force-pushed
the
glossary-related-local-first
branch
from
November 19, 2026 14:35
76a5f55 to
70bf712
Compare
Translated titles carry the English name in square brackets only when they do not already contain the English words, so pages such as Turkish 'Ödeme Duvarı (Paywall)' were found only under their English page. Index every page by its en_title too. Adds check 23 to check_seo_html.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review prefix After #1189 the related terms sit in section.term-related as cards, so the parser now tracks whichever element carries that class. Glossary URLs are compared from /glossary/ on, so a build served under /rebrand-doors/ is checked too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LukasWallrich
force-pushed
the
glossary-related-local-first
branch
from
November 19, 2026 14:45
70bf712 to
5ec8947
Compare
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Turkish and German term pages, some related terms sent readers to the English page although their own language has the term. For example, Paywall on a Turkish page went to
/glossary/english/paywall/instead of the Turkish "Ödeme Duvarı (Paywall)".The cause is the related-terms lookup, which finds a translated page only by the English name in its square brackets. The generator adds those brackets only when the translated title does not already contain the English words. Turkish titles often give the English name in round brackets ("CRediT (Katkı Rolleri Taksonomisi)", "Ödeme Duvarı (Paywall)"), and the German H-index page is titled "H-Index, Hirsch Index". So the English page won.
The template now also indexes every page by its
en_title, which all glossary pages carry in their front matter. A translated page therefore wins over the English one for the same term.Effect (
hugobuild of this branch compared withrebrand-doors)Check: a new check 23 in
scripts/check_seo_html.pyfails when a translated glossary page links a related term to an English page whose hreflang links list a page in the same language. It fails on 36 links before this change, passes after, and has two unit tests. All 23 checks andcheck_sitemap_lastmod.pypass, as do the unit tests.#1189 also edits the related-terms block of
layouts/glossary/single.html, so whichever merges second may need a small rebase. The change here is one line in the$namesloop.Created with Claude Opus 5.5 in Claude Code.
Summary by cubic
Fixes related-term links on Turkish and German glossary pages so they point to the translated page when one exists rather than the English page. 36 links (32 Turkish, 4 German) now reach the translation; English, Arabic, and Chinese pages are byte-identical, and links to English pages for terms a language lacks stay as they are.
The related-terms lookup only matched the English name in square brackets, which translated titles carry only when they don't already contain the English words — Turkish titles use round brackets ("Ödeme Duvarı (Paywall)") and the German H-index page is titled "H-Index, Hirsch Index". The template now also indexes each page by the
en_titlein its front matter, so a translated page wins over the English one for the same term.Adds check 23 to
scripts/check_seo_html.pythat fails when a translated glossary page links a related term to an English page whose hreflang links list a page in the same language, with three unit tests. The checker follows the redesigned related-terms section from #1189 and ignores a preview URL prefix. This branch touches the same related-terms block as #1189; whichever merges second needs a small rebase — the change here is one line in the$namesloop.Written for commit 5ec8947. Summary will update on new commits.