Procházet zdrojové kódy

Merge pull request #6299 from jasongrout/logout-menu-name

Log out and Shut down are two words when used as verbs
Steven Silvester před 6 roky
rodič
revize
0e1e34e029

+ 1 - 1
examples/filebrowser/src/index.ts

@@ -194,7 +194,7 @@ function createApp(manager: ServiceManager.IManager): void {
     }
   });
   commands.addCommand('file-shutdown-kernel', {
-    label: 'Shutdown Kernel',
+    label: 'Shut Down Kernel',
     icon: 'fa fa-stop-circle-o',
     execute: () => {
       return fbWidget.shutdownKernels();

+ 1 - 1
packages/apputils/src/clientsession.tsx

@@ -370,7 +370,7 @@ export class ClientSession implements IClientSession {
     if (this._session) {
       if (this.kernelPreference.shutdownOnClose) {
         this._session.shutdown().catch(reason => {
-          console.error(`Kernel not shutdown ${reason}`);
+          console.error(`Kernel not shut down ${reason}`);
         });
       }
       this._session = null;

+ 3 - 3
packages/console-extension/src/index.ts

@@ -428,14 +428,14 @@ async function activateConsole(
   });
 
   commands.addCommand(CommandIDs.closeAndShutdown, {
-    label: 'Close and Shutdown…',
+    label: 'Close and Shut Down…',
     execute: args => {
       const current = getCurrent(args);
       if (!current) {
         return;
       }
       return showDialog({
-        title: 'Shutdown the console?',
+        title: 'Shut down the console?',
         body: `Are you sure you want to close "${current.title.label}"?`,
         buttons: [Dialog.cancelButton(), Dialog.warnButton()]
       }).then(result => {
@@ -509,7 +509,7 @@ async function activateConsole(
     name: 'Console',
     closeAndCleanup: (current: ConsolePanel) => {
       return showDialog({
-        title: 'Shutdown the console?',
+        title: 'Shut down the console?',
         body: `Are you sure you want to close "${current.title.label}"?`,
         buttons: [Dialog.cancelButton(), Dialog.warnButton()]
       }).then(result => {

+ 1 - 1
packages/filebrowser-extension/src/index.ts

@@ -625,7 +625,7 @@ function addCommands(
       }
     },
     iconClass: 'jp-MaterialIcon jp-StopIcon',
-    label: 'Shutdown Kernel'
+    label: 'Shut Down Kernel'
   });
 
   commands.addCommand(CommandIDs.toggleBrowser, {

+ 1 - 1
packages/filebrowser/src/listing.ts

@@ -440,7 +440,7 @@ export class DirListing extends Widget {
         return undefined;
       })
       .catch(error => {
-        void showErrorMessage('Shutdown kernel', error);
+        void showErrorMessage('Shut down kernel', error);
       });
   }
 

+ 10 - 6
packages/mainmenu-extension/src/index.ts

@@ -207,6 +207,10 @@ const plugin: JupyterFrontEndPlugin<IMainMenu> = {
         command: CommandIDs.shutdown,
         category: 'Main Area'
       });
+      palette.addItem({
+        command: CommandIDs.logout,
+        category: 'Main Area'
+      });
     }
 
     palette.addItem({
@@ -348,7 +352,7 @@ export function createFileMenu(
   });
 
   commands.addCommand(CommandIDs.shutdown, {
-    label: 'Shutdown',
+    label: 'Shut Down',
     caption: 'Shut down JupyterLab',
     execute: () => {
       return showDialog({
@@ -392,7 +396,7 @@ export function createFileMenu(
   });
 
   commands.addCommand(CommandIDs.logout, {
-    label: 'Logout',
+    label: 'Log Out',
     caption: 'Log out of JupyterLab',
     execute: () => {
       router.navigate('/logout', { hard: true });
@@ -506,23 +510,23 @@ export function createKernelMenu(app: JupyterFrontEnd, menu: KernelMenu): void {
   });
 
   commands.addCommand(CommandIDs.shutdownKernel, {
-    label: 'Shutdown Kernel',
+    label: 'Shut Down Kernel',
     isEnabled: Private.delegateEnabled(app, menu.kernelUsers, 'shutdownKernel'),
     execute: Private.delegateExecute(app, menu.kernelUsers, 'shutdownKernel')
   });
 
   commands.addCommand(CommandIDs.shutdownAllKernels, {
-    label: 'Shutdown All Kernels…',
+    label: 'Shut Down All Kernels…',
     isEnabled: () => {
       return app.serviceManager.sessions.running().next() !== undefined;
     },
     execute: () => {
       return showDialog({
-        title: 'Shutdown All?',
+        title: 'Shut Down All?',
         body: 'Shut down all kernels?',
         buttons: [
           Dialog.cancelButton(),
-          Dialog.warnButton({ label: 'SHUTDOWN' })
+          Dialog.warnButton({ label: 'SHUT DOWN ALL' })
         ]
       }).then(result => {
         if (result.button.accept) {

+ 3 - 3
packages/notebook-extension/src/index.ts

@@ -1089,7 +1089,7 @@ function addCommands(
     isEnabled
   });
   commands.addCommand(CommandIDs.closeAndShutdown, {
-    label: 'Close and Shutdown',
+    label: 'Close and Shut Down',
     execute: args => {
       const current = getCurrent(args);
 
@@ -1100,7 +1100,7 @@ function addCommands(
       const fileName = current.title.label;
 
       return showDialog({
-        title: 'Shutdown the notebook?',
+        title: 'Shut down the notebook?',
         body: `Are you sure you want to close "${fileName}"?`,
         buttons: [Dialog.cancelButton(), Dialog.warnButton()]
       }).then(result => {
@@ -1927,7 +1927,7 @@ function populateMenus(
     closeAndCleanup: (current: NotebookPanel) => {
       const fileName = current.title.label;
       return showDialog({
-        title: 'Shutdown the notebook?',
+        title: 'Shut down the notebook?',
         body: `Are you sure you want to close "${fileName}"?`,
         buttons: [Dialog.cancelButton(), Dialog.warnButton()]
       }).then(result => {

+ 7 - 4
packages/running/src/index.tsx

@@ -173,7 +173,7 @@ function Item<M>(props: SessionProps<M> & { model: M }) {
         className={`${SHUTDOWN_BUTTON_CLASS} jp-mod-styled`}
         onClick={() => props.shutdown(model)}
       >
-        SHUTDOWN
+        SHUT DOWN
       </button>
     </li>
   );
@@ -218,8 +218,11 @@ function List<M>(props: SessionProps<M>) {
 function Section<M>(props: SessionProps<M>) {
   function onShutdown() {
     void showDialog({
-      title: `Shutdown All ${props.name} Sessions?`,
-      buttons: [Dialog.cancelButton(), Dialog.warnButton({ label: 'SHUTDOWN' })]
+      title: `Shut Down All ${props.name} Sessions?`,
+      buttons: [
+        Dialog.cancelButton(),
+        Dialog.warnButton({ label: 'SHUT DOWN ALL' })
+      ]
     }).then(result => {
       if (result.button.accept) {
         props.manager.shutdownAll();
@@ -233,7 +236,7 @@ function Section<M>(props: SessionProps<M>) {
           <header className={SECTION_HEADER_CLASS}>
             <h2>{props.name} Sessions</h2>
             <ToolbarButtonComponent
-              tooltip={`Shutdown All ${props.name} Sessions…`}
+              tooltip={`Shut Down All ${props.name} Sessions…`}
               iconClassName="jp-CloseIcon"
               onClick={onShutdown}
             />