feat(i18n): convert Settings MCP section to t() (Batch E)

This commit is contained in:
iamdoubz committed 2026-07-12 12:37:22 -05:00
1 parent 5967fd6997
commit d2f35c64b1
1 file changed
+34 -44
+34 -44
View File
@@ -1706,15 +1706,12 @@
</section>
{:else if section === "mcp"}
<section>
<h3>MCP server</h3>
<h3>{t("settings.mcp.title")}</h3>
<div class="banner">
<AlertTriangle size={14} aria-hidden="true" />
<span>
This lets your own coding agent (Claude Code, Codex, Copilot, OpenCode, …) pull meeting
context on your local machine. Once connected, <strong>that agent</strong> may forward
what it reads to its own model provider's cloud — outside WhispAssist's control.
WhispAssist itself never sends this data anywhere; the server only listens on this
device (<code>127.0.0.1</code>) and every read is logged below.
{t("settings.mcp.banner_1")} <strong>{t("settings.mcp.banner_agent")}</strong>
{t("settings.mcp.banner_2")}<code>127.0.0.1</code>{t("settings.mcp.banner_3")}
</span>
</div>
@@ -1725,23 +1722,21 @@
disabled={settings.mcpSaving}
onchange={(e) => toggleMcpEnabled((e.target as HTMLInputElement).checked)}
/>
<span>Enable the MCP server</span>
<span>{t("settings.mcp.enable")}</span>
</label>
<p class="muted">
Off by default. Loopback-only, token-gated — nothing is reachable from the network.
</p>
<p class="muted">{t("settings.mcp.enable_hint")}</p>
<div class="grid">
<label
>Transport
>{t("settings.mcp.transport")}
<select bind:value={mcpTransport} disabled={settings.mcpStatus?.enabled}>
<option value="http">Streamable HTTP</option>
<option value="stdio">stdio (agent spawns a process)</option>
<option value="http">{t("settings.mcp.transport_http")}</option>
<option value="stdio">{t("settings.mcp.transport_stdio")}</option>
</select>
</label>
{#if mcpTransport === "http"}
<label
>Port<input
>{t("settings.mcp.port")}<input
type="number"
min="1"
max="65535"
@@ -1752,21 +1747,17 @@
{/if}
</div>
{#if settings.mcpStatus?.enabled}
<p class="muted small">
To change transport/port, turn the server off first, then back on.
</p>
<p class="muted small">{t("settings.mcp.transport_change_hint")}</p>
{/if}
<h4>Scope</h4>
<h4>{t("settings.mcp.scope_title")}</h4>
<div class="grid">
<label
>Expose
>{t("settings.mcp.expose")}
<select bind:value={mcpExpose} onchange={saveMcpScope}>
<option value="none">None — nothing is shared</option>
<option value="selected">Selected — only feature briefs you've marked shared</option>
<option value="all"
>All — meetings, transcripts, action items, and shared briefs</option
>
<option value="none">{t("settings.mcp.scope_none")}</option>
<option value="selected">{t("settings.mcp.scope_selected")}</option>
<option value="all">{t("settings.mcp.scope_all")}</option>
</select>
</label>
</div>
@@ -1777,22 +1768,16 @@
disabled={mcpExpose === "none"}
onchange={saveMcpScope}
/>
<span
>Also allow meetings with a saved recording (off by default — a recorded meeting's
transcript is withheld even in "All" scope until this is on)</span
>
<span>{t("settings.mcp.expose_recordings")}</span>
</label>
{#if settings.mcpLastToken}
<div class="mcp-token" aria-live="polite">
<div class="row">
<KeyRound size={14} aria-hidden="true" />
<strong>New auth token — shown once, copy it now</strong>
<strong>{t("settings.mcp.token_title")}</strong>
</div>
<p class="muted small">
This won't be shown again. It's stored in your OS credential store; if you lose it,
turn the server off and back on to mint a new one.
</p>
<p class="muted small">{t("settings.mcp.token_hint")}</p>
<div class="row">
<code>{settings.mcpLastToken}</code>
<button
@@ -1800,7 +1785,7 @@
onclick={() => copyToClipboard(settings.mcpLastToken ?? "", "token")}
>
<Copy size={13} aria-hidden="true" />
{mcpCopied === "token" ? "Copied" : "Copy"}
{mcpCopied === "token" ? t("settings.mcp.copied") : t("settings.mcp.copy")}
</button>
</div>
</div>
@@ -1808,40 +1793,45 @@
{#if settings.mcpStatus?.enabled}
<div class="row">
Endpoint<code>{settings.mcpStatus.endpoint}</code>
{t("settings.mcp.endpoint")}<code>{settings.mcpStatus.endpoint}</code>
<button
class="link"
onclick={() => copyToClipboard(settings.mcpStatus?.endpoint ?? "", "endpoint")}
>
<Copy size={13} aria-hidden="true" />
{mcpCopied === "endpoint" ? "Copied" : "Copy"}
{mcpCopied === "endpoint" ? t("settings.mcp.copied") : t("settings.mcp.copy")}
</button>
</div>
<p class="muted small">
Point your agent's MCP client config at this
{settings.mcpStatus.transport === "stdio" ? "command" : "URL"}, with the token above as
a bearer credential.
{t("settings.mcp.endpoint_hint", {
kind:
settings.mcpStatus.transport === "stdio"
? t("settings.mcp.kind_command")
: t("settings.mcp.kind_url"),
})}
</p>
{/if}
<h4>Access log</h4>
<p class="muted">Every tool read an agent makes, allowed or denied (FR-MCP-5).</p>
<h4>{t("settings.mcp.access_log")}</h4>
<p class="muted">{t("settings.mcp.access_log_hint")}</p>
{#if settings.mcpAccessLog.length === 0}
<p class="muted">No agent has read anything yet.</p>
<p class="muted">{t("settings.mcp.no_reads")}</p>
{:else}
<ul class="events">
{#each settings.mcpAccessLog as entry, i (entry.at + "-" + i)}
<li>
<code>{entry.tool}</code>
{#if entry.meeting_id}<span class="host"
>meeting {entry.meeting_id.slice(0, 8)}</span
>{t("settings.mcp.log_meeting", { id: entry.meeting_id.slice(0, 8) })}</span
>{/if}
{#if entry.client}<span class="badge">{entry.client}</span>{/if}
<span class="host">{relativeTime(entry.at)}</span>
</li>
{/each}
</ul>
<button class="link" onclick={() => settings.loadMcpAccessLog()}>Refresh</button>
<button class="link" onclick={() => settings.loadMcpAccessLog()}
>{t("settings.mcp.refresh")}</button
>
{/if}
</section>
{:else if section === "privacy"}