fix(seo): resolve translation status by content, not namespace prefix#18143
Merged
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
Edge-case verification (preview vs prod)
Notes:
Sitemap diff (preview vs prod)Preview: 9,535 Removed (4,375 paths)
Added (72 paths)3 routes × 24 non-EN locales — same class as Bug 1: pages with translated markdown but no per-locale namespace JSON. Old resolver dropped them; new content-first resolver picks them up.
TL;DRPR-attributable diff:
LGTM 👍 |
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.

Summary
/<locale>/videos/<slug>/for every locale, whilegetMetadatacorrectly returnednoindex,followwheneverpage-videos.jsonwas missing — silently noindexing ~1,391 video pages that already had translated markdown content (e.g. https://ethereum.org/ar/videos/decentralized-social-media/).developers/tutorials/gasless-token(English-only) were marked translated for all 25 locales becausepage-developers-index.jsonexists in every locale — Google was getting localized canonicals over English fallback content (duplicate-content signal).getPageTypeclassified every slug under a namespace-mapped prefix as "intl" and gated translation on namespace JSON presence, even when the actual translation source for that slug is per-page markdown. Replaced with a content-first resolver: if English markdown exists for the slug, translation status follows the localized markdown; otherwise fall back to UI namespace presence. Folded video slugs into the unified registry so the sitemap loop no longer needs a special case.Test plan
pnpm test:unit— 881/881 pass; added invariant tests undertests/unit/i18n/translation-registry.spec.tscovering content-first resolution, namespace fallback, and slug normalizationnpx tsc --noEmit— cleanhttps://ethereum.org/ar/videos/decentralized-social-media/no longer emits<meta name="robots" content="noindex,follow">and its canonical points to itself