11import type { Dialog } from '@jupyterlab/apputils' ;
2+ import type { TranslationBundle } from '@jupyterlab/translation' ;
23import { Widget } from '@lumino/widgets' ;
34
45/**
@@ -65,13 +66,15 @@ export class RemoteServerConfigBody
6566 super ( ) ;
6667 this . addClass ( 'jp-HybridKernels-configDialog' ) ;
6768
69+ const trans = options . trans ;
70+
6871 // Full URL input section
6972 const fullUrlSection = document . createElement ( 'div' ) ;
7073 fullUrlSection . className = 'jp-HybridKernels-formSection' ;
7174
7275 const fullUrlLabel = document . createElement ( 'label' ) ;
7376 fullUrlLabel . className = 'jp-HybridKernels-label' ;
74- fullUrlLabel . textContent = 'Paste Full URL (with token)' ;
77+ fullUrlLabel . textContent = trans . __ ( 'Paste Full URL (with token)' ) ;
7578 fullUrlLabel . htmlFor = 'hybrid-kernels-full-url' ;
7679 fullUrlSection . appendChild ( fullUrlLabel ) ;
7780
@@ -85,8 +88,9 @@ export class RemoteServerConfigBody
8588
8689 const fullUrlHelp = document . createElement ( 'small' ) ;
8790 fullUrlHelp . className = 'jp-HybridKernels-help' ;
88- fullUrlHelp . textContent =
89- 'Paste a full JupyterHub/Binder URL to auto-fill the fields below' ;
91+ fullUrlHelp . textContent = trans . __ (
92+ 'Paste a full JupyterHub/Binder URL to auto-fill the fields below'
93+ ) ;
9094 fullUrlSection . appendChild ( fullUrlHelp ) ;
9195
9296 this . node . appendChild ( fullUrlSection ) ;
@@ -102,7 +106,7 @@ export class RemoteServerConfigBody
102106
103107 const serverUrlLabel = document . createElement ( 'label' ) ;
104108 serverUrlLabel . className = 'jp-HybridKernels-label' ;
105- serverUrlLabel . textContent = 'Server URL' ;
109+ serverUrlLabel . textContent = trans . __ ( 'Server URL' ) ;
106110 serverUrlLabel . htmlFor = 'hybrid-kernels-server-url' ;
107111 serverUrlSection . appendChild ( serverUrlLabel ) ;
108112
@@ -122,15 +126,15 @@ export class RemoteServerConfigBody
122126
123127 const tokenLabel = document . createElement ( 'label' ) ;
124128 tokenLabel . className = 'jp-HybridKernels-label' ;
125- tokenLabel . textContent = 'Authentication Token' ;
129+ tokenLabel . textContent = trans . __ ( 'Authentication Token' ) ;
126130 tokenLabel . htmlFor = 'hybrid-kernels-token' ;
127131 tokenSection . appendChild ( tokenLabel ) ;
128132
129133 this . _tokenInput = document . createElement ( 'input' ) ;
130134 this . _tokenInput . type = 'password' ;
131135 this . _tokenInput . id = 'hybrid-kernels-token' ;
132136 this . _tokenInput . className = 'jp-mod-styled jp-HybridKernels-input' ;
133- this . _tokenInput . placeholder = 'Enter token (optional)' ;
137+ this . _tokenInput . placeholder = trans . __ ( 'Enter token (optional)' ) ;
134138 this . _tokenInput . value = options . token ;
135139 tokenSection . appendChild ( this . _tokenInput ) ;
136140
@@ -189,5 +193,10 @@ export namespace RemoteServerConfigBody {
189193 * The initial token value.
190194 */
191195 token : string ;
196+
197+ /**
198+ * The translation bundle.
199+ */
200+ trans : TranslationBundle ;
192201 }
193202}
0 commit comments