@@ -24,11 +24,13 @@ function getActiveClients() {
2424function getServerStatus ( serverId ) {
2525 const activeClients = getActiveClients ( ) ;
2626 const client = activeClients . find ( ( c ) => c . server ?. id === serverId ) ;
27- if ( ! client ) return " stopped" ;
27+ if ( ! client ) return strings [ "lsp: stopped status" ] ;
2828 try {
29- return client . client ?. connected !== false ? "active" : "connecting" ;
29+ return client . client ?. connected !== false
30+ ? strings [ "lsp:active status" ]
31+ : strings [ "lsp:connecting status" ] ;
3032 } catch {
31- return " stopped" ;
33+ return strings [ "lsp: stopped status" ] ;
3234 }
3335}
3436
@@ -142,7 +144,13 @@ async function restartAllServers() {
142144 }
143145
144146 const count = activeClients . length ;
145- toast ( `Restarting ${ count } LSP server${ count > 1 ? "s" : "" } ...` ) ;
147+ const key =
148+ count > 1
149+ ? "lsp:restarting lsp server plural"
150+ : "lsp:restarting lsp server singular" ;
151+ const message = strings [ key ] . replace ( "{count}" , count ) ;
152+
153+ toast ( message ) ;
146154
147155 try {
148156 await lspClientManager . dispose ( ) ;
@@ -164,7 +172,13 @@ async function stopAllServers() {
164172
165173 try {
166174 await lspClientManager . dispose ( ) ;
167- toast ( `Stopped ${ count } LSP server${ count > 1 ? "s" : "" } ` ) ;
175+ const key =
176+ count > 1
177+ ? "lsp:stopped lsp server plural"
178+ : "lsp:stopped lsp server singular" ;
179+ const message = strings [ key ] . replace ( "{count}" , count ) ;
180+
181+ toast ( message ) ;
168182 } catch ( err ) {
169183 toast ( strings [ "lsp:failed to stop servers" ] ) ;
170184 }
@@ -230,7 +244,9 @@ function showLspInfoDialog() {
230244 } }
231245 >
232246 < span className = "icon autorenew" />
233- < span > { hasRunning ? "Restart All" : "Start All" } </ span >
247+ < span >
248+ { hasRunning ? strings [ "lsp:restart all" ] : strings [ "lsp:start all" ] }
249+ </ span >
234250 </ button >
235251 { hasRunning && (
236252 < button
@@ -242,7 +258,7 @@ function showLspInfoDialog() {
242258 } }
243259 >
244260 < span className = "icon power_settings_new" />
245- < span > Stop All </ span >
261+ < span > { strings [ "lsp:stop all" ] } </ span >
246262 </ button >
247263 ) }
248264 </ div >
@@ -383,7 +399,7 @@ function showLspInfoDialog() {
383399 ) }
384400
385401 < div className = "lsp-section" >
386- < div className = "lsp-section-label" > Supported </ div >
402+ < div className = "lsp-section-label" > { strings [ "lsp:supported" ] } </ div >
387403 < div className = "lsp-chip-container" >
388404 { server . languages . map ( ( lang ) => (
389405 < span className = "lsp-chip ext" > .{ lang } </ span >
@@ -448,7 +464,7 @@ function showLspInfoDialog() {
448464 >
449465 < div className = "lsp-logs-title" >
450466 < span className = "icon expand_more lsp-expand-icon" />
451- < span > LSP Logs </ span >
467+ < span > { strings [ "lsp:logs" ] } </ span >
452468 { logs . length > 0 && (
453469 < span className = "lsp-log-count" > ({ logs . length } )</ span >
454470 ) }
0 commit comments