From 22d01ce67a8ef99ba13d03405b5acefb392bca11 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Tue, 25 Mar 2025 10:10:38 -0400 Subject: [PATCH] Add specific strings for read/edit outside of the workspace (#1970) --- webview-ui/src/components/chat/ChatRow.tsx | 10 ++++++++-- webview-ui/src/i18n/locales/ca/chat.json | 2 ++ webview-ui/src/i18n/locales/de/chat.json | 2 ++ webview-ui/src/i18n/locales/en/chat.json | 2 ++ webview-ui/src/i18n/locales/es/chat.json | 2 ++ webview-ui/src/i18n/locales/fr/chat.json | 2 ++ webview-ui/src/i18n/locales/hi/chat.json | 2 ++ webview-ui/src/i18n/locales/it/chat.json | 2 ++ webview-ui/src/i18n/locales/ja/chat.json | 2 ++ webview-ui/src/i18n/locales/ko/chat.json | 2 ++ webview-ui/src/i18n/locales/pl/chat.json | 2 ++ webview-ui/src/i18n/locales/pt-BR/chat.json | 2 ++ webview-ui/src/i18n/locales/tr/chat.json | 2 ++ webview-ui/src/i18n/locales/vi/chat.json | 2 ++ webview-ui/src/i18n/locales/zh-CN/chat.json | 2 ++ webview-ui/src/i18n/locales/zh-TW/chat.json | 2 ++ 16 files changed, 38 insertions(+), 2 deletions(-) diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 99c773873f..4e0d4432f7 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -272,7 +272,11 @@ export const ChatRowContent = ({ <>
{toolIcon(tool.tool === "appliedDiff" ? "diff" : "edit")} - {t("chat:fileOperations.wantsToEdit")} + + {tool.isOutsideWorkspace + ? t("chat:fileOperations.wantsToEditOutsideWorkspace") + : t("chat:fileOperations.wantsToEdit")} +
{message.type === "ask" - ? t("chat:fileOperations.wantsToRead") + ? tool.isOutsideWorkspace + ? t("chat:fileOperations.wantsToReadOutsideWorkspace") + : t("chat:fileOperations.wantsToRead") : t("chat:fileOperations.didRead")} diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 2c06a9a2d1..e7080fd326 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo vol llegir aquest fitxer:", + "wantsToReadOutsideWorkspace": "Roo vol llegir aquest fitxer fora de l'espai de treball:", "didRead": "Roo ha llegit aquest fitxer:", "wantsToEdit": "Roo vol editar aquest fitxer:", + "wantsToEditOutsideWorkspace": "Roo vol editar aquest fitxer fora de l'espai de treball:", "wantsToCreate": "Roo vol crear un nou fitxer:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index 78db75b7f0..8c10441c59 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo möchte diese Datei lesen:", + "wantsToReadOutsideWorkspace": "Roo möchte diese Datei außerhalb des Arbeitsbereichs lesen:", "didRead": "Roo hat diese Datei gelesen:", "wantsToEdit": "Roo möchte diese Datei bearbeiten:", + "wantsToEditOutsideWorkspace": "Roo möchte diese Datei außerhalb des Arbeitsbereichs bearbeiten:", "wantsToCreate": "Roo möchte eine neue Datei erstellen:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index dbc5712d69..ec8d4c460c 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -105,8 +105,10 @@ }, "fileOperations": { "wantsToRead": "Roo wants to read this file:", + "wantsToReadOutsideWorkspace": "Roo wants to read this file outside of the workspace:", "didRead": "Roo read this file:", "wantsToEdit": "Roo wants to edit this file:", + "wantsToEditOutsideWorkspace": "Roo wants to edit this file outside of the workspace:", "wantsToCreate": "Roo wants to create a new file:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index bfb536d674..194f8e4e7b 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo quiere leer este archivo:", + "wantsToReadOutsideWorkspace": "Roo quiere leer este archivo fuera del espacio de trabajo:", "didRead": "Roo leyó este archivo:", "wantsToEdit": "Roo quiere editar este archivo:", + "wantsToEditOutsideWorkspace": "Roo quiere editar este archivo fuera del espacio de trabajo:", "wantsToCreate": "Roo quiere crear un nuevo archivo:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index da516362a7..0656a116bc 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo veut lire ce fichier :", + "wantsToReadOutsideWorkspace": "Roo veut lire ce fichier en dehors de l'espace de travail :", "didRead": "Roo a lu ce fichier :", "wantsToEdit": "Roo veut éditer ce fichier :", + "wantsToEditOutsideWorkspace": "Roo veut éditer ce fichier en dehors de l'espace de travail :", "wantsToCreate": "Roo veut créer un nouveau fichier :" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index bcd1ca43ff..f29f867c80 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo इस फ़ाइल को पढ़ना चाहता है:", + "wantsToReadOutsideWorkspace": "Roo कार्यक्षेत्र के बाहर इस फ़ाइल को पढ़ना चाहता है:", "didRead": "Roo ने इस फ़ाइल को पढ़ा:", "wantsToEdit": "Roo इस फ़ाइल को संपादित करना चाहता है:", + "wantsToEditOutsideWorkspace": "Roo कार्यक्षेत्र के बाहर इस फ़ाइल को संपादित करना चाहता है:", "wantsToCreate": "Roo एक नई फ़ाइल बनाना चाहता है:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index fea9861c85..e82d258dbc 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo vuole leggere questo file:", + "wantsToReadOutsideWorkspace": "Roo vuole leggere questo file al di fuori dell'area di lavoro:", "didRead": "Roo ha letto questo file:", "wantsToEdit": "Roo vuole modificare questo file:", + "wantsToEditOutsideWorkspace": "Roo vuole modificare questo file al di fuori dell'area di lavoro:", "wantsToCreate": "Roo vuole creare un nuovo file:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 766d8797dd..847d099ef7 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Rooはこのファイルを読みたい:", + "wantsToReadOutsideWorkspace": "Rooはワークスペース外のこのファイルを読みたい:", "didRead": "Rooはこのファイルを読みました:", "wantsToEdit": "Rooはこのファイルを編集したい:", + "wantsToEditOutsideWorkspace": "Rooはワークスペース外のこのファイルを編集したい:", "wantsToCreate": "Rooは新しいファイルを作成したい:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index db49282dd9..9c0b01a3f3 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo가 이 파일을 읽고 싶어합니다:", + "wantsToReadOutsideWorkspace": "Roo가 워크스페이스 외부의 이 파일을 읽고 싶어합니다:", "didRead": "Roo가 이 파일을 읽었습니다:", "wantsToEdit": "Roo가 이 파일을 편집하고 싶어합니다:", + "wantsToEditOutsideWorkspace": "Roo가 워크스페이스 외부의 이 파일을 편집하고 싶어합니다:", "wantsToCreate": "Roo가 새 파일을 만들고 싶어합니다:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index 96cd92f7c2..ab83fd221b 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo chce przeczytać ten plik:", + "wantsToReadOutsideWorkspace": "Roo chce przeczytać ten plik poza obszarem roboczym:", "didRead": "Roo przeczytał ten plik:", "wantsToEdit": "Roo chce edytować ten plik:", + "wantsToEditOutsideWorkspace": "Roo chce edytować ten plik poza obszarem roboczym:", "wantsToCreate": "Roo chce utworzyć nowy plik:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 97c13c3cfb..96416f6f11 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo quer ler este arquivo:", + "wantsToReadOutsideWorkspace": "Roo quer ler este arquivo fora do espaço de trabalho:", "didRead": "Roo leu este arquivo:", "wantsToEdit": "Roo quer editar este arquivo:", + "wantsToEditOutsideWorkspace": "Roo quer editar este arquivo fora do espaço de trabalho:", "wantsToCreate": "Roo quer criar um novo arquivo:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index 4fff9c2ad3..1eb358ad98 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo bu dosyayı okumak istiyor:", + "wantsToReadOutsideWorkspace": "Roo çalışma alanı dışındaki bu dosyayı okumak istiyor:", "didRead": "Roo bu dosyayı okudu:", "wantsToEdit": "Roo bu dosyayı düzenlemek istiyor:", + "wantsToEditOutsideWorkspace": "Roo çalışma alanı dışındaki bu dosyayı düzenlemek istiyor:", "wantsToCreate": "Roo yeni bir dosya oluşturmak istiyor:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index cbabb4634a..fb1040bcf1 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo muốn đọc tệp này:", + "wantsToReadOutsideWorkspace": "Roo muốn đọc tệp này bên ngoài không gian làm việc:", "didRead": "Roo đã đọc tệp này:", "wantsToEdit": "Roo muốn chỉnh sửa tệp này:", + "wantsToEditOutsideWorkspace": "Roo muốn chỉnh sửa tệp này bên ngoài không gian làm việc:", "wantsToCreate": "Roo muốn tạo một tệp mới:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index a0310a5919..a2f8119927 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo想读取此文件:", + "wantsToReadOutsideWorkspace": "Roo想读取此工作区外的文件:", "didRead": "Roo已读取此文件:", "wantsToEdit": "Roo想编辑此文件:", + "wantsToEditOutsideWorkspace": "Roo想编辑此工作区外的文件:", "wantsToCreate": "Roo想创建新文件:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index 69804c0f8f..1178ec39b8 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -107,8 +107,10 @@ }, "fileOperations": { "wantsToRead": "Roo想讀取此檔案:", + "wantsToReadOutsideWorkspace": "Roo想讀取此工作區外的檔案:", "didRead": "Roo已讀取此檔案:", "wantsToEdit": "Roo想編輯此檔案:", + "wantsToEditOutsideWorkspace": "Roo想編輯此工作區外的檔案:", "wantsToCreate": "Roo想創建新檔案:" }, "directoryOperations": {