@baukit/localization-core 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@baukit/localization-core`
|
|
2
2
|
|
|
3
3
|
`@baukit/localization-core` provides dependency-free locale resolution, catalog key comparison,
|
|
4
4
|
stable-code localization, and explicit-locale `Intl` formatter factories. Products supply the
|
|
5
5
|
supported locale list, fallback locale, translation catalogs, and copy.
|
|
6
6
|
|
|
7
|
-
The package does not include translations, product catalog IDs, persistence, React providers,
|
|
8
|
-
Expo Localization, or a localization library. It also does not choose plural or unit policy for
|
|
9
|
-
an application.
|
|
10
|
-
|
|
11
7
|
i18next and React composition stays in the consuming app. Resolve and hydrate the locale before
|
|
12
8
|
rendering localized UI, then pass that resolved locale to this package's formatter factories.
|
|
13
9
|
|
|
@@ -37,3 +33,13 @@ addCivilDays('2026-03-07', 1); // '2026-03-08', DST does not shift a calendar da
|
|
|
37
33
|
day.
|
|
38
34
|
- `assertTimeZone(zone)` validates an IANA zone. `resolvedTimeZone()` reads the host zone; every
|
|
39
35
|
other function takes the zone explicitly, so nothing silently depends on where the process runs.
|
|
36
|
+
|
|
37
|
+
## Boundaries
|
|
38
|
+
|
|
39
|
+
The package does not include translations, product catalog IDs, persistence, React providers, Expo
|
|
40
|
+
Localization, or a localization library. It also does not choose plural or unit policy for an
|
|
41
|
+
application.
|
|
42
|
+
|
|
43
|
+
Every function that depends on a locale or a time zone takes it as an argument. `resolvedTimeZone()`
|
|
44
|
+
is the one reader of host state, and it is a separate call you make deliberately. That is what keeps
|
|
45
|
+
a test suite from passing in Berlin and failing in CI.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baukit/localization-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Dependency-free locale resolution, catalog key comparison, stable-code localization, and explicit-locale Intl formatter factories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Patrick Koss",
|
|
@@ -32,14 +32,15 @@
|
|
|
32
32
|
"README.md",
|
|
33
33
|
"LICENSE"
|
|
34
34
|
],
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"typescript": "6.0.3",
|
|
37
|
-
"vitest": "4.1.10"
|
|
38
|
-
},
|
|
39
35
|
"scripts": {
|
|
40
36
|
"build": "tsc -p tsconfig.json",
|
|
37
|
+
"prepare": "pnpm run build",
|
|
41
38
|
"test": "vitest run --config ../../vitest.config.ts",
|
|
42
39
|
"lint": "eslint src --max-warnings=0",
|
|
43
40
|
"format:check": "prettier --check src package.json tsconfig.json"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"typescript": "6.0.3",
|
|
44
|
+
"vitest": "4.1.10"
|
|
44
45
|
}
|
|
45
|
-
}
|
|
46
|
+
}
|