Skip to content

Commit

Permalink
Use the application name instead of hard-coded "JupyterLab" in dialog…
Browse files Browse the repository at this point in the history
…s/commands (jupyterlab#16230)

* updated shutdown dialogue to display app.name

* fixed style

* updated strings to conform with translation standards

* style fix

* Remove extra quotes

---------

Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
  • Loading branch information
2 people authored and gderocher committed Apr 26, 2024
1 parent 55a22a5 commit 0e273ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/mainmenu-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,13 @@ function createFileMenu(

commands.addCommand(CommandIDs.shutdown, {
label: trans.__('Shut Down'),
caption: trans.__('Shut down JupyterLab'),
caption: trans.__('Shut down %1', app.name),
isVisible: () => menu.quitEntry,
isEnabled: () => menu.quitEntry,
execute: () => {
return showDialog({
title: trans.__('Shutdown confirmation'),
body: trans.__('Please confirm you want to shut down JupyterLab.'),
body: trans.__('Please confirm you want to shut down %1.', app.name),
buttons: [
Dialog.cancelButton(),
Dialog.warnButton({ label: trans.__('Shut Down') })
Expand Down Expand Up @@ -412,7 +412,8 @@ function createFileMenu(
);
const p2 = document.createElement('p');
p2.textContent = trans.__(
'To use JupyterLab again, you will need to relaunch it.'
'To use %1 again, you will need to relaunch it.',
app.name
);

body.appendChild(p1);
Expand All @@ -437,7 +438,7 @@ function createFileMenu(

commands.addCommand(CommandIDs.logout, {
label: trans.__('Log Out'),
caption: trans.__('Log out of JupyterLab'),
caption: trans.__('Log out of %1', app.name),
isVisible: () => menu.quitEntry,
isEnabled: () => menu.quitEntry,
execute: () => {
Expand Down

0 comments on commit 0e273ab

Please sign in to comment.