Skip to content

2789 - Add generic skip link 'skipContent' translations - (PV Carousel only)[Copilot]#14211

Open
Louis-Matsika wants to merge 5 commits into
latestfrom
WS-2789-add-generic-skip-link-translations
Open

2789 - Add generic skip link 'skipContent' translations - (PV Carousel only)[Copilot]#14211
Louis-Matsika wants to merge 5 commits into
latestfrom
WS-2789-add-generic-skip-link-translations

Conversation

@Louis-Matsika

@Louis-Matsika Louis-Matsika commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

*copilot generated description

JIRA: WS-2789

Summary

This pull request updates the "Skip" link logic and translations for the PortraitVideoCarousel component, improving how skip link text is handled and adding new translation keys for better localization. The changes affect both the component logic and the service configuration files for multiple languages.

Code changes

  1. Added optional skipContent (text + endTextVisuallyHidden) to the Translations type in translations.ts.

  2. Added skipContent translations to the top level of translations for all mapped service configs, including multi-variant services:

    • Serbian (Cyrillic/Latin)
    • Uzbek (Cyrillic/Latin)
    • Chinese (Simplified/Traditional)
    • Russian
    • Ukrainian

    Also converted the source ${title} placeholder to the codebase's %title% detokeniser convention.

  3. Refactored PortraitVideoCarousel to read translations.skipContent (with an English fallback) instead of recommendations.skipLink, and removed the now-unused recommendations destructure.

  4. Updated PortraitVideoCarousel/index.test.tsx skip-link assertions to use the new generic text.

Testing

  1. Vist a live page with a PV Carousel e.g. http://localhost:7081/mundo/live/cjnk1wrpkdk7t
  2. Using the keyboard tab to the PV Carousel the 1st thing you tab onto should be the skipContent text
Screenshot 2026-07-14 at 2 37 03 pm

@Louis-Matsika Louis-Matsika changed the title add skip content translation 2789 - Add generic skip link translations Jul 14, 2026
@Louis-Matsika Louis-Matsika changed the title 2789 - Add generic skip link translations 2789 - Add generic skip link 'skipContent' translations - (PV Carousel only) Jul 14, 2026
@Louis-Matsika Louis-Matsika marked this pull request as ready for review July 14, 2026 14:09
…om:bbc/simorgh into WS-2789-add-generic-skip-link-translations
@Louis-Matsika Louis-Matsika changed the title 2789 - Add generic skip link 'skipContent' translations - (PV Carousel only) 2789 - Add generic skip link 'skipContent' translations - (PV Carousel only)[Copilot] Jul 14, 2026

@Nabeel1276 Nabeel1276 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.

The spreadsheet's Sinhala row is clean, with no Persian text (වීඩියෝ කැරසල් මඟහරින්න / වීඩියෝ කැරසල් අවසානය). The ادامه in sinhala.ts must have been introduced during generation, not sourced from the spreadsheet it seems. Am I missing something?

@jinidev

jinidev commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The spreadsheet's Sinhala row is clean, with no Persian text (වීඩියෝ කැරසල් මඟහරින්න / වීඩියෝ කැරසල් අවසානය). The ادامه in sinhala.ts must have been introduced during generation, not sourced from the spreadsheet it seems. Am I missing something?

image This is what we see in spreadsheet. It has Persian presence. Which column are you looking into in spreadsheet? @Nabeel1276

@Nabeel1276

Copy link
Copy Markdown
Contributor

The spreadsheet's Sinhala row is clean, with no Persian text (වීඩියෝ කැරසල් මඟහරින්න / වීඩියෝ කැරසල් අවසානය). The ادامه in sinhala.ts must have been introduced during generation, not sourced from the spreadsheet it seems. Am I missing something?

image This is what we see in spreadsheet. It has Persian presence. Which column are you looking into in spreadsheet? @Nabeel1276

The one in the ticket here - https://bbc.atlassian.net/browse/WS-2789 @jinidev

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

This PR standardises the PortraitVideoCarousel skip-link copy by introducing a new, generic translations.skipContent entry (with %title% detokenisation) and updating the component + tests to use it, while adding the new translation key across service configs (including multi-variant services).

Changes:

  • Added optional skipContent (text + end marker visually hidden text) to the shared Translations type.
  • Added skipContent translations across services (including variants), using %title% tokens.
  • Updated PortraitVideoCarousel and its tests to use translations.skipContent with an English fallback.

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/app/models/types/translations.ts Extends Translations with optional skipContent structure.
src/app/lib/config/services/zhongwen.ts Adds skipContent translations for both simplified/traditional variants.
src/app/lib/config/services/yoruba.ts Adds skipContent translations.
src/app/lib/config/services/ws.ts Adds skipContent translations (English).
src/app/lib/config/services/vietnamese.ts Adds skipContent translations.
src/app/lib/config/services/uzbek.ts Adds skipContent translations for Cyrillic/Latin variants.
src/app/lib/config/services/urdu.ts Adds skipContent translations.
src/app/lib/config/services/ukrainian.ts Adds skipContent translations.
src/app/lib/config/services/ukchina.ts Adds skipContent translations for both simplified/traditional variants.
src/app/lib/config/services/turkce.ts Adds skipContent translations.
src/app/lib/config/services/tigrinya.ts Adds skipContent translations.
src/app/lib/config/services/thai.ts Adds skipContent translations.
src/app/lib/config/services/telugu.ts Adds skipContent translations.
src/app/lib/config/services/tamil.ts Adds skipContent translations.
src/app/lib/config/services/swahili.ts Adds skipContent translations.
src/app/lib/config/services/sport.ts Adds skipContent translations (English).
src/app/lib/config/services/somali.ts Adds skipContent translations.
src/app/lib/config/services/sinhala.ts Adds skipContent translations.
src/app/lib/config/services/serbian.ts Adds skipContent translations for Latin/Cyrillic variants.
src/app/lib/config/services/scotland.ts Adds skipContent translations (English).
src/app/lib/config/services/russian.ts Adds skipContent translations.
src/app/lib/config/services/romania.ts Adds skipContent translations.
src/app/lib/config/services/punjabi.ts Adds skipContent translations.
src/app/lib/config/services/portuguese.ts Adds skipContent translations.
src/app/lib/config/services/polska.ts Adds skipContent translations.
src/app/lib/config/services/pidgin.ts Adds skipContent translations (English copy).
src/app/lib/config/services/persian.ts Adds skipContent translations.
src/app/lib/config/services/pashto.ts Adds skipContent translations.
src/app/lib/config/services/newsround.ts Adds skipContent translations (English).
src/app/lib/config/services/news.ts Adds skipContent translations (English).
src/app/lib/config/services/nepali.ts Adds skipContent translations.
src/app/lib/config/services/mundo.ts Adds skipContent translations.
src/app/lib/config/services/marathi.ts Adds skipContent translations.
src/app/lib/config/services/magyarul.ts Adds skipContent translations.
src/app/lib/config/services/kyrgyz.ts Adds skipContent translations.
src/app/lib/config/services/korean.ts Adds skipContent translations.
src/app/lib/config/services/japanese.ts Adds skipContent translations.
src/app/lib/config/services/indonesia.ts Adds skipContent translations.
src/app/lib/config/services/igbo.ts Adds skipContent translations.
src/app/lib/config/services/hindi.ts Adds skipContent translations.
src/app/lib/config/services/hausa.ts Adds skipContent translations.
src/app/lib/config/services/gujarati.ts Adds skipContent translations.
src/app/lib/config/services/gahuza.ts Adds skipContent translations.
src/app/lib/config/services/dari.ts Adds skipContent translations.
src/app/lib/config/services/burmese.ts Adds skipContent translations.
src/app/lib/config/services/bengali.ts Adds skipContent translations.
src/app/lib/config/services/azeri.ts Adds skipContent translations.
src/app/lib/config/services/archive.ts Adds skipContent translations (English).
src/app/lib/config/services/arabic.ts Adds skipContent translations.
src/app/lib/config/services/amharic.ts Adds skipContent translations.
src/app/lib/config/services/afrique.ts Adds skipContent translations.
src/app/lib/config/services/afaanoromoo.ts Adds skipContent translations.
src/app/components/PortraitVideoCarousel/index.tsx Switches skip-link source to translations.skipContent and updates fallback copy.
src/app/components/PortraitVideoCarousel/index.test.tsx Updates assertions to match the new generic skip-link text.

@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.

Ran copilot just to checkover the translations (in the past I've found it's good at proof reading the languages and pointing out anything that looks odd!) Looks good :)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants