modelProviderCodingPlanI18n.test.ts 706 B

12345678910111213141516
  1. import { describe, expect, it } from "vitest";
  2. import enUS from "../src/i18n/locales/en-US.js";
  3. import zhCN from "../src/i18n/locales/zh-CN.js";
  4. describe("model provider Coding Plan i18n", () => {
  5. it("keeps Coding Plan message ids localized in zh-CN", () => {
  6. const prefix = "settings.modelProvider.codingPlan";
  7. const enKeys = Object.keys(enUS).filter((key) => key.startsWith(prefix));
  8. for (const key of enKeys) {
  9. // Bugfix: Coding Plan 新增文案时只补了英文 locale,中文界面会直接显示 message id。
  10. // 这里用英文 key 集合作为基准,避免后续再漏掉中文翻译。
  11. expect(zhCN[key], `zh-CN missing ${key}`).toBeTruthy();
  12. }
  13. });
  14. });