Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improved text tracks settings labels #8101

Merged
merged 8 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 188 additions & 38 deletions docs/translations-needed.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"{1} is loading.": "{1} قيد التحميل.",
"Exit Picture-in-Picture": "خرج من وضع صورة داخل صورة",
"Picture-in-Picture": "صورة داخل صورة",
"No content": "لا يوجد محتوى"
"No content": "لا يوجد محتوى",
"Color": "اللون",
"Opacity": "معدل الشفافية",
"Text Background": "خلفية النص",
"Caption Area Background": "خلفية منطقة التسمية التوضيحية"
}
6 changes: 5 additions & 1 deletion lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
"Seek to live, currently playing live": "Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.",
"Exit Picture-in-Picture": "Bild-im-Bild-Modus beenden",
"Picture-in-Picture": "Bild-im-Bild-Modus",
"No content": "Kein Inhalt"
"No content": "Kein Inhalt",
"Color": "Farbe",
"Opacity": "Opazität",
"Text Background": "Text-Hintergrund",
wseymour15 marked this conversation as resolved.
Show resolved Hide resolved
"Caption Area Background": "Hintergrund des Untertitelbereichs"
}

6 changes: 5 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,9 @@
"{1} is loading.": "{1} is loading.",
"Exit Picture-in-Picture": "Exit Picture-in-Picture",
"Picture-in-Picture": "Picture-in-Picture",
"No content": "No content"
"No content": "No content",
"Color": "Color",
wseymour15 marked this conversation as resolved.
Show resolved Hide resolved
"Opacity": "Opacity",
"Text Background": "Text Background",
"Caption Area Background": "Caption Area Background"
}
6 changes: 5 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"{1} is loading.": "{1} se está cargando.",
"Exit Picture-in-Picture": "Salir de imagen sobre imagen",
"Picture-in-Picture": "Imagen sobre imagen",
"No content": "Sin contenido"
"No content": "Sin contenido",
"Color": "Color",
"Opacity": "Opacidad",
"Text Background": "Fondo del texto",
"Caption Area Background": "Fondo del área de subtítulos"
}
6 changes: 5 additions & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"Exit Picture-in-Picture": "Quitter le mode image dans l'image",
"Picture-in-Picture": "Image dans l'image",
"{1} is loading.": "{1} en cours de chargement.",
"No content": "Aucun contenu"
"No content": "Aucun contenu",
"Color": "Couleur",
"Opacity": "Opacité",
"Text Background": "Arrière-plan du texte",
"Caption Area Background": "Arrière-plan de la zone de sous-titre"
}
6 changes: 5 additions & 1 deletion lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"{1} is loading.": "{1}は読み込み中です。",
"Exit Picture-in-Picture": "ピクチャーインピクチャー機能の終了",
"Picture-in-Picture": "ピクチャーインピクチャー",
"No content": "コンテンツなし"
"No content": "コンテンツなし",
"Color": "色",
"Opacity": "不透明度",
"Text Background": "テキスト背景",
"Caption Area Background": "キャプション領域背景"
}
6 changes: 5 additions & 1 deletion lang/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"{1} is loading.": "{1}이(가) 로딩 중입니다.",
"Exit Picture-in-Picture": "Picture-in-Picture 종료",
"Picture-in-Picture": "Picture-in-Picture",
"No content": "콘텐츠 없음"
"No content": "콘텐츠 없음",
"Color": "색상",
"Opacity": "투명도",
"Text Background": "텍스트 배경",
"Caption Area Background": "자막 배경"
}
6 changes: 5 additions & 1 deletion lang/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"Seek to live, currently playing live": "尝试直播,当前为实时播放",
"progress bar timing: currentTime={1} duration={2}": "{1}/{2}",
"{1} is loading.": "正在加载 {1}。",
"No content": "无内容"
"No content": "无内容",
"Color": "颜色",
"Opacity": "不透明度",
"Text Background": "文本背景",
"Caption Area Background": "字幕区域背景"
}
6 changes: 5 additions & 1 deletion lang/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@
"Seek to live, currently playing live": "快轉至直播,目前為現場畫面",
"progress bar timing: currentTime={1} duration={2}": "{1}/{2}",
"{1} is loading.": "{1} 正在載入。",
"No content": "無內容"
"No content": "無內容",
"Color": "顏色",
"Opacity": "不透明度",
"Text Background": "文字背景",
"Caption Area Background": "字幕區域背景"
}
10 changes: 3 additions & 7 deletions src/css/components/_captions-settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

.vjs-text-track-settings fieldset {
margin: 5px;
margin: 8px 10px;
padding: 3px;
border: none;
}
Expand All @@ -75,21 +75,17 @@

.vjs-text-track-settings legend {
color: $primary-foreground-color;
margin: 0 0 5px 0;
}

// Hide labels, so they are only for screen reader users
.vjs-text-track-settings .vjs-label {
position: absolute;
clip: rect(1px 1px 1px 1px); // for Internet Explorer
clip: rect(1px, 1px, 1px, 1px);
display: block;
margin: 0 0 5px 0;
padding: 0;
margin: 0 5px 5px 0;
border: 0;
height: 1px;
width: 1px;
overflow: hidden;
padding-inline-start: 2px;
}

.vjs-track-settings-controls button:focus,
Expand Down
10 changes: 5 additions & 5 deletions src/js/tracks/text-track-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const selectConfigs = {
backgroundOpacity: {
selector: '.vjs-bg-opacity > select',
id: 'captions-background-opacity-%s',
label: 'Transparency',
label: 'Opacity',
options: [
OPACITY_OPAQUE,
OPACITY_SEMI,
Expand Down Expand Up @@ -128,7 +128,7 @@ const selectConfigs = {
textOpacity: {
selector: '.vjs-text-opacity > select',
id: 'captions-foreground-opacity-%s',
label: 'Transparency',
label: 'Opacity',
options: [
OPACITY_OPAQUE,
OPACITY_SEMI
Expand All @@ -146,7 +146,7 @@ const selectConfigs = {
windowOpacity: {
selector: '.vjs-window-opacity > select',
id: 'captions-window-opacity-%s',
label: 'Transparency',
label: 'Opacity',
options: [
OPACITY_TRANS,
OPACITY_SEMI,
Expand Down Expand Up @@ -370,7 +370,7 @@ class TextTrackSettings extends ModalDialog {
return [
'<fieldset class="vjs-bg-color vjs-track-setting">',
`<legend id="${legendId}">`,
this.localize('Background'),
this.localize('Text Background'),
'</legend>',
this.createElSelect_('backgroundColor', legendId),
'<span class="vjs-bg-opacity vjs-opacity">',
Expand All @@ -394,7 +394,7 @@ class TextTrackSettings extends ModalDialog {
return [
'<fieldset class="vjs-window-color vjs-track-setting">',
`<legend id="${legendId}">`,
this.localize('Window'),
this.localize('Caption Area Background'),
'</legend>',
this.createElSelect_('windowColor', legendId),
'<span class="vjs-window-opacity vjs-opacity">',
Expand Down