@daanvandenbergh/i18nkit 1.0.0 → 1.0.1
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 +23 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,31 +34,41 @@ npm install @daanvandenbergh/i18nkit
|
|
|
34
34
|
|
|
35
35
|
`react` / `react-dom` are optional peer dependencies - you only need them if you use the `/react` entry.
|
|
36
36
|
|
|
37
|
-
## Install the Claude Code
|
|
37
|
+
## Install the Claude Code skills
|
|
38
38
|
|
|
39
|
-
i18nkit ships
|
|
40
|
-
that bypass the type-safe system (and, if you use `@daanvandenbergh/blogkit`, checks every post has a
|
|
41
|
-
translation and its own localized hero for each locale). It is report-only by default; run it with `/i18nkit-sweep`.
|
|
39
|
+
i18nkit ships two agent skills:
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
- **`i18nkit-sweep`** - sweeps your source for user-facing strings that bypass the type-safe system
|
|
42
|
+
(and, if you use `@daanvandenbergh/blogkit`, checks every post has a translation and its own
|
|
43
|
+
localized hero for each locale). Report-only by default; run it with `/i18nkit-sweep`.
|
|
44
|
+
- **`i18nkit-add-locale`** - adds a new language: edits your `I18n` config, then compiler-drives the
|
|
45
|
+
translation of every catalog entry `tsc` flags (plus blogkit posts and hardcoded locale lists).
|
|
46
|
+
Run it with `/i18nkit-add-locale`.
|
|
47
|
+
|
|
48
|
+
Wire them into Claude Code with **symlinks**, so they track the installed package version - an
|
|
49
|
+
`npm update` keeps the skills current, with no copy to re-sync:
|
|
45
50
|
|
|
46
51
|
```bash
|
|
47
52
|
mkdir -p .claude/skills
|
|
48
53
|
# from your project root (assumes .claude/skills/ and node_modules/ share this root):
|
|
49
|
-
|
|
54
|
+
for skill in i18nkit-sweep i18nkit-add-locale; do
|
|
55
|
+
ln -s "../../node_modules/@daanvandenbergh/i18nkit/skills/$skill" ".claude/skills/$skill"
|
|
56
|
+
done
|
|
50
57
|
```
|
|
51
58
|
|
|
52
|
-
If your layout differs, point the
|
|
59
|
+
If your layout differs, point the links at an absolute target resolved by node:
|
|
53
60
|
|
|
54
61
|
```bash
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
pkg="$(dirname "$(node -p "require.resolve('@daanvandenbergh/i18nkit/package.json')")")"
|
|
63
|
+
for skill in i18nkit-sweep i18nkit-add-locale; do
|
|
64
|
+
ln -s "$pkg/skills/$skill" "$(pwd)/.claude/skills/$skill"
|
|
65
|
+
done
|
|
57
66
|
```
|
|
58
67
|
|
|
59
|
-
Verify with `ls .claude/skills/i18nkit-sweep/SKILL.md
|
|
60
|
-
|
|
61
|
-
Link the source
|
|
68
|
+
Verify with `ls .claude/skills/i18nkit-sweep/SKILL.md .claude/skills/i18nkit-add-locale/SKILL.md`, then
|
|
69
|
+
invoke `/i18nkit-sweep` or `/i18nkit-add-locale` in Claude Code. (The targets exist once you have run
|
|
70
|
+
`npm install`.) Developing against a local checkout of this repo? Link the source folders instead:
|
|
71
|
+
`ln -s ../../skills/$skill .claude/skills/$skill`.
|
|
62
72
|
|
|
63
73
|
## Set up once
|
|
64
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daanvandenbergh/i18nkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Type-safe i18n for TypeScript - miss a translation and it's a compile error. Framework-agnostic core, optional React layer, and a Claude Code skill that sweeps for untranslated strings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Daan van den Bergh",
|