Skip to content

Commit 6b1b784

Browse files
authored
Merge pull request jupyter-lsp#703 from jupyter-lsp/krassowski-translations
Fix translations for popup
2 parents 30a57c9 + 9899806 commit 6b1b784

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/jupyterlab-lsp/src/components/statusbar.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,16 @@ class LSPPopup extends VDomRenderer<LSPStatus.Model> {
340340
);
341341
}
342342
);
343+
const trans = this.model.trans;
343344
return (
344345
<div className={'lsp-popover-content'}>
345346
<div className={'lsp-servers-menu'}>
346-
<h3 className={'lsp-servers-title'}>
347-
{this.model.trans.__('LSP servers')}
348-
</h3>
347+
<h3 className={'lsp-servers-title'}>{trans.__('LSP servers')}</h3>
349348
<div className={'lsp-servers-lists'}>
350349
{servers_available.length ? (
351350
<CollapsibleList
352351
key={'available'}
353-
title={this.model.trans.__('Available')}
352+
title={trans.__('Available')}
354353
list={servers_available}
355354
startCollapsed={true}
356355
/>
@@ -360,7 +359,7 @@ class LSPPopup extends VDomRenderer<LSPStatus.Model> {
360359
{running_servers.length ? (
361360
<CollapsibleList
362361
key={'running'}
363-
title={this.model.trans.__('Running')}
362+
title={trans.__('Running')}
364363
list={running_servers}
365364
/>
366365
) : (
@@ -369,7 +368,7 @@ class LSPPopup extends VDomRenderer<LSPStatus.Model> {
369368
{missing_languages.length ? (
370369
<CollapsibleList
371370
key={'missing'}
372-
title={this.model.trans.__('Missing')}
371+
title={trans.__('Missing')}
373372
list={missing_languages}
374373
/>
375374
) : (
@@ -378,15 +377,15 @@ class LSPPopup extends VDomRenderer<LSPStatus.Model> {
378377
</div>
379378
</div>
380379
<div className={'lsp-popover-status'}>
381-
{this.model.trans.__('Documentation:')}{' '}
380+
{trans.__('Documentation:')}{' '}
382381
<a
383382
href={
384383
'https://jupyterlab-lsp.readthedocs.io/en/latest/Language%20Servers.html'
385384
}
386385
target="_blank"
387386
rel="noreferrer"
388387
>
389-
{this.model.trans.__('Language Servers')}
388+
{trans.__('Language Servers')}
390389
</a>
391390
</div>
392391
</div>

0 commit comments

Comments
 (0)