Skip to content

Add a captions badge on video thumbnails - #7851

Merged
Chocobozzz merged 5 commits into
Chocobozzz:developfrom
BgameB:feature/7826-captions-badge
Nov 5, 2026
Merged

Chocobozzz merged 5 commits into
Chocobozzz:developfrom
BgameB:feature/7826-captions-badge

Conversation

@EmilienLDN

Copy link
Copy Markdown
Contributor

Add a captions badge on video thumbnails

Fixes #7826

As discussed in the issue, the badge is only displayed when the video has at least one caption in the user's interface language (a Spanish caption is not useful for someone who only reads French).

What changed

Server

  • The videos lists now return captionLanguages (e.g. ["ar", "zh"])
  • No database migration: languages are read from the existing videoCaption table

Client

  • A "CC" badge is displayed on the video thumbnail when one of the caption languages matches the interface language (fr-FR matches fr, zh-Hans-CN matches zh)
  • The badge is also announced to screen readers and works in RTL

Tests

  • Unit tests for the new hasLanguageForLocale helper
  • API tests checking captionLanguages in the videos lists (no caption, two captions, after a caption deletion)

Notes

  • captionLanguages is not returned by the video details endpoint, nor in playlist elements
  • openapi.yaml is not updated yet
  • I could not run the API tests locally (no PostgreSQL/Redis), so they still need to run in the CI

EmilienLDN and others added 5 commits November 2, 2026 21:28
Expose the languages of the video captions in videos lists
(`captionLanguages`) and display a "CC" badge on the thumbnail when
the video has at least one caption in the user interface language.

Fixes Chocobozzz#7826

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Chocobozzz

Copy link
Copy Markdown
Owner

Thank you

@Chocobozzz
Chocobozzz merged commit ab6cef8 into Chocobozzz:develop Nov 5, 2026
18 of 21 checks passed
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.

Add a "subtitles" / "CC" badge on video thumbnails

2 participants