@@ -132,6 +132,38 @@ accidental mixing of similar types at compile time.
132132Always use the appropriate branded type instead of ` string ` when working with
133133these 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