fix(directory-explorer): make batch add work in VS Code; add Turkish locale keys
Two non-blockers from the openchamber-bot review at b2ab4af15:
1. VS Code batch add reported a misleading failure. addProjects
returned [] unconditionally for the VS Code runtime because
addWorkspaceFolder is reached only by addProject. Iterate addProject
per path so valid selections succeed and the host is called once
per selection. addProjects is now async (returns Promise<ProjectEntry[]>);
the call site in DirectoryExplorerDialog awaits it; existing
tests in useProjectsStore.test.ts updated to await.
2. Turkish locale (tr.ts) was missing the two new keys that other
11 dictionaries received: actions.addSelected and browse.selectForAdd.
Add both with real Turkish translations: "Seçilenleri ekle" and
"Eklemek için seç".
This commit is contained in:
@@ -486,7 +486,7 @@ export const DirectoryExplorerDialog: React.FC<DirectoryExplorerDialogProps> = (
|
||||
// Batch path wins over single-target create: with checkboxes ticked,
|
||||
// the user wants the selections added, not a fresh directory created
|
||||
// for whatever happens to be typed in the filter.
|
||||
const added = addProjects(selectionToAdd);
|
||||
const added = await addProjects(selectionToAdd);
|
||||
if (added.length === 0) {
|
||||
toast.error(t('directoryExplorerDialog.toast.failedToAddProject'), {
|
||||
description: t('directoryExplorerDialog.toast.selectValidDirectoryPath'),
|
||||
|
||||
Reference in New Issue
Block a user