Add custom SRT subtitle import

This commit is contained in:
haixin.yang committed 2026-07-20 15:33:02 +08:00
1 parent 88902d82e4
commit 8a45619ecf
8 files changed
+236 -3

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { describe, expect, it } from "vitest";
import { APP_LANGUAGES, createTranslator } from "./i18n.js";
describe("SRT import translations", () => {
it("localizes every user-visible import state in every supported language", () => {
const keys = ["importSrt", "srtConflictTitle", "srtConflictDescription", "replaceSrt", "appendSrt", "srtImportComplete", "srtImportFailed", "srtFileTooLarge", "srtNoValidCaptions"];
for (const language of APP_LANGUAGES) {
const t = createTranslator(language.id);
for (const key of keys) expect(t(key), `${language.id}:${key}`).not.toBe(key);
}
expect(createTranslator("ru")("importSrt")).toBe("Импорт SRT");
});
});