Files
zeekay 0e90bb83c9 @hanzo/i18n 0.5.0: <T> is extracted, format writes figures
The extractor reads the children of <T> as keys. JSX text is normalized
by the compiler before T sees it, so the key is SWC's rule applied to
the source (tools/extract/src/jsx.ts): entities decoded, lines cut at
every terminator, spaces and tabs trimmed where they touch a break
unless an entity wrote them, the rest joined by one space. Each case is
compiled with esbuild and held equal to the children T receives; the
same cases and the entity edges were measured against Next 16.3's SWC.

useI18n().format (and format(locale) from the root) is Intl at the
locale: number, percent, money, date, relative and list, with Intl's
options passed through, so en-US output is toLocaleString's byte for
byte. Right to left every result is one isolate and a list isolates
each item, so Latin names read right to left; isolate leaves a whole
isolate alone, so a figure handed to t carries one pair of marks. The
browser test reads Arabic and ar-EG digits, one isolate per figure,
and the list's order, which fails without the item isolates.

Claude-Session: https://claude.ai/code/session_01BLLMyBFSvAfCt7ZGqYuiEz
2026-10-22 15:25:09 -07:00

35 lines
718 B
JSON

{
"name": "@hanzo/i18n-extract",
"version": "0.1.0",
"private": true,
"license": "BSD-3-Clause",
"type": "module",
"bin": {
"i18n-extract": "dist/cli.js"
},
"dependencies": {
"@hanzo/i18n": "workspace:^",
"typescript": "6.0.3"
},
"scripts": {
"build": "tsc",
"test": "node --test --experimental-strip-types test/*.ts",
"typecheck": "../../node_modules/tsgo/bin/tsc --noEmit --incremental false"
},
"devDependencies": {
"@types/node": "^20.0.0",
"esbuild": "^0.28.2"
},
"main": "dist/scan.js",
"types": "dist/scan.d.ts",
"exports": {
".": {
"types": "./dist/scan.d.ts",
"default": "./dist/scan.js"
}
},
"files": [
"dist"
]
}