CI / config (push) Canceled after 0s
CI / test-frontend (push) Canceled after 0s
CI / test-rust (push) Canceled after 0s
CI / test-e2e (push) Canceled after 0s
CI / test-e2e-release (push) Canceled after 0s
CI / build (push) Canceled after 0s
CI / release (push) Canceled after 0s
CI / docker (push) Canceled after 0s
CI / docker-website (push) Canceled after 0s
17 lines
619 B
TypeScript
17 lines
619 B
TypeScript
import { expect, test } from "vitest";
|
|
import { commandNameZhCN } from "./zh_cn.ts";
|
|
|
|
test("translates common command names without changing unknown commands", () => {
|
|
expect(commandNameZhCN("Editor: Toggle Dark Mode")).toBe(
|
|
"编辑器:切换深色模式",
|
|
);
|
|
expect(commandNameZhCN("Navigate: Page Picker")).toBe("导航:打开页面");
|
|
expect(commandNameZhCN("My Plug: Custom Action")).toBe(
|
|
"My Plug: Custom Action",
|
|
);
|
|
});
|
|
|
|
test("translates known namespaces for commands added by compatible plugs", () => {
|
|
expect(commandNameZhCN("Page: Custom Action")).toBe("页面:Custom Action");
|
|
});
|