@ggdna/dna-translate 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) ggsuite
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # dna_translate
2
+
3
+ The DNA layer that keeps documentation in sync across languages.
4
+
5
+ ## Guides
6
+
7
+ - `dna/doc/guides/translate-guide.md` — when and how to translate `doc`,
8
+ `doc/de`, `README.md` and `README.de.md`, and where blog posts of each
9
+ language belong
10
+
11
+ ## Templates
12
+
13
+ - `dna/doc/templates/blog-template-de.md` — the structure of a german
14
+ blog post; the english one comes from
15
+ [dna_blog](https://github.com/ggdna/dna_blog)
16
+
17
+ ## Skills
18
+
19
+ - `/translate` — reports missing counterparts and pairs that drifted
20
+ apart, then translates what is missing
21
+
22
+ ## Layers
23
+
24
+ Orthogonal: this layer carries only its own topic and is combined with
25
+ other layers by the consuming repo.
26
+
27
+ ## Variables
28
+
29
+ - `dnaCopyrightHolder` — the name in the license header of every file
30
+ - `dnaYear` — the year folder blog posts are filed under
31
+
32
+ ## Usage
33
+
34
+ Declare it as a dev-dependency and initialize once:
35
+
36
+ ```bash
37
+ pnpm add -D @ggdna/dna-translate # TypeScript projects
38
+ dart pub add dev:dna_translate # Dart projects
39
+ helix init
40
+ ```
41
+
42
+ The placed test instantiates and verifies the DNA on every test run.
43
+
44
+ ## Development
45
+
46
+ The `dna/` folder is hand-authored source and is never generated. The repo
47
+ instantiates its own DNA — run `dart test` after changes; commit first, a
48
+ file the DNA would overwrite must not carry uncommitted work.
package/dna/_dna.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ // This package is a DNA layer: dna/ is hand-authored source and is the
3
+ // last layer of its own instantiation.
4
+ "version": 1,
5
+
6
+ // No parent DNA. This layer is orthogonal: it carries only its own topic
7
+ // and is combined with dna_base and other layers by the consumer.
8
+ "layers": []
9
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "version": 1,
3
+ "layers": [
4
+ {
5
+ "name": "base",
6
+ "package": "helix",
7
+ "ecosystem": null,
8
+ "resolvedVersion": "1.0.0",
9
+ "via": null,
10
+ "hash": "0x705e486e88a93125"
11
+ },
12
+ {
13
+ "name": "self",
14
+ "package": null,
15
+ "ecosystem": null,
16
+ "resolvedVersion": null,
17
+ "via": null,
18
+ "hash": "0x1c92ce37a7ede19b"
19
+ }
20
+ ],
21
+ "claude": {
22
+ "claudeMdInclude": null
23
+ },
24
+ "baseVersion": "1.0.0",
25
+ "baseHash": "0x705e486e88a93125",
26
+ "instances": [
27
+ {
28
+ "path": ".claude/skills/translate/SKILL.md",
29
+ "hash": "0x9ade789b3ae72f2e"
30
+ },
31
+ {
32
+ "path": "doc/guides/translate-guide.md",
33
+ "hash": "0x636217bf10513749"
34
+ },
35
+ {
36
+ "path": "doc/hello_world.md",
37
+ "hash": "0x0903f7fc5224f6f1"
38
+ },
39
+ {
40
+ "path": "doc/templates/blog-template-de.md",
41
+ "hash": "0x4f48f2db12a5ca19"
42
+ }
43
+ ]
44
+ }
package/dna/_vars.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "dnaCopyrightHolder": "ggsuite",
3
+ "dnaYear": "2026"
4
+ }
@@ -0,0 +1,28 @@
1
+ <!--
2
+ @license
3
+ Copyright (c) dnaCopyrightHolder
4
+
5
+ Use of this source code is governed by terms that can be
6
+ found in the LICENSE file in the root of this package.
7
+ -->
8
+
9
+ # Translate Guide
10
+
11
+ - Keep English documentation in `doc`, German documentation in `doc/de`
12
+ - Make sure changes in German documentation
13
+ (`doc/de`, `README.de.md`) are translated into English and vice versa
14
+ - Use existing translated files
15
+ - Create for each file in `doc` a corresponding file in `doc/de` and vice versa
16
+ - Start documentation in the language of the prompt
17
+ - Translate shortly before publishing
18
+ - Translate content- and structure-equal
19
+ - Do not translate commands, code, paths, APIS
20
+ - Do not translate literally
21
+
22
+ ## Blog posts
23
+
24
+ - Start a post in the language of the prompt
25
+ - Put english posts into `blog/dnaYear`, german ones into `blog/de/dnaYear`
26
+ - Copy `doc/templates/blog-template-de.md` for a german post
27
+ - Keep the file name in english kebab case in both languages
28
+ - Follow the [Blog Guide](doc/guides/blog-guide.md) for everything else
@@ -0,0 +1,30 @@
1
+ <!--
2
+ @license
3
+ Copyright (c) dnaCopyrightHolder
4
+
5
+ Use of this source code is governed by terms that can be
6
+ found in the LICENSE file in the root of this package.
7
+ -->
8
+
9
+ # Titel
10
+
11
+ ## Motivation
12
+
13
+ - Warum, wozu, für wen — das größere Ziel, nicht nur der Auslöser.
14
+
15
+ ## Strategie
16
+
17
+ - Wie das Ziel erreicht wurde. 3–7 Stichpunkte.
18
+
19
+ ## Realisierung 1
20
+
21
+ - Eine fokussierte Sektion pro Umsetzungsschritt / Arbeitspaket.
22
+ - 3-7 Stichpunkte
23
+
24
+ ## Realisierung 2
25
+
26
+ - ..
27
+
28
+ ## Offene Punkte
29
+
30
+ - Noch nicht fertig, bekannte Einschränkungen, vertagte Entscheidungen.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: translate
3
+ description: Checks whether documentation is out of sync between English and German and translates what is missing. Use when the user says "/translate" or asks whether anything needs translating.
4
+ ---
5
+
6
+ <!--
7
+ @license
8
+ Copyright (c) dnaCopyrightHolder
9
+
10
+ Use of this source code is governed by terms that can be
11
+ found in the LICENSE file in the root of this package.
12
+ -->
13
+
14
+ # Translate
15
+
16
+ Read `doc/guides/translate-guide.md` and follow it.
17
+
18
+ ## 1. Find what is out of sync
19
+
20
+ List the English documentation (`doc`, `README.md`) and the German one
21
+ (`doc/de`, `README.de.md`).
22
+
23
+ Report three groups:
24
+
25
+ - English files without a German counterpart
26
+ - German files without an English counterpart
27
+ - pairs whose newer side changed after the older one, from `git log -1`
28
+
29
+ Cover the blog the same way: `blog/<year>` against `blog/de/<year>`.
30
+
31
+ Stop here and report when every pair is complete and current — there is
32
+ nothing to translate.
33
+
34
+ ## 2. Translate what is missing
35
+
36
+ Translate content- and structure-equal, never literally.
37
+
38
+ Do not translate commands, code, paths or API names.
39
+
40
+ ## 3. Show the result
41
+
42
+ List every file you wrote, then let the user review before committing.
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@ggdna/dna-translate",
3
+ "version": "0.1.0",
4
+ "description": "DNA layer: multi-language rules for guides, docs and README files",
5
+ "keywords": [
6
+ "dna",
7
+ "helix",
8
+ "conventions",
9
+ "scaffolding"
10
+ ],
11
+ "homepage": "https://github.com/ggdna/dna_translate",
12
+ "bugs": "https://github.com/ggdna/dna_translate/issues",
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/ggdna/dna_translate.git"
17
+ },
18
+ "type": "module",
19
+ "files": [
20
+ "dna",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "engines": {
25
+ "node": ">=22"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "scripts": {
31
+ "test:dart": "dart test",
32
+ "test": "pnpm run test:dart",
33
+ "prepublishOnly": "pnpm run test",
34
+ "format": "prettier --write .",
35
+ "format:check": "prettier --check ."
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^26.2.0",
39
+ "prettier": "^3.9.6"
40
+ }
41
+ }