mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
8f691bff5a
Parity proves a locale has every key, not that the key holds the
locale's language: copying the en string passes it, so a feature could
add 26 English copies and stay green. Nothing counted them either. Today
the locales hold 3157 strings marked `// en-fallback` and 1252 unmarked
values identical to en.
scripts/i18n-untranslated.mjs counts both per locale and file and holds
them at scripts/i18n-untranslated-baseline.json, recorded from today's
tree. i18n-parity --strict runs it, so the existing CI step enforces it.
The two counts are separate on purpose: dropping a marker without
translating moves the string from one count to the other and still
fails. --update lowers the baseline to the current counts and never
raises an entry. A missing or malformed baseline, a locale lacking one
of en's files or a value the reader cannot parse is an error, not a
pass.
An identical value is not counted when it reads the same in every
language: after dropping placeholders, markup, URLs, e-mail addresses,
paths and a short list of multi-word names (Google Maps, Home
Assistant), at most one plain word may be left, where acronyms, single
letters and names with an inner capital are not plain words. That
excuses "{count} km", "GPX", "OAuth" and "Budget" and keeps "Source
code" counted.
98 lines
2.7 KiB
JSON
98 lines
2.7 KiB
JSON
{
|
|
"name": "@trek/shared",
|
|
"version": "4.3.3",
|
|
"private": true,
|
|
"description": "Shared API contracts (Zod schemas) — single source of truth for TREK server and client.",
|
|
"type": "module",
|
|
"main": "./dist/index.cjs",
|
|
"module": "./dist/index.mjs",
|
|
"types": "./dist/index.d.cts",
|
|
"exports": {
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.mts",
|
|
"default": "./dist/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.cts",
|
|
"default": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"./i18n": {
|
|
"import": {
|
|
"types": "./dist/i18n/index.d.mts",
|
|
"default": "./dist/i18n/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/i18n/index.d.cts",
|
|
"default": "./dist/i18n/index.cjs"
|
|
}
|
|
},
|
|
"./i18n/*": {
|
|
"import": {
|
|
"types": "./dist/i18n/*/index.d.mts",
|
|
"default": "./dist/i18n/*/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/i18n/*/index.d.cts",
|
|
"default": "./dist/i18n/*/index.cjs"
|
|
}
|
|
},
|
|
"./roadtrip": {
|
|
"import": {
|
|
"types": "./dist/roadtrip/planning.d.mts",
|
|
"default": "./dist/roadtrip/planning.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/roadtrip/planning.d.cts",
|
|
"default": "./dist/roadtrip/planning.cjs"
|
|
}
|
|
}
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"i18n": [
|
|
"./dist/i18n/index.d.cts"
|
|
],
|
|
"i18n/*": [
|
|
"./dist/i18n/*/index.d.cts"
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsdown",
|
|
"build:watch": "tsdown --watch --no-clean",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
"lint": "eslint --fix \"src/**/*.ts\"",
|
|
"i18n:parity": "node scripts/i18n-parity.mjs",
|
|
"i18n:parity:strict": "node scripts/i18n-parity.mjs --strict",
|
|
"contracts:open": "node scripts/open-request-schemas.mjs",
|
|
"i18n:untranslated": "node scripts/i18n-untranslated.mjs",
|
|
"i18n:untranslated:update": "node scripts/i18n-untranslated.mjs --update"
|
|
},
|
|
"dependencies": {
|
|
"isomorphic-dompurify": "^3.23.0",
|
|
"zod": "^4.6.5"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
"@vitest/coverage-v8": "^4.1.11",
|
|
"eslint": "^10.11.0",
|
|
"eslint-config-flat-gitignore": "^2.4.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.6",
|
|
"prettier": "3.9.8",
|
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
"tsdown": "^0.23.0",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.70.0",
|
|
"vitest": "^4.1.11"
|
|
}
|
|
}
|