diff --git a/src/commitGenerator.ts b/src/commitGenerator.ts index 0d89484..59f859a 100644 --- a/src/commitGenerator.ts +++ b/src/commitGenerator.ts @@ -9,19 +9,19 @@ export async function generateCommitMsg(scm?: vscode.SourceControl): Promise { const reposWithChanges = await filterReposWithChanges(repos) if (reposWithChanges.length === 0) { - vscode.window.showInformationMessage("[Zemit] No changes found in any repository.") + vscode.window.showInformationMessage("[Zemit] Aucune modification trouvée dans les dépôts.") return } @@ -62,12 +62,12 @@ async function orchestrateMultiRepo(repos: unknown[]): Promise { items.unshift({ label: "$(git-commit) All repositories with changes", - description: `Generate for ${reposWithChanges.length} repositories`, + description: `Générer pour ${reposWithChanges.length} dépôts`, repo: null as any, }) const selection = await vscode.window.showQuickPick(items, { - placeHolder: "Select a repository to generate a commit message for", + placeHolder: "Sélectionner un dépôt pour générer un message de commit", }) if (!selection) return @@ -104,7 +104,7 @@ async function generateForRepository(repository: any): Promise { await vscode.window.withProgress( { location: vscode.ProgressLocation.SourceControl, - title: `Zemit: Generating commit message for ${repoName}...`, + title: `Zemit : Génération du message de commit pour ${repoName}...`, cancellable: true, }, (_progress, token) => performGeneration(repository.inputBox, diff, token), @@ -147,7 +147,7 @@ async function performGeneration( } if (!inputBox.value) { - throw new Error("The AI returned an empty response") + throw new Error("L'IA n'a retourné aucune réponse") } } finally { await vscode.commands.executeCommand("setContext", "zemit.isGenerating", false) diff --git a/src/extension.ts b/src/extension.ts index 3ad5d21..b4f664b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -18,7 +18,7 @@ async function selectModel(): Promise { let models: string[] try { models = await vscode.window.withProgress( - { location: vscode.ProgressLocation.Notification, title: "Zemit: Fetching available models…", cancellable: false }, + { location: vscode.ProgressLocation.Notification, title: "Zemit : Récupération des modèles disponibles…", cancellable: false }, () => fetchAvailableModels(config), ) } catch (err) { @@ -28,25 +28,25 @@ async function selectModel(): Promise { } if (models.length === 0) { - vscode.window.showWarningMessage("[Zemit] No models found for the configured provider.") + vscode.window.showWarningMessage("[Zemit] Aucun modèle trouvé pour le fournisseur configuré.") return } const currentModel = config.get("model", "") const items = models.map((id) => ({ label: id, - description: id === currentModel ? "current" : undefined, + description: id === currentModel ? "actuel" : undefined, })) const picked = await vscode.window.showQuickPick(items, { - placeHolder: "Select a model", + placeHolder: "Sélectionner un modèle", matchOnDescription: false, }) if (!picked) return await config.update("model", picked.label, vscode.ConfigurationTarget.Global) - vscode.window.showInformationMessage(`[Zemit] Model set to ${picked.label}`) + vscode.window.showInformationMessage(`[Zemit] Modèle défini sur ${picked.label}`) } export function deactivate(): void {} diff --git a/src/git.ts b/src/git.ts index 8f5f69b..0a60d05 100644 --- a/src/git.ts +++ b/src/git.ts @@ -32,10 +32,10 @@ async function hasCommits(cwd: string): Promise { export async function getGitDiff(cwd: string, stagedOnly = false): Promise { if (!(await isGitInstalled())) { - throw new Error("Git is not installed") + throw new Error("Git n'est pas installé") } if (!(await isGitRepo(cwd))) { - throw new Error("Not a git repository") + throw new Error("Pas un dépôt git") } let diff = "" @@ -72,7 +72,7 @@ export async function getGitDiff(cwd: string, stagedOnly = false): Promise