Repository navigation
fix: restore landing artwork credit links - #93
Merged
Merged
Conversation
The localized showcase credit wrapped its link in a <source> Trans tag. react-i18next parses void element names as self-closing, so the anchor rendered empty with the artwork title as plain text beside it. Rename the tag to <credit> in all 12 languages and add an i18n check that rejects paired void-element tags in translation resources. Update the sticky mobile CTA keyboard test for the footer language selector, which now sits between the Terms link and the sticky action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qf5SDDTLr39hMsXWkdPkFL
The 4.1.0 localization shortened the Naruto credit label to "Naruto" so it reads naturally inside each language's "Original artwork" sentence. The showcase test still expected the earlier English label; it was masked until now because the credit links rendered empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qf5SDDTLr39hMsXWkdPkFL
Merged
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
Fixes the two landing-page browser test failures found while validating the v4.2.0 release (#91). Both were already present in v4.1.0.
Artwork credits render as empty links (user-facing). The localized showcase credit used
Original artwork: <source>{{title}}</source>.sourceis a void HTML element, so react-i18next parsed it as self-closing: the<a>rendered empty and the title appeared as plain text beside it. This broke credits such as NASA/JPL on the live site in every language. v4.0.0 linked them correctly.<credit>in all 12public.jsonfiles and inLandingPage.tsx.<source>,<link>,<img>, …) in any translation resource. It fails on the previous resources and passes now.Stale landing tests.
sticky-mobile-cta.spec.ts: the footer language selector added in 4.1.0 now sits between the Terms link and the sticky action, so the test tabs through it and asserts its focus. Keyboard access to the sticky action was already working.landing.spec.ts: 4.1.0 shortened the Naruto credit label toNarutoso it reads naturally in every language. The test still expected the old English label, which the empty-link bug had hidden until now.Validation
landing.spec.tsandsticky-mobile-cta.spec.ts: 18 of 18 passed.npm run test:e2e:i18n:build: all 4 passed.npm run check:i18n,npm run test:i18n(11 passed) and lint pass.Original artwork: <a href="…">NASA/JPL — Titan</a>.Browser tests used the container's preinstalled Chromium. Prettier reports were already present on 8 of the edited
public.jsonfiles before this change. This PR changes only the tag name there and leaves their formatting alone.Generated by Claude Code