mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-11 14:15:46 +00:00
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>
38 lines
1.7 KiB
Svelte
38 lines
1.7 KiB
Svelte
<script lang="ts">
|
|
import DialogHeader from "@/modules/services/LiveSyncUI/components/DialogHeader.svelte";
|
|
import Guidance from "@/modules/services/LiveSyncUI/components/Guidance.svelte";
|
|
import Decision from "@/modules/services/LiveSyncUI/components/Decision.svelte";
|
|
import Instruction from "@/modules/services/LiveSyncUI/components/Instruction.svelte";
|
|
import UserDecisions from "@/modules/services/LiveSyncUI/components/UserDecisions.svelte";
|
|
import { TYPE_CLOSE, type ScanQRCodeResultType } from "./setupDialogTypes";
|
|
import { $msg as translateMessage } from "@/common/translation";
|
|
|
|
type Props = {
|
|
setResult: (_result: ScanQRCodeResultType) => void;
|
|
};
|
|
const { setResult }: Props = $props();
|
|
</script>
|
|
|
|
<DialogHeader title={translateMessage("Scan QR Code")} />
|
|
<Guidance>{translateMessage("Please follow the steps below to import settings from your existing device.")}</Guidance>
|
|
<Instruction>
|
|
<!-- <Question>How would you like to configure the connection to your server?</Question> -->
|
|
<ol>
|
|
<li>{translateMessage("On this device, please keep this Vault open.")}</li>
|
|
<li>{translateMessage("On the source device, open Obsidian.")}</li>
|
|
<li>
|
|
{translateMessage(
|
|
"On the source device, from the command palette, run the 'Show settings as a QR code' command."
|
|
)}
|
|
</li>
|
|
<li>
|
|
{translateMessage(
|
|
"On this device, switch to the camera app or use a QR code scanner to scan the displayed QR code."
|
|
)}
|
|
</li>
|
|
</ol>
|
|
</Instruction>
|
|
<UserDecisions>
|
|
<Decision title={translateMessage("Close this dialog")} important={true} commit={() => setResult(TYPE_CLOSE)} />
|
|
</UserDecisions>
|