feat(subtitles): add local Japanese subtitle generation (#240)

This commit is contained in:
2026-09-15 21:43:11 -07:00
committed by GitHub
parent 6841a37a22
commit 2831e05124
90 changed files with 4934 additions and 57 deletions
+23
View File
@@ -92,6 +92,7 @@ function createEmptyShortcuts(): ConfiguredShortcuts {
openRuntimeOptions: null,
openJimaku: null,
openTsukihime: null,
openSubtitleGeneration: null,
openSessionHelp: null,
openControllerSelect: null,
openControllerDebug: null,
@@ -1591,6 +1592,28 @@ test('session binding: Ctrl+Alt+S dispatches subsync action locally', async () =
}
});
test('session binding: Ctrl+Shift+G dispatches subtitle generation with the sidebar closed', async () => {
const { handlers, testGlobals } = createKeyboardHandlerHarness();
try {
await handlers.setupMpvInputForwarding();
handlers.updateSessionBindings([
{
sourcePath: 'shortcuts.openSubtitleGeneration',
originalKey: 'Ctrl+Shift+G',
key: { code: 'KeyG', modifiers: ['ctrl', 'shift'] },
actionType: 'session-action',
actionId: 'openSubtitleGeneration',
},
]);
testGlobals.dispatchKeydown({ key: 'G', code: 'KeyG', ctrlKey: true, shiftKey: true });
assert.deepEqual(testGlobals.sessionActions, [
{ actionId: 'openSubtitleGeneration', payload: undefined },
]);
} finally {
testGlobals.restore();
}
});
test('session binding: Ctrl+Shift+J dispatches jimaku action locally', async () => {
const { handlers, testGlobals } = createKeyboardHandlerHarness();