diff --git a/src/commandsAndMenu.tsx b/src/commandsAndMenu.tsx index c807732b4..c39cd1c44 100644 --- a/src/commandsAndMenu.tsx +++ b/src/commandsAndMenu.tsx @@ -465,10 +465,12 @@ export function addCommands( const widget = await buildDiffWidget(model, diffWidget.toolbar); diffWidget.toolbar.addItem('spacer', Toolbar.createSpacerItem()); + const refreshLabel = trans.__('Refresh'); const refreshButton = new ToolbarButton({ - label: trans.__('Refresh'), + label: refreshLabel, onClick: async () => { + refreshButton.title.label = trans.__('Refreshing...'); await widget.refresh(); refreshButton.hide(); }, @@ -479,6 +481,7 @@ export function addCommands( diffWidget.toolbar.addItem('refresh', refreshButton); model.changed.connect(() => { + refreshButton.title.label = refreshLabel; refreshButton.show(); });