Skip to content

Commit 7143387

Browse files
committed
feat: Added some new strings
1 parent a172d63 commit 7143387

33 files changed

Lines changed: 408 additions & 40 deletions

‎src/components/lspInfoDialog/index.js‎

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ function getActiveClients() {
2424
function 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
)}

‎src/lang/ar-ye.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/be-by.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/bn-bd.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/cs-cz.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/de-de.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/en-us.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/es-sv.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/fr-fr.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

‎src/lang/he-il.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,16 @@
842842
"lsp:failed to stop servers": "Failed to stop servers",
843843
"lsp:no lsp servers are currently running": "No LSP servers are currently running",
844844
"lsp:failed to restart servers": "Failed to restart servers",
845-
"sponsors:be-the-first": "Be the first {tier} Sponsor!"
845+
"sponsors:be-the-first": "Be the first {tier} Sponsor!",
846+
"lsp:restarting lsp server singular": "Restarting {count} LSP server...",
847+
"lsp:restarting lsp server plural": "Restarting {count} LSP servers...",
848+
"lsp:stopped lsp server singular": "Stopped {count} LSP server",
849+
"lsp:stopped lsp server plural": "Stopped {count} LSP servers",
850+
"lsp:restart all": "Restart All",
851+
"lsp:start all": "Start All",
852+
"lsp:supported": "Supported",
853+
"lsp:logs": "LSP logs",
854+
"lsp:stopped status": "stopped",
855+
"lsp:active status": "active",
856+
"lsp:connecting status": "connecting"
846857
}

0 commit comments

Comments
 (0)