diff --git a/desktop/src/__tests__/untranslatedText.test.ts b/desktop/src/__tests__/untranslatedText.test.ts new file mode 100644 index 00000000..ba5f8751 --- /dev/null +++ b/desktop/src/__tests__/untranslatedText.test.ts @@ -0,0 +1,223 @@ +// @vitest-environment node +import { readdirSync, readFileSync } from 'node:fs' +import path from 'node:path' +import ts from 'typescript' +import { describe, expect, it } from 'vitest' + +/** + * Text a user reads has to come from the locale files. A string typed straight + * into JSX renders the same in every locale, and nothing else notices: the + * "1 image" header over the pictures in a reply stayed English in the Chinese UI. + * + * So every component is read here. JSX text, the attributes a user reads or a + * screen reader speaks, and string literals rendered as children all have to go + * through `t()`. Text inside , ,
 or