[WS-2878] - Add Key Events translations#14160
Conversation
There was a problem hiding this comment.
Pull request overview
Adds service-specific translations for the visually hidden “Key Events” heading in the Sport Data Header (head-to-head v2), so assistive technologies announce the localized label instead of the English fallback.
Changes:
- Extends
Translations['sport']with optionalkeyEventsTitle. - Passes the new
keyEventsTitletranslation throughActions→KeyEvents, with an English fallback. - Adds
sport.keyEventsTitletranslations across service configs.
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/models/types/translations.ts | Adds sport.keyEventsTitle to the translations type. |
| src/app/components-webcore/SportDataHeader/head-to-head-v2/components/key-events.tsx | Accepts an optional translated title for the visually hidden “Key Events” heading. |
| src/app/components-webcore/SportDataHeader/head-to-head-v2/components/actions.tsx | Reads sport translations from ServiceContext and passes keyEventsTitle into KeyEvents. |
| src/app/lib/config/services/afaanoromoo.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/afrique.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/arabic.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/amharic.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/azeri.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/bengali.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/burmese.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/dari.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/gahuza.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/gujarati.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/hausa.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/hindi.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/igbo.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/indonesia.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/japanese.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/korean.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/kyrgyz.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/magyarul.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/marathi.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/mundo.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/nepali.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/pashto.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/persian.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/pidgin.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/polska.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/portuguese.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/punjabi.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/romania.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/russian.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/serbian.ts | Adds sport.keyEventsTitle translation (Latin + Cyrillic variants). |
| src/app/lib/config/services/sinhala.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/somali.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/swahili.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/tamil.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/telugu.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/thai.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/tigrinya.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/turkce.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/ukrainian.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/urdu.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/uzbek.ts | Adds sport.keyEventsTitle translation (Cyrillic + Latin variants). |
| src/app/lib/config/services/vietnamese.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/yoruba.ts | Adds sport.keyEventsTitle translation. |
| src/app/lib/config/services/zhongwen.ts | Adds sport.keyEventsTitle translation (simplified + traditional). |
| sport: { | ||
| keyEventsTitle: 'Кољни događaji', | ||
| matchSummary: 'Резиме утакмице', |
Isabella-Mitchell
left a comment
There was a problem hiding this comment.
Hope you don't mind - I used copilot to review (hopefully if I'm the one requesting it came out of my allowance, no sure how it works!). I've found it helpful for translation config updates - especially since the things we get on the sheet aren't always correct
The Serbian isn't using the feature so this may be ok - we might want to check with Neil or remove it to be on the safe
Also I can see we do that destructing of translations in other places, so maybe it's ok? (I always get confused on the syntax of it)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@Isabella-Mitchell That's fair enough, I'm ok either way so I've refactored it slightly so that it's a bit clearer than just passing in |
Resolves JIRA: WS-2878
Summary
Adds translations to 'Key Events' visually hidden text in Sport Header
Code changes
keyEventsTitletranslation inkey-events.tsxTesting
Check mid-event stories and ensure the key events translations come through (e.g. old storybook link, may need ones generated from this PR)
Useful Links