Skip to content

Commit

Permalink
Subtitle shift feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrews54757 committed Dec 17, 2023
1 parent c8ff5d9 commit 2507691
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@
"player_subtitlesmenu_shifttool_label": {
"message": "Shift subtitles $1s"
},
"player_subtitlesmenu_shifttool_message": {
"message": "Shifted subtitles $1s"
},
"player_testsubtitle": {
"message": "This is a test subtitle"
},
Expand Down
3 changes: 3 additions & 0 deletions chrome/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@
"player_subtitlesmenu_shifttool_label": {
"message": "Cambiar subtítulos $1s"
},
"player_subtitlesmenu_shifttool_message": {
"message": "Subtítulos cambiados $1s"
},
"player_testsubtitle": {
"message": "Este es un subtítulo de prueba"
},
Expand Down
3 changes: 3 additions & 0 deletions chrome/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@
"player_subtitlesmenu_shifttool_label": {
"message": "$1 の字幕をシフト"
},
"player_subtitlesmenu_shifttool_message": {
"message": "字幕を $1s シフト"
},
"player_testsubtitle": {
"message": "これはテストの字幕です"
},
Expand Down
1 change: 1 addition & 0 deletions chrome/player/ui/InterfaceController.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class InterfaceController {
this.registerStatusLevel('error');
this.registerStatusLevel('save-video', 1);
this.registerStatusLevel('save-screenshot', 1);
this.registerStatusLevel('subtitles', 1);
this.registerStatusLevel('chapter', 2);

this.setupDOM();
Expand Down
2 changes: 2 additions & 0 deletions chrome/player/ui/subtitles/SubtitlesManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ export class SubtitlesManager {
this.tracks[i].shift(-0.2);
this.renderSubtitles();
this.client.subtitleSyncer.onVideoTimeUpdate();
this.client.interfaceController.setStatusMessage('subtitles', Localize.getMessage('player_subtitlesmenu_shifttool_message', ['-0.2']), 'info', 700);
e.stopPropagation();
}, true);

Expand All @@ -364,6 +365,7 @@ export class SubtitlesManager {
this.tracks[i].shift(0.2);
this.renderSubtitles();
this.client.subtitleSyncer.onVideoTimeUpdate();
this.client.interfaceController.setStatusMessage('subtitles', Localize.getMessage('player_subtitlesmenu_shifttool_message', ['+0.2']), 'info', 700);
e.stopPropagation();
}, true);

Expand Down

0 comments on commit 2507691

Please sign in to comment.