Skip to content

Commit

Permalink
DC-337: Clean up translatable strings in video play button
Browse files Browse the repository at this point in the history
  • Loading branch information
remydenton committed Mar 25, 2022
1 parent b499e96 commit 4c868ea
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
{% endif %}

{% if video.content or button_attributes %}
{% set play_video_label = 'Play the video' %}
{% set _has_subtitles = video.has_subtitles ? ', this video has subtitles available.' : '' %}
{% set _title = video.title ? ' ' ~ video.title : '' %}
{% set play_video_label = play_video_label ~ _title ~ _has_subtitles %}
{% set play_video_label = video.title ? 'Play the video @title.'|t({'@title': video.title}) : 'Play the video.'|t %}
{% if video.has_subtitles %}
{% set play_video_label = play_video_label ~ ' ' ~ 'This video has subtitles available.'|t %}
{% endif %}
{% endif %}

{# Template #}
<div {{ attributes.addClass(classes) }}>
{% if video.content or button_attributes %}
<button {{ button_attributes.addClass('c-bolt-video-thumbnail__inline-button')|without('aria-label')|without('type') }} type="button" aria-label="{{ play_video_label|t }}">
<button {{ button_attributes.addClass('c-bolt-video-thumbnail__inline-button')|without('aria-label')|without('type') }} type="button" aria-label="{{ play_video_label }}">
{% endif %}
<div class="c-bolt-video-thumbnail__content">
{{ content }}
Expand Down

0 comments on commit 4c868ea

Please sign in to comment.