@hagicode/hagi18n 0.1.1 → 0.3.0
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 +40 -39
- package/README_cn.md +46 -37
- package/dist/cli.js +32 -15
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.js +75 -4
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/locale-name.d.ts +1 -0
- package/dist/locale-name.js +26 -0
- package/dist/locale-name.js.map +1 -0
- package/dist/locale-toolkit.d.ts +7 -1
- package/dist/locale-toolkit.js +115 -30
- package/dist/locale-toolkit.js.map +1 -1
- package/package.json +20 -8
- package/skills/hagi18n/references/cli-workflows.md +1 -1
- package/skills/hagi18n/references/config-and-layout.md +18 -0
- package/skills/hagi18n/references/development-and-validation.md +10 -10
|
@@ -81,6 +81,24 @@ doctor:
|
|
|
81
81
|
2. `hagi18n.yaml` or `hagi18n.yml`
|
|
82
82
|
3. package defaults
|
|
83
83
|
|
|
84
|
+
## Audit identical-value allowlist
|
|
85
|
+
|
|
86
|
+
`auditIdenticalAllowlist` exempts exact translation values that are meant to equal the English baseline, such as brand names or technical identifiers. It maps a locale-relative YAML file path (forward slashes) to dot-separated scalar key paths:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
auditIdenticalAllowlist:
|
|
90
|
+
common.yml:
|
|
91
|
+
- brand.name
|
|
92
|
+
pages/home.yml:
|
|
93
|
+
- hero.cta
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
- It suppresses only the `baselineValueMatches` entry for the exact file and key path. It applies to every target locale and does not change any other audit check.
|
|
97
|
+
- It does not accept globs, patterns, or value-based rules.
|
|
98
|
+
- It is not `doctor.allowlist`. `doctor.allowlist` filters repository-scan findings by rule id and source file path and does not affect audit output.
|
|
99
|
+
- Across config layers, a higher-precedence list for a file replaces the lower-precedence list for that file. Files defined only in the lower layer keep their lists.
|
|
100
|
+
- When absent, the resolved allowlist is `{}` and audit output is unchanged.
|
|
101
|
+
|
|
84
102
|
## Current doctor defaults
|
|
85
103
|
|
|
86
104
|
Default excluded directories:
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
Run these from `repos/hagi18n`:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
pnpm test
|
|
9
|
+
pnpm run build
|
|
10
|
+
pnpm run lint
|
|
11
|
+
pnpm run pack:check
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Useful package maintenance helpers:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
pnpm run publish:check-prereqs
|
|
18
|
+
pnpm run publish:prepare-dev-version
|
|
19
|
+
pnpm run publish:verify-release
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Source map
|
|
@@ -36,9 +36,9 @@ npm run publish:verify-release
|
|
|
36
36
|
## Validation expectations after edits
|
|
37
37
|
|
|
38
38
|
- Run the narrowest relevant tests first if the change is isolated.
|
|
39
|
-
- Run `
|
|
40
|
-
- Run `
|
|
41
|
-
- Run `
|
|
39
|
+
- Run `pnpm test` after source or skill-related packaging changes.
|
|
40
|
+
- Run `pnpm run build` after TypeScript or export changes.
|
|
41
|
+
- Run `pnpm run pack:check` when package contents or publish-facing files change.
|
|
42
42
|
|
|
43
43
|
## Behavior references
|
|
44
44
|
|