Skip to content

Commit a336b6d

Browse files
authored
docs: add translations section to steering docs (#1529)
* Add translations to steering docs * Add commit message and PR title steering
1 parent c2bf2df commit a336b6d

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.kiro/steering/project-management.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ Example:
5858
- Part of #456
5959
```
6060

61+
## Commit Messages & PR Titles
62+
63+
- Describe the change conceptually (e.g., "Add vertex filtering to graph view")
64+
- Do not use conventional commit prefixes like `docs:`, `feature:`, `refactor:`,
65+
`fix:`, etc.
66+
6167
## Pull Requests
6268

6369
- Always publish pull requests as drafts

.kiro/steering/structure.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,38 @@ accidental mixing of similar types at compile time.
132132
Always use the appropriate branded type instead of `string` when working with
133133
these identifiers.
134134

135+
## Translations (Query-Language Labels)
136+
137+
The translation system is not used for locale/language translations. Instead, it
138+
swaps UI labels based on the active connection's query language. Each query
139+
language (Gremlin, openCypher, SPARQL) has its own JSON file in
140+
`src/hooks/translations/` that maps keys to display strings (e.g., `"node-type"`
141+
`"Node Label"` in Gremlin vs `"Class"` in SPARQL).
142+
143+
Key files:
144+
145+
- `src/hooks/useTranslations.ts``useTranslations()` hook returns a `t`
146+
function scoped to the current query engine
147+
- `src/hooks/translations/gremlin-translations.json`
148+
- `src/hooks/translations/openCypher-translations.json`
149+
- `src/hooks/translations/sparql-translations.json`
150+
151+
Usage:
152+
153+
```tsx
154+
const t = useTranslations();
155+
// t("node-type") → "Node Label" (Gremlin) or "Class" (SPARQL)
156+
```
157+
158+
Key naming conventions:
159+
160+
- Lower-case kebab-case (e.g., `node-type`, `edge-connections`)
161+
- Keys should read naturally as stand-ins for the word they represent
162+
- Keys typically match one of the query language terms or the codebase
163+
vocabulary
164+
- Nested keys use dot notation when accessed (e.g.,
165+
`node-expand.no-selection-title`)
166+
135167
## Database Queries
136168

137169
- Use the `query` template tag from `@/utils` for all query strings (Gremlin,

0 commit comments

Comments
 (0)