Fix "Select {0}" in workspace picker (#306829)

This commit is contained in:
Rob Lourens
2026-03-31 11:41:03 -07:00
committed by GitHub
parent 3bc94239ff
commit 1c1dc9f684
2 changed files with 9 additions and 3 deletions

View File

@@ -62,6 +62,9 @@ export default new class NoUnexternalizedStrings implements eslint.Rule.RuleModu
doubleQuotedStringLiterals.delete(keyNode);
key = keyNode.value;
} else if (keyNode.type === AST_NODE_TYPES.TemplateLiteral && keyNode.expressions.length === 0 && keyNode.quasis.length === 1) {
key = keyNode.quasis[0].value.cooked ?? undefined;
} else if (keyNode.type === AST_NODE_TYPES.ObjectExpression) {
for (const property of keyNode.properties) {
if (property.type === AST_NODE_TYPES.Property && !property.computed) {
@@ -70,6 +73,9 @@ export default new class NoUnexternalizedStrings implements eslint.Rule.RuleModu
doubleQuotedStringLiterals.delete(property.value);
key = property.value.value;
break;
} else if (property.value.type === AST_NODE_TYPES.TemplateLiteral && property.value.expressions.length === 0 && property.value.quasis.length === 1) {
key = property.value.quasis[0].value.cooked ?? undefined;
break;
}
}
}

View File

@@ -367,7 +367,7 @@ export class WorkspacePicker extends Disposable {
const remoteStatus = remoteProvider?.connectionStatus?.get();
const actionItems = actions.map(({ action, index }, ci) => toAction({
id: `workspacePicker.browse.${index}`,
label: localize(`workspacePicker.browse`, "{0}...", action.label),
label: localize(`workspacePicker.browseAction`, "{0}...", action.label),
tooltip: ci === 0 ? provider.label : '',
enabled: remoteStatus !== RemoteAgentHostConnectionStatus.Disconnected && remoteStatus !== RemoteAgentHostConnectionStatus.Connecting,
run: () => this._executeBrowseAction(index),
@@ -382,7 +382,7 @@ export class WorkspacePicker extends Disposable {
items.push({
kind: ActionListItemKind.Action,
label: localize('workspacePicker.browse', "Select..."),
label: localize('workspacePicker.browseSelect', "Select..."),
group: { title: '', icon: Codicon.folderOpened },
item: {},
submenuActions,
@@ -392,7 +392,7 @@ export class WorkspacePicker extends Disposable {
const action = allBrowseActions[i];
items.push({
kind: ActionListItemKind.Action,
label: localize(`workspacePicker.browse`, "Select {0}...", action.label),
label: localize(`workspacePicker.browseSelectAction`, "Select {0}...", action.label),
group: { title: '', icon: action.icon },
item: { browseActionIndex: i },
});