Skip to content

[WS-2878] - Add Key Events translations#14160

Open
hotinglok wants to merge 49 commits into
latestfrom
WS-2878-key-events-translations
Open

[WS-2878] - Add Key Events translations#14160
hotinglok wants to merge 49 commits into
latestfrom
WS-2878-key-events-translations

Conversation

@hotinglok

@hotinglok hotinglok commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Resolves JIRA: WS-2878

Summary

Adds translations to 'Key Events' visually hidden text in Sport Header

Code changes

  • Add support for keyEventsTitle translation in key-events.tsx
  • Add translations to all service configs

Testing

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

@hotinglok hotinglok marked this pull request as ready for review June 26, 2026 11:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 optional keyEventsTitle.
  • Passes the new keyEventsTitle translation through ActionsKeyEvents, with an English fallback.
  • Adds sport.keyEventsTitle translations 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).

Comment thread src/app/components-webcore/SportDataHeader/head-to-head-v2/components/actions.tsx Outdated
Comment on lines 835 to 837
sport: {
keyEventsTitle: 'Кољни događaji',
matchSummary: 'Резиме утакмице',

@Isabella-Mitchell Isabella-Mitchell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

eagerterrier and others added 3 commits June 26, 2026 16:32
@hotinglok

Copy link
Copy Markdown
Contributor Author

@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 sport. I've removed the serbian translation for now since it isn't being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants