Skip to content

Commit 74bf833

Browse files
committed
Localize the auto-approve menu
1 parent 5af07d2 commit 74bf833

File tree

20 files changed

+942
-48
lines changed

20 files changed

+942
-48
lines changed

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
22
import { useCallback, useState } from "react"
33
import { useExtensionState } from "../../context/ExtensionStateContext"
4+
import { useAppTranslation } from "../../i18n/TranslationContext"
45
import { vscode } from "../../utils/vscode"
56

67
interface AutoApproveAction {
@@ -38,63 +39,64 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
3839
setAutoApprovalEnabled,
3940
} = useExtensionState()
4041

42+
const { t } = useAppTranslation()
43+
4144
const actions: AutoApproveAction[] = [
4245
{
4346
id: "readFiles",
44-
label: "Read files and directories",
45-
shortName: "Read",
47+
label: t("chat:autoApprove.actions.readFiles.label"),
48+
shortName: t("chat:autoApprove.actions.readFiles.shortName"),
4649
enabled: alwaysAllowReadOnly ?? false,
47-
description: "Allows access to read any file on your computer.",
50+
description: t("chat:autoApprove.actions.readFiles.description"),
4851
},
4952
{
5053
id: "editFiles",
51-
label: "Edit files",
52-
shortName: "Edit",
54+
label: t("chat:autoApprove.actions.editFiles.label"),
55+
shortName: t("chat:autoApprove.actions.editFiles.shortName"),
5356
enabled: alwaysAllowWrite ?? false,
54-
description: "Allows modification of any files on your computer.",
57+
description: t("chat:autoApprove.actions.editFiles.description"),
5558
},
5659
{
5760
id: "executeCommands",
58-
label: "Execute approved commands",
59-
shortName: "Commands",
61+
label: t("chat:autoApprove.actions.executeCommands.label"),
62+
shortName: t("chat:autoApprove.actions.executeCommands.shortName"),
6063
enabled: alwaysAllowExecute ?? false,
61-
description:
62-
"Allows execution of approved terminal commands. You can configure this in the settings panel.",
64+
description: t("chat:autoApprove.actions.executeCommands.description"),
6365
},
6466
{
6567
id: "useBrowser",
66-
label: "Use the browser",
67-
shortName: "Browser",
68+
label: t("chat:autoApprove.actions.useBrowser.label"),
69+
shortName: t("chat:autoApprove.actions.useBrowser.shortName"),
6870
enabled: alwaysAllowBrowser ?? false,
69-
description: "Allows ability to launch and interact with any website in a headless browser.",
71+
description: t("chat:autoApprove.actions.useBrowser.description"),
7072
},
7173
{
7274
id: "useMcp",
73-
label: "Use MCP servers",
74-
shortName: "MCP",
75+
label: t("chat:autoApprove.actions.useMcp.label"),
76+
shortName: t("chat:autoApprove.actions.useMcp.shortName"),
7577
enabled: alwaysAllowMcp ?? false,
76-
description: "Allows use of configured MCP servers which may modify filesystem or interact with APIs.",
78+
description: t("chat:autoApprove.actions.useMcp.description"),
7779
},
7880
{
7981
id: "switchModes",
80-
label: "Switch modes",
81-
shortName: "Modes",
82+
label: t("chat:autoApprove.actions.switchModes.label"),
83+
shortName: t("chat:autoApprove.actions.switchModes.shortName"),
8284
enabled: alwaysAllowModeSwitch ?? false,
83-
description: "Allows automatic switching between different modes without requiring approval.",
85+
description: t("chat:autoApprove.actions.switchModes.description"),
8486
},
8587
{
8688
id: "subtasks",
87-
label: "Create & complete subtasks",
88-
shortName: "Subtasks",
89+
label: t("chat:autoApprove.actions.subtasks.label"),
90+
shortName: t("chat:autoApprove.actions.subtasks.shortName"),
8991
enabled: alwaysAllowSubtasks ?? false,
90-
description: "Allow creation and completion of subtasks without requiring approval.",
92+
description: t("chat:autoApprove.actions.subtasks.description"),
9193
},
9294
{
9395
id: "retryRequests",
94-
label: "Retry failed requests",
95-
shortName: "Retries",
96+
label: t("chat:autoApprove.actions.retryRequests.label"),
97+
shortName: t("chat:autoApprove.actions.retryRequests.shortName"),
9698
enabled: alwaysApproveResubmit ?? false,
97-
description: "Automatically retry failed API requests when the provider returns an error response.",
99+
description: t("chat:autoApprove.actions.retryRequests.description"),
98100
},
99101
]
100102

@@ -211,7 +213,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
211213
color: "var(--vscode-foreground)",
212214
flexShrink: 0,
213215
}}>
214-
Auto-approve:
216+
{t("chat:autoApprove.title")}
215217
</span>
216218
<span
217219
style={{
@@ -222,7 +224,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
222224
flex: 1,
223225
minWidth: 0,
224226
}}>
225-
{enabledActionsList || "None"}
227+
{enabledActionsList || t("chat:autoApprove.none")}
226228
</span>
227229
<span
228230
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"}`}
@@ -241,8 +243,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
241243
color: "var(--vscode-descriptionForeground)",
242244
fontSize: "12px",
243245
}}>
244-
Auto-approve allows Roo Code to perform actions without asking for permission. Only enable for
245-
actions you fully trust.
246+
{t("chat:autoApprove.description")}
246247
</div>
247248
{actions.map((action) => (
248249
<div key={action.id} style={{ margin: "6px 0" }}>

webview-ui/src/i18n/locales/ar/chat.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,52 @@
6262
"noValidImages": "لم تتم معالجة أي صور صالحة",
6363
"separator": "فاصل",
6464
"edit": "تعديل...",
65-
"forNextMode": "للوضع التالي"
65+
"forNextMode": "للوضع التالي",
66+
"autoApprove": {
67+
"title": "الموافقة التلقائية:",
68+
"none": "لا شيء",
69+
"description": "الموافقة التلقائية تسمح لـ Roo Code بتنفيذ الإجراءات دون طلب إذن. قم بتمكينها فقط للإجراءات التي تثق بها تمامًا.",
70+
"actions": {
71+
"readFiles": {
72+
"label": "قراءة الملفات والمجلدات",
73+
"shortName": "قراءة",
74+
"description": "يسمح بالوصول لقراءة أي ملف على جهاز الكمبيوتر الخاص بك."
75+
},
76+
"editFiles": {
77+
"label": "تعديل الملفات",
78+
"shortName": "تعديل",
79+
"description": "يسمح بتعديل أي ملفات على جهاز الكمبيوتر الخاص بك."
80+
},
81+
"executeCommands": {
82+
"label": "تنفيذ الأوامر المعتمدة",
83+
"shortName": "أوامر",
84+
"description": "يسمح بتنفيذ أوامر الطرفية المعتمدة. يمكنك تكوين ذلك في لوحة الإعدادات."
85+
},
86+
"useBrowser": {
87+
"label": "استخدام المتصفح",
88+
"shortName": "متصفح",
89+
"description": "يسمح بالقدرة على تشغيل والتفاعل مع أي موقع ويب في متصفح بدون واجهة."
90+
},
91+
"useMcp": {
92+
"label": "استخدام خوادم MCP",
93+
"shortName": "MCP",
94+
"description": "يسمح باستخدام خوادم MCP المكونة التي قد تعدل نظام الملفات أو تتفاعل مع واجهات برمجة التطبيقات."
95+
},
96+
"switchModes": {
97+
"label": "تبديل الأوضاع",
98+
"shortName": "أوضاع",
99+
"description": "يسمح بالتبديل التلقائي بين الأوضاع المختلفة دون الحاجة إلى موافقة."
100+
},
101+
"subtasks": {
102+
"label": "إنشاء وإكمال المهام الفرعية",
103+
"shortName": "مهام فرعية",
104+
"description": "يسمح بإنشاء وإكمال المهام الفرعية دون الحاجة إلى موافقة."
105+
},
106+
"retryRequests": {
107+
"label": "إعادة محاولة الطلبات الفاشلة",
108+
"shortName": "إعادة المحاولات",
109+
"description": "إعادة محاولة طلبات API الفاشلة تلقائيًا عندما يُرجع المزود استجابة خطأ."
110+
}
111+
}
112+
}
66113
}

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,52 @@
6262
"noValidImages": "No s'ha processat cap imatge vàlida",
6363
"separator": "Separador",
6464
"edit": "Edita...",
65-
"forNextMode": "per al següent mode"
65+
"forNextMode": "per al següent mode",
66+
"autoApprove": {
67+
"title": "Aprovació automàtica:",
68+
"none": "Cap",
69+
"description": "L'aprovació automàtica permet a Roo Code realitzar accions sense demanar permís. Activa-la només per a accions en les que confies plenament.",
70+
"actions": {
71+
"readFiles": {
72+
"label": "Llegir fitxers i directoris",
73+
"shortName": "Lectura",
74+
"description": "Permet l'accés per llegir qualsevol fitxer al teu ordinador."
75+
},
76+
"editFiles": {
77+
"label": "Editar fitxers",
78+
"shortName": "Edició",
79+
"description": "Permet la modificació de qualsevol fitxer al teu ordinador."
80+
},
81+
"executeCommands": {
82+
"label": "Executar ordres aprovades",
83+
"shortName": "Ordres",
84+
"description": "Permet l'execució d'ordres de terminal aprovades. Pots configurar-ho al panell de configuració."
85+
},
86+
"useBrowser": {
87+
"label": "Utilitzar el navegador",
88+
"shortName": "Navegador",
89+
"description": "Permet la capacitat d'iniciar i interactuar amb qualsevol lloc web en un navegador headless."
90+
},
91+
"useMcp": {
92+
"label": "Utilitzar servidors MCP",
93+
"shortName": "MCP",
94+
"description": "Permet l'ús de servidors MCP configurats que poden modificar el sistema de fitxers o interactuar amb APIs."
95+
},
96+
"switchModes": {
97+
"label": "Canviar modes",
98+
"shortName": "Modes",
99+
"description": "Permet el canvi automàtic entre diferents modes sense requerir aprovació."
100+
},
101+
"subtasks": {
102+
"label": "Crear i completar subtasques",
103+
"shortName": "Subtasques",
104+
"description": "Permet la creació i finalització de subtasques sense requerir aprovació."
105+
},
106+
"retryRequests": {
107+
"label": "Reintentar sol·licituds fallides",
108+
"shortName": "Reintents",
109+
"description": "Reintenta automàticament les sol·licituds API fallides quan el proveïdor retorna una resposta d'error."
110+
}
111+
}
112+
}
66113
}

webview-ui/src/i18n/locales/cs/chat.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,52 @@
6262
"noValidImages": "Nebyly zpracovány žádné platné obrázky",
6363
"separator": "Oddělovač",
6464
"edit": "Upravit...",
65-
"forNextMode": "pro další režim"
65+
"forNextMode": "pro další režim",
66+
"autoApprove": {
67+
"title": "Automatické schválení:",
68+
"none": "Žádné",
69+
"description": "Automatické schválení umožňuje Roo Code provádět akce bez vyžádání povolení. Povolte pouze pro akce, kterým plně důvěřujete.",
70+
"actions": {
71+
"readFiles": {
72+
"label": "Číst soubory a adresáře",
73+
"shortName": "Čtení",
74+
"description": "Umožňuje přístup ke čtení jakéhokoli souboru na vašem počítači."
75+
},
76+
"editFiles": {
77+
"label": "Upravovat soubory",
78+
"shortName": "Úpravy",
79+
"description": "Umožňuje úpravy jakýchkoli souborů na vašem počítači."
80+
},
81+
"executeCommands": {
82+
"label": "Spouštět schválené příkazy",
83+
"shortName": "Příkazy",
84+
"description": "Umožňuje spouštění schválených terminálových příkazů. Toto můžete nakonfigurovat v panelu nastavení."
85+
},
86+
"useBrowser": {
87+
"label": "Používat prohlížeč",
88+
"shortName": "Prohlížeč",
89+
"description": "Umožňuje spuštění a interakci s jakýmkoli webem v headless prohlížeči."
90+
},
91+
"useMcp": {
92+
"label": "Používat MCP servery",
93+
"shortName": "MCP",
94+
"description": "Umožňuje použití nakonfigurovaných MCP serverů, které mohou upravovat souborový systém nebo komunikovat s API."
95+
},
96+
"switchModes": {
97+
"label": "Přepínat režimy",
98+
"shortName": "Režimy",
99+
"description": "Umožňuje automatické přepínání mezi různými režimy bez nutnosti schválení."
100+
},
101+
"subtasks": {
102+
"label": "Vytvářet a dokončovat dílčí úkoly",
103+
"shortName": "Dílčí úkoly",
104+
"description": "Umožňuje vytváření a dokončování dílčích úkolů bez nutnosti schválení."
105+
},
106+
"retryRequests": {
107+
"label": "Opakovat neúspěšné požadavky",
108+
"shortName": "Opakování",
109+
"description": "Automaticky opakuje neúspěšné API požadavky, když poskytovatel vrátí chybovou odpověď."
110+
}
111+
}
112+
}
66113
}

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,52 @@
6262
"noValidImages": "Es wurden keine gültigen Bilder verarbeitet",
6363
"separator": "Trennlinie",
6464
"edit": "Bearbeiten...",
65-
"forNextMode": "für nächsten Modus"
65+
"forNextMode": "für nächsten Modus",
66+
"autoApprove": {
67+
"title": "Auto-Genehmigung:",
68+
"none": "Keine",
69+
"description": "Auto-Genehmigung erlaubt Roo Code, Aktionen ohne Nachfrage auszuführen. Aktivieren Sie dies nur für Aktionen, denen Sie vollständig vertrauen.",
70+
"actions": {
71+
"readFiles": {
72+
"label": "Dateien und Verzeichnisse lesen",
73+
"shortName": "Lesen",
74+
"description": "Ermöglicht den Zugriff zum Lesen jeder Datei auf Ihrem Computer."
75+
},
76+
"editFiles": {
77+
"label": "Dateien bearbeiten",
78+
"shortName": "Bearbeiten",
79+
"description": "Ermöglicht die Bearbeitung beliebiger Dateien auf Ihrem Computer."
80+
},
81+
"executeCommands": {
82+
"label": "Genehmigte Befehle ausführen",
83+
"shortName": "Befehle",
84+
"description": "Erlaubt die Ausführung genehmigter Terminalbefehle. Sie können dies im Einstellungsbereich konfigurieren."
85+
},
86+
"useBrowser": {
87+
"label": "Browser verwenden",
88+
"shortName": "Browser",
89+
"description": "Ermöglicht das Starten und Interagieren mit jeder Website in einem Headless-Browser."
90+
},
91+
"useMcp": {
92+
"label": "MCP-Server verwenden",
93+
"shortName": "MCP",
94+
"description": "Erlaubt die Verwendung konfigurierter MCP-Server, die das Dateisystem ändern oder mit APIs interagieren können."
95+
},
96+
"switchModes": {
97+
"label": "Modi wechseln",
98+
"shortName": "Modi",
99+
"description": "Ermöglicht automatisches Wechseln zwischen verschiedenen Modi ohne Genehmigung."
100+
},
101+
"subtasks": {
102+
"label": "Teilaufgaben erstellen & abschließen",
103+
"shortName": "Teilaufgaben",
104+
"description": "Erlaubt die Erstellung und den Abschluss von Teilaufgaben ohne Genehmigung."
105+
},
106+
"retryRequests": {
107+
"label": "Fehlgeschlagene Anfragen wiederholen",
108+
"shortName": "Wiederholungen",
109+
"description": "Wiederholt automatisch fehlgeschlagene API-Anfragen, wenn der Anbieter eine Fehlermeldung zurückgibt."
110+
}
111+
}
112+
}
66113
}

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,52 @@
6262
"noValidImages": "No valid images were processed",
6363
"separator": "Separator",
6464
"edit": "Edit...",
65-
"forNextMode": "for next mode"
65+
"forNextMode": "for next mode",
66+
"autoApprove": {
67+
"title": "Auto-approve:",
68+
"none": "None",
69+
"description": "Auto-approve allows Roo Code to perform actions without asking for permission. Only enable for actions you fully trust.",
70+
"actions": {
71+
"readFiles": {
72+
"label": "Read files and directories",
73+
"shortName": "Read",
74+
"description": "Allows access to read any file on your computer."
75+
},
76+
"editFiles": {
77+
"label": "Edit files",
78+
"shortName": "Edit",
79+
"description": "Allows modification of any files on your computer."
80+
},
81+
"executeCommands": {
82+
"label": "Execute approved commands",
83+
"shortName": "Commands",
84+
"description": "Allows execution of approved terminal commands. You can configure this in the settings panel."
85+
},
86+
"useBrowser": {
87+
"label": "Use the browser",
88+
"shortName": "Browser",
89+
"description": "Allows ability to launch and interact with any website in a headless browser."
90+
},
91+
"useMcp": {
92+
"label": "Use MCP servers",
93+
"shortName": "MCP",
94+
"description": "Allows use of configured MCP servers which may modify filesystem or interact with APIs."
95+
},
96+
"switchModes": {
97+
"label": "Switch modes",
98+
"shortName": "Modes",
99+
"description": "Allows automatic switching between different modes without requiring approval."
100+
},
101+
"subtasks": {
102+
"label": "Create & complete subtasks",
103+
"shortName": "Subtasks",
104+
"description": "Allow creation and completion of subtasks without requiring approval."
105+
},
106+
"retryRequests": {
107+
"label": "Retry failed requests",
108+
"shortName": "Retries",
109+
"description": "Automatically retry failed API requests when the provider returns an error response."
110+
}
111+
}
112+
}
66113
}

0 commit comments

Comments
 (0)