i18n-literals checked title, aria-label, placeholder and alt on elements, but not the same English passed to a component, so a MenuItem label or a Popover ariaLabel written as a literal went through. It also excused a literal that happened to be a catalogue key. That exemption is meant for English held in a constant and translated where it renders, and a literal written straight into a JSX attribute has no such render site. No component passes its props through t(). And neither half of i18n:check was run with --check, so a finding printed and the script still exited 0. Component props are checked now, a key no longer excuses a literal in an attribute, and both scripts run with --check. That found 28 strings rendering English in every language: 19 already had keys and are wrapped, and 9 are new keys in all nine catalogues. The contact editor's Save and Saving… buttons are wrapped as well, on the same line.
35 lines
1.6 KiB
JSON
35 lines
1.6 KiB
JSON
{
|
|
"name": "ihasmail",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"description": "ihasmail \u2014 a fast, modern JMAP webmail for Stalwart Mail Server",
|
|
"license": "AGPL-3.0-or-later",
|
|
"type": "module",
|
|
"workspaces": [
|
|
"server",
|
|
"web"
|
|
],
|
|
"engines": {
|
|
"node": ">=20.19"
|
|
},
|
|
"scripts": {
|
|
"dev": "concurrently -n server,web -c blue,magenta \"npm run dev -w server\" \"npm run dev -w web\"",
|
|
"build": "npm run build -w web && npm run build -w server",
|
|
"start": "node server/dist/index.js",
|
|
"typecheck": "npm run typecheck -w web && npm run typecheck -w server",
|
|
"test": "npm run test -w web && npm run test -w server",
|
|
"lint": "npm run typecheck",
|
|
"mock": "npm run mock -w server",
|
|
"dev:mock": "concurrently -n mock,server,web -c yellow,blue,magenta \"npm run mock -w server\" \"STALWART_URL=http://127.0.0.1:8788 npm run dev -w server\" \"npm run dev -w web\"",
|
|
"dev:mock:no-future-release": "concurrently -n mock,server,web -c yellow,blue,magenta \"npm run mock:no-future-release -w server\" \"STALWART_URL=http://127.0.0.1:8788 npm run dev -w server\" \"npm run dev -w web\"",
|
|
"i18n:coverage": "node scripts/i18n-coverage.mjs",
|
|
"i18n:check": "node scripts/i18n-catalog-check.mjs --check && node scripts/i18n-literals.mjs --check",
|
|
"dev:mock:no-keyword-sort": "concurrently -n mock,server,web -c yellow,blue,magenta \"npm run mock:no-keyword-sort -w server\" \"STALWART_URL=http://127.0.0.1:8788 npm run dev -w server\" \"npm run dev -w web\""
|
|
},
|
|
"devDependencies": {
|
|
"concurrently": "^9.1.2",
|
|
"typescript": "^7.0.2",
|
|
"typescript-ast": "npm:typescript@^5.9.3"
|
|
}
|
|
}
|