mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 02:29:55 +02:00
feat(l10n): single-source localization pipeline
Add localization/ — one strings.json is the source of truth for every
user-facing string, and a Bun CLI generates the platform files:
loc migrate rebuild strings.json from existing platform files (one-time)
loc validate structural checks (plural `other`, arg refs, coverage)
loc generate emit .xcstrings (Apple) + per-language strings.xml (KMP)
Canonical `{name}` placeholders are converted to each platform's positional
printf tokens using declared arg types. Plurals use CLDR categories and emit
native forms: xcstrings plural variations and Compose <plurals> blocks.
Migration folds the KMP `transfer_file_count_one`/`_other` pair into a single
plural key, so `transferFileCountResource` now returns the plural resource and
callers resolve it with pluralStringResource.
This commit is contained in:
18
localization/package.json
Normal file
18
localization/package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "vnidrop-localization",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Single-source localization for VniDrop: strings.json -> .xcstrings (Apple) + per-language strings.xml (KMP/Compose).",
|
||||
"bin": {
|
||||
"loc": "./src/cli.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"migrate": "bun run src/cli.ts migrate",
|
||||
"generate": "bun run src/cli.ts generate",
|
||||
"validate": "bun run src/cli.ts validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bun-types": "^1.3.14"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user