refactor(i18n): route remaining Obsidian UI text through the message catalogue

Continues the source-key migration inside the application boundary introduced
in 1.0.0, where LiveSync owns its catalogue and consumes Commonlib as a
published package.

- Replace hardcoded user-visible strings in the Obsidian UI (Setup Wizard
  dialogues, P2P panes, Customisation Sync panes, Global History, the JSON
  conflict pane and the remote-configuration menu) with `$msg` calls, keeping
  the English source string as the key.
- Wire up strings whose translations already existed in the catalogue but were
  still rendered as literals, for example the whole Intro dialogue.
- Add the new entries to `src/common/messagesYAML/en.yaml` and `es.yaml`, then
  regenerate `messagesJson/` and `combinedMessages.prod.ts` through the
  documented `i18n:bake` pipeline.
- No Commonlib gitlink or catalogue is involved; every change is
  LiveSync-owned.

Regenerating the catalogue also normalises three pre-existing entries each in
`ko.json` and `zh.json`, where the committed JSON kept a trailing space before
a newline that YAML cannot represent.

Verified with tsc-check, tsc-check:apps, svelte-check and lint.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zeedif
2026-07-30 18:59:19 -06:00
co-authored by Claude Opus 5
parent c385bd7ce7
commit b6746be73e
37 changed files with 3624 additions and 499 deletions
@@ -95,40 +95,40 @@
</script>
<div class="server-status">
<h3>Signalling Status</h3>
<h3>{translateMessage("Signalling Status")}</h3>
<div class="status-item">
<span>Connection:</span>
<span>{translateMessage("Connection:")}</span>
<span class="status-value {isConnected ? 'connected' : 'disconnected'}">
{isConnected ? "🟢 Connected" : "🔴 Disconnected"}
{isConnected ? translateMessage("🟢 Connected") : translateMessage("🔴 Disconnected")}
</span>
</div>
<div class="status-item status-action">
{#if !isConnected}
<button onclick={onOpenConnection}>Open connection</button>
<button onclick={onOpenConnection}>{translateMessage("Open connection")}</button>
{:else}
<button onclick={onDisconnect}>Disconnect</button>
<button onclick={onDisconnect}>{translateMessage("Disconnect")}</button>
{/if}
</div>
{#if serverInfo}
<div class="status-item">
<span>Room ID suffix:</span>
<span class="room-suffix-display" title={roomSuffix || "Not configured"}>
<span>{translateMessage("Room ID suffix:")}</span>
<span class="room-suffix-display" title={roomSuffix || translateMessage("Not configured")}>
{roomSuffix || "-"}
</span>
</div>
<div class="status-item">
<span>Peer ID:</span>
<span>{translateMessage("Peer ID:")}</span>
<span class="peer-id-display" title={serverInfo.serverPeerId}>
{serverInfo.serverPeerId.slice(0, 12)}...
</span>
</div>
<div class="status-item">
<span>Devices:</span>
<span>{translateMessage("Devices:")}</span>
<span>{serverInfo.knownAdvertisements.length}</span>
</div>
{/if}
@@ -146,7 +146,7 @@
? translateMessage("Stop announcing changes")
: translateMessage("Start announcing changes")}
>
{isBroadcasting ? '📡 On' : '📡 Off'}
{isBroadcasting ? translateMessage("📡 On") : translateMessage("📡 Off")}
</button>
</div>
{/if}
@@ -154,39 +154,39 @@
{#if core}
<div class="status-item status-action diag-toggle-row">
<label class="broadcast-label" for="diag-toggle">
🕵️ Diag
{translateMessage("🕵️ Diag")}
</label>
<button
id="diag-toggle"
class="broadcast-button {useDiagRTC ? 'is-on' : 'is-off'}"
onclick={toggleDiagRTC}
title={useDiagRTC
? 'Diagnostic RTCPeerConnection is enabled'
: 'Use Diagnostic RTCPeerConnection for statistics'}
? translateMessage("Diagnostic RTCPeerConnection is enabled")
: translateMessage("Use Diagnostic RTCPeerConnection for statistics")}
>
{useDiagRTC ? 'On' : 'Off'}
{useDiagRTC ? translateMessage("On") : translateMessage("Off")}
</button>
</div>
{/if}
{#if serverInfo}
<div class="diag-section">
<h4>Stats</h4>
<h4>{translateMessage("Stats")}</h4>
<div class="diag-grid">
<div class="diag-item">
<span>Incoming:</span>
<span>{translateMessage("Incoming:")}</span>
<span>{serverInfo.diag.totalNewConnections}</span>
</div>
<div class="diag-item">
<span>Connected:</span>
<span>{translateMessage("Connected:")}</span>
<span>{serverInfo.diag.totalSuccessfulConnections}</span>
</div>
<div class="diag-item">
<span>Failed:</span>
<span>{translateMessage("Failed:")}</span>
<span>{serverInfo.diag.totalFailedConnections}</span>
</div>
<div class="diag-item">
<span>Closed:</span>
<span>{translateMessage("Closed:")}</span>
<span>{serverInfo.diag.totalClosedConnections}</span>
</div>
</div>