diff --git a/src/components/project-boot/shadcn/create-project-dialog.tsx b/src/components/project-boot/shadcn/create-project-dialog.tsx
index 4c49833..b3418c0 100644
--- a/src/components/project-boot/shadcn/create-project-dialog.tsx
+++ b/src/components/project-boot/shadcn/create-project-dialog.tsx
@@ -40,7 +40,7 @@ import {
openFolderWindow,
detectPackageManager,
} from "@/lib/api"
-import { toErrorMessage } from "@/lib/app-error"
+import { extractAppCommandError, toErrorMessage } from "@/lib/app-error"
import {
BASE_OPTIONS,
FRAMEWORK_OPTIONS,
@@ -118,7 +118,13 @@ export function CreateProjectDialog({
resetForm()
await openFolderWindow(projectPath)
} catch (err) {
- const message = toErrorMessage(err)
+ const appErr = extractAppCommandError(err)
+ const message =
+ appErr?.code === "already_exists"
+ ? t("errors.directoryExists")
+ : appErr?.code === "external_command_failed"
+ ? t("errors.commandFailed")
+ : toErrorMessage(err)
setError(message)
toast.error(t("toasts.createFailed"), { description: message })
} finally {
@@ -188,6 +194,13 @@ export function CreateProjectDialog({
+ {saveDirectory && projectName.trim() && (
+
+ {t("createDialog.projectPath", {
+ path: `${saveDirectory}/${projectName.trim()}`,
+ })}
+
+ )}
diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json
index 3bb8243..8e41002 100644
--- a/src/i18n/messages/ar.json
+++ b/src/i18n/messages/ar.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "دليل الحفظ",
"saveDirectoryPlaceholder": "اختر الدليل...",
"browseDirectory": "تصفح",
+ "projectPath": "سيتم إنشاء المشروع في: {path}",
"advancedOptions": "خيارات متقدمة",
"base": "المكتبة الأساسية",
"enableRtl": "تفعيل دعم RTL",
@@ -1622,7 +1623,7 @@
"createSuccess": "تم إنشاء المشروع بنجاح"
},
"errors": {
- "directoryExists": "الدليل موجود بالفعل وليس فارغاً.",
+ "directoryExists": "الدليل الهدف موجود بالفعل",
"commandFailed": "فشل أمر إنشاء المشروع."
}
}
diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.json
index 6a02ae0..ff102a9 100644
--- a/src/i18n/messages/de.json
+++ b/src/i18n/messages/de.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "Speicherverzeichnis",
"saveDirectoryPlaceholder": "Verzeichnis auswählen...",
"browseDirectory": "Durchsuchen",
+ "projectPath": "Projekt wird erstellt in: {path}",
"advancedOptions": "Erweiterte Optionen",
"base": "Basisbibliothek",
"enableRtl": "RTL-Unterstützung aktivieren",
@@ -1622,7 +1623,7 @@
"createSuccess": "Projekt erfolgreich erstellt"
},
"errors": {
- "directoryExists": "Verzeichnis existiert bereits und ist nicht leer.",
+ "directoryExists": "Zielverzeichnis existiert bereits",
"commandFailed": "Projekterstellungsbefehl fehlgeschlagen."
}
}
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json
index 9ee6bd4..e593468 100644
--- a/src/i18n/messages/en.json
+++ b/src/i18n/messages/en.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "Save Directory",
"saveDirectoryPlaceholder": "Select directory...",
"browseDirectory": "Browse",
+ "projectPath": "Project will be created at: {path}",
"advancedOptions": "Advanced Options",
"base": "Base Library",
"enableRtl": "Enable RTL Support",
@@ -1622,7 +1623,7 @@
"createSuccess": "Project created successfully"
},
"errors": {
- "directoryExists": "Directory already exists and is not empty.",
+ "directoryExists": "Target directory already exists",
"commandFailed": "Project creation command failed."
}
}
diff --git a/src/i18n/messages/es.json b/src/i18n/messages/es.json
index 797e190..e1b8b8c 100644
--- a/src/i18n/messages/es.json
+++ b/src/i18n/messages/es.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "Directorio de guardado",
"saveDirectoryPlaceholder": "Seleccionar directorio...",
"browseDirectory": "Explorar",
+ "projectPath": "El proyecto se creará en: {path}",
"advancedOptions": "Opciones Avanzadas",
"base": "Biblioteca Base",
"enableRtl": "Habilitar Soporte RTL",
@@ -1622,7 +1623,7 @@
"createSuccess": "Proyecto creado exitosamente"
},
"errors": {
- "directoryExists": "El directorio ya existe y no está vacío.",
+ "directoryExists": "El directorio de destino ya existe",
"commandFailed": "El comando de creación del proyecto falló."
}
}
diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json
index f6e4ed6..d8ce0dc 100644
--- a/src/i18n/messages/fr.json
+++ b/src/i18n/messages/fr.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "Répertoire de sauvegarde",
"saveDirectoryPlaceholder": "Sélectionner un répertoire...",
"browseDirectory": "Parcourir",
+ "projectPath": "Le projet sera créé dans : {path}",
"advancedOptions": "Options avancées",
"base": "Bibliothèque de base",
"enableRtl": "Activer le support RTL",
@@ -1622,7 +1623,7 @@
"createSuccess": "Projet créé avec succès"
},
"errors": {
- "directoryExists": "Le répertoire existe déjà et n'est pas vide.",
+ "directoryExists": "Le répertoire cible existe déjà",
"commandFailed": "La commande de création du projet a échoué."
}
}
diff --git a/src/i18n/messages/ja.json b/src/i18n/messages/ja.json
index d4329d3..23a960c 100644
--- a/src/i18n/messages/ja.json
+++ b/src/i18n/messages/ja.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "保存先ディレクトリ",
"saveDirectoryPlaceholder": "ディレクトリを選択...",
"browseDirectory": "参照",
+ "projectPath": "プロジェクトの作成先:{path}",
"advancedOptions": "詳細オプション",
"base": "基盤ライブラリ",
"enableRtl": "RTL サポートを有効にする",
@@ -1622,7 +1623,7 @@
"createSuccess": "プロジェクトが正常に作成されました"
},
"errors": {
- "directoryExists": "ディレクトリは既に存在し、空ではありません。",
+ "directoryExists": "対象ディレクトリは既に存在します",
"commandFailed": "プロジェクト作成コマンドが失敗しました。"
}
}
diff --git a/src/i18n/messages/ko.json b/src/i18n/messages/ko.json
index c9b00b1..d78a657 100644
--- a/src/i18n/messages/ko.json
+++ b/src/i18n/messages/ko.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "저장 디렉토리",
"saveDirectoryPlaceholder": "디렉토리 선택...",
"browseDirectory": "찾아보기",
+ "projectPath": "프로젝트 생성 위치: {path}",
"advancedOptions": "고급 옵션",
"base": "기본 라이브러리",
"enableRtl": "RTL 지원 활성화",
@@ -1622,7 +1623,7 @@
"createSuccess": "프로젝트가 성공적으로 생성되었습니다"
},
"errors": {
- "directoryExists": "디렉토리가 이미 존재하며 비어 있지 않습니다.",
+ "directoryExists": "대상 디렉터리가 이미 존재합니다",
"commandFailed": "프로젝트 생성 명령이 실패했습니다."
}
}
diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.json
index db1af80..f7f0803 100644
--- a/src/i18n/messages/pt.json
+++ b/src/i18n/messages/pt.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "Diretório de salvamento",
"saveDirectoryPlaceholder": "Selecionar diretório...",
"browseDirectory": "Procurar",
+ "projectPath": "O projeto será criado em: {path}",
"advancedOptions": "Opções Avançadas",
"base": "Biblioteca Base",
"enableRtl": "Ativar Suporte RTL",
@@ -1622,7 +1623,7 @@
"createSuccess": "Projeto criado com sucesso"
},
"errors": {
- "directoryExists": "O diretório já existe e não está vazio.",
+ "directoryExists": "O diretório de destino já existe",
"commandFailed": "O comando de criação do projeto falhou."
}
}
diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.json
index 3b244f2..b51e4e4 100644
--- a/src/i18n/messages/zh-CN.json
+++ b/src/i18n/messages/zh-CN.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "保存目录",
"saveDirectoryPlaceholder": "选择目录...",
"browseDirectory": "浏览",
+ "projectPath": "项目将创建在:{path}",
"advancedOptions": "高级选项",
"base": "基础库",
"enableRtl": "启用 RTL 支持",
@@ -1622,7 +1623,7 @@
"createSuccess": "项目创建成功"
},
"errors": {
- "directoryExists": "目录已存在且不为空。",
+ "directoryExists": "目标目录已存在",
"commandFailed": "项目创建命令执行失败。"
}
}
diff --git a/src/i18n/messages/zh-TW.json b/src/i18n/messages/zh-TW.json
index b266c38..3b3cebb 100644
--- a/src/i18n/messages/zh-TW.json
+++ b/src/i18n/messages/zh-TW.json
@@ -1607,6 +1607,7 @@
"saveDirectory": "儲存目錄",
"saveDirectoryPlaceholder": "選擇目錄...",
"browseDirectory": "瀏覽",
+ "projectPath": "專案將建立在:{path}",
"advancedOptions": "進階選項",
"base": "基礎庫",
"enableRtl": "啟用 RTL 支援",
@@ -1622,7 +1623,7 @@
"createSuccess": "專案建立成功"
},
"errors": {
- "directoryExists": "目錄已存在且不為空。",
+ "directoryExists": "目標目錄已存在",
"commandFailed": "專案建立命令執行失敗。"
}
}