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
@@ -23,13 +23,13 @@
let userType = $state<SelectMethodExistingResultType>(TYPE_CANCELLED);
let proceedTitle = $derived.by(() => {
if (userType === TYPE_USE_SETUP_URI) {
return "Proceed with Setup URI";
return translateMessage("Proceed with Setup URI");
} else if (userType === TYPE_CONFIGURE_MANUALLY) {
return translateMessage("Ui.SetupWizard.SelectExisting.ProceedManual");
} else if (userType === TYPE_SCAN_QR_CODE) {
return "Scan the QR code displayed on an active device using this device's camera.";
return translateMessage("Scan the QR code displayed on an active device using this device's camera.");
} else {
return "Please select an option to proceed";
return translateMessage("Please select an option to proceed");
}
});
const canProceed = $derived.by(() => {
@@ -37,16 +37,24 @@
});
</script>
<DialogHeader title="Device Setup Method" />
<Guidance>You are adding this device to an existing synchronisation setup.</Guidance>
<DialogHeader title={translateMessage("Device Setup Method")} />
<Guidance>{translateMessage("You are adding this device to an existing synchronisation setup.")}</Guidance>
<Instruction>
<Question>Please select a method to import the settings from another device.</Question>
<Question>{translateMessage("Please select a method to import the settings from another device.")}</Question>
<Options>
<Option selectedValue={TYPE_USE_SETUP_URI} title="Use a Setup URI (Recommended)" bind:value={userType}>
Paste the Setup URI generated from one of your active devices.
<Option
selectedValue={TYPE_USE_SETUP_URI}
title={translateMessage("Use a Setup URI (Recommended)")}
bind:value={userType}
>
{translateMessage("Paste the Setup URI generated from one of your active devices.")}
</Option>
<Option selectedValue={TYPE_SCAN_QR_CODE} title="Scan a QR Code (Recommended for mobile)" bind:value={userType}>
Scan the QR code displayed on an active device using this device's camera.
<Option
selectedValue={TYPE_SCAN_QR_CODE}
title={translateMessage("Scan a QR Code (Recommended for mobile)")}
bind:value={userType}
>
{translateMessage("Scan the QR code displayed on an active device using this device's camera.")}
</Option>
<Option
selectedValue={TYPE_CONFIGURE_MANUALLY}
@@ -59,5 +67,5 @@
</Instruction>
<UserDecisions>
<Decision title={proceedTitle} important={canProceed} disabled={!canProceed} commit={() => setResult(userType)} />
<Decision title="Cancel" commit={() => setResult(TYPE_CANCELLED)} />
<Decision title={translateMessage("Cancel")} commit={() => setResult(TYPE_CANCELLED)} />
</UserDecisions>