Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore(i18n): mark German matching-data in voice_command_gate.py (part 1)

Ruben Lütke2695bed51684
diff --git a/jarvis/brain/voice_command_gate.py b/jarvis/brain/voice_command_gate.py
index 6e5edbb6a3..084e46183e 100644
--- a/jarvis/brain/voice_command_gate.py
+++ b/jarvis/brain/voice_command_gate.py
@@ -36,15 +36,15 @@ _PROVIDER_ALIASES = (
# Strict: "wechsel auf X", "switch to X", "wechsle zu X", "nutze X" — plus the
# natural-phrasing filler "[den/the/deinen] [brain ]provider/anbieter/modell"
# between the verb and the target (added 2026-06-08). Without that filler,
-# "switch the brain provider to gemini" / "wechsel den Brain-Provider auf X"
+# "switch the brain provider to gemini" / "wechsel den Brain-Provider auf X" # i18n-allow: quoted German input example
# fell through to the router LLM, which (told it had "no authority" to switch)
-# refused with "keine Berechtigung". A still-strict gate: it ends in a known
+# refused with "keine Berechtigung" ("no permission"). A still-strict gate: it ends in a known
# provider alias with a word boundary, so harmless sentences never match.
# The German imperative paradigm needs two stems: "wechsel" and "wechsle".
_PROVIDER_PATTERN = re.compile(
- r"\b(?:wechsel[n]?|wechsle|änder\w*|aender\w*|setz\w*|stell\w*"
+ r"\b(?:wechsel[n]?|wechsle|änder\w*|aender\w*|setz\w*|stell\w*" # i18n-allow: German provider-switch input-matching data
r"|switch(?:\s+to)?|benutze?|nutze|use|nimm)"
- r"(?:\s+(?:den|die|das|der|the|deinen|deine|dein|meinen|meine|mein|my))?"
+ r"(?:\s+(?:den|die|das|der|the|deinen|deine|dein|meinen|meine|mein|my))?" # i18n-allow: German provider-switch input-matching data
r"(?:\s+(?:brain[-\s]*provider|provider|anbieter|sprach[-\s]*modell|modell|model))?"
# Optional "von/from <source>" so "switch FROM gemini TO openai" targets the
# destination after auf/zu/to, not the source (forensic 2026-06-27).
@@ -58,14 +58,14 @@ _PROVIDER_PATTERN = re.compile(
# sentence start OR preceded by "jarvis", to avoid catching harmless phrases
# like "stopp doch mal kurz".
_CANCEL_PATTERN = re.compile(
- r"^(?:jarvis[,\s]+)?(?:stopp?|abbruch|abbrechen|cancel|stop\s+sub|halt)\b",
+ r"^(?:jarvis[,\s]+)?(?:stopp?|abbruch|abbrechen|cancel|stop\s+sub|halt)\b", # i18n-allow: German cancel-command input-matching data
re.IGNORECASE,
)
# Depth override: "denk gruendlich" / "denk schnell" / "think hard" — kept
# intentionally as-is (already proven). We reuse the list from manager.py.
_DEEP_PATTERNS = (
- "denk gründlich", "denk gruendlich", "denk tief", "denk mal gründlich",
+ "denk gründlich", "denk gruendlich", "denk tief", "denk mal gründlich", # i18n-allow: German depth-override input-matching data
"think hard", "think deeply", "deep thinking",
"nimm opus", "use opus", "opus-modus",
)
@@ -79,11 +79,11 @@ _FAST_PATTERNS = (
# "respond in German" must be a DETERMINISTIC, provider-independent action (set
# brain.reply_language directly) — not an LLM tool-choice, never a worker
# mission. A language word ALONE never matches; it needs an intent marker:
-# (a) an unambiguous CHANGE verb (umstell/umänder/wechsel/änder/switch/change),
+# (a) an unambiguous CHANGE verb (umstell/umänder/wechsel/änder/switch/change), # i18n-allow: quoted German input-matching verb stems
# (b) a bare imperative SPEAK verb (sprich/speak <lang>), or
# (c) an OUTPUT verb (antwort/respond/reply/answer/rede/set/stell/mach) plus a
# directional preposition (auf/in/zu/to <lang>).
-# So "wie heißt das auf Englisch?", "ich spreche Englisch", "auf Deutsch klingt
+# So "wie heißt das auf Englisch?", "ich spreche Englisch", "auf Deutsch klingt # i18n-allow: quoted German input examples that must NOT match
# das besser", "erzähl mir was auf Englisch" still fall through to the brain.
_LANG_ALIASES: dict[str, str] = {
"englisch": "en", "english": "en",
@@ -91,10 +91,10 @@ _LANG_ALIASES: dict[str, str] = {
"spanisch": "es", "spanish": "es", "español": "es", "espanol": "es", "castellano": "es",
"automatisch": "auto", "automatik": "auto", "automatic": "auto", "auto": "auto",
}
-# (a) Unambiguous change verbs — incl. German separable forms ("umändern",
+# (a) Unambiguous change verbs — incl. German separable forms ("umändern", # i18n-allow: quoted German verb-form examples
# "umstellen") whose "um" prefix breaks a plain "\bänder" boundary.
_LANG_CHANGE_VERB = re.compile(
- r"\b(?:um(?:stell|schalt|änder|aender|stellung)\w*|wechsel\w*|wechsle"
+ r"\b(?:um(?:stell|schalt|änder|aender|stellung)\w*|wechsel\w*|wechsle" # i18n-allow: German change-verb input-matching data
r"|änder\w*|aender\w*|switch\w*|change\w*)\b",
re.IGNORECASE,
)