Add temporary pre-catalog Translatathon promo banner - #9307
Merged
Conversation
Recruit translators for the Big Jiki & Exercism Translatathon via the site-header announcement bar, shown to signed-in users only. This is the server-side sibling of the Jiki front-end's TranslatathonBanner (jiki-education/front-end#990). Rather than reaching for navigator.languages in JS, ViewComponents::TranslatathonBanner resolves the ordered Accept-Language request header: it takes the first non-catalog language (English is the only catalog language on Exercism) and returns either the banner fully translated into a Translatathon-program language, or an English fallback with the language's name filled in. It self-removes after the event (END_TIME). Wired into SiteHeader#announcement_bar following the existing bar pattern; no dismissal or client-side rendering since the announcement bar is server-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WxnG32jG7Zdy2Uu6qFCPjp
The banner lives on the Exercism site, so the recruiting copy should name
Exercism as the thing being translated. Swap "Jiki" for "Exercism" in every
translated string and the English fallback, adjusting the Korean object
particle (를 -> 을) and Turkish accusative ('yi -> 'i) for the new consonant
ending. The event name and front-end reference in the comments are unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WxnG32jG7Zdy2Uu6qFCPjp
Use margin-inline-end instead of physical mr-6 so the gap sits between the globe emoji and the text in both LTR and RTL banners (previously the emoji jammed against the text in RTL). Tightened to 8px. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
A temporary announcement bar recruiting translators for the Big Jiki & Exercism Translatathon, shown to signed-in users whose browser's top language is one we don't ship the UI in.
This is the server-side sibling of the Jiki front-end's
TranslatathonBanner. Same core logic, adapted to how this site does banners: it's a Ruby announcement bar in the site-header helper, not a React component.How it works
ViewComponents::TranslatathonBannerresolves the orderedAccept-Languagerequest header (the server-side equivalent of the front-end'snavigator.languages, ordered by q-value).COPYmap, RTL-aware forar/fa/ur).Intl.DisplayNames, so names come from aLANGUAGE_NAMESmap; a code we can't name shows nothing.END_TIME= 2026-08-04).https://i18n.jiki.io, opening in a new tab.Mounting
Wired into
SiteHeader#announcement_bar, following the existing announcement-bar pattern. It takes priority over the other bars for signed-in users when it applies. Signed-out users are never affected (and their header stays cached).Notes vs the front-end PR
localStoragedismiss logic and full-screen-exercise suppression from the FE version are dropped.TranslatathonBanner, its test, and the header hook after the event.Unit-tested in
test/helpers/view_components/translatathon_banner_test.rb(Accept-Language ordering, catalog exclusion, program/variant mapping, English fallback, end-date cutoff).🤖 Generated with Claude Code