Files
CherryHQ-cherry-studio/scripts/check-i18n.ts
fullex 70909eddc5 chore(i18n): fail loudly on non-literal main t() and add coverage tests
Follow-ups from reviewing the i18n split:

- check-i18n: the main key-coverage guard silently skipped any t() call whose
  key was not a string literal, so a future t(someVar) in main would ship
  unverified against the small main catalog. It now reports non-literal t()
  calls as a hard failure, matching the intent that main use literal keys.
- main i18n test: cover the getAppLanguage() branch where the system locale is
  absent from the catalog and resolution falls back to the default language.
- renderer i18n test: capture the language to restore inside beforeAll — at
  module-collection time lazy init has not run yet, so i18n.language was
  undefined and afterAll restored to undefined.
2026-07-03 08:13:04 -07:00

7.9 KiB