fix(i18n): wire Maintenance, Hatch and Fast Setup text to the Spanish catalogue

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ZeedifandClaude Sonnet 5 committed 2026-09-26 11:58:15 -06:00
1 parent db09b9e9da
commit c7e3af0c22
13 files changed
+363 -141

No files matched your search

+49 -31
View File
@@ -11,18 +11,19 @@ import {
type FullScanOptions,
} from "@vrtmrz/livesync-commonlib/compat/serviceFeatures/offlineScanner";
import { adjustSettingToRemoteIfNeeded, cancelScheduledInitialisation, processVaultInitialisation } from "./redFlag";
import { $msg } from "@/common/translation";
export const SIMPLE_FETCH_STAGE1_REMOTE_WINS = "Overwrite all with remote files";
export const SIMPLE_FETCH_STAGE1_NEWER_WINS = "Compare time and take newer";
export const SIMPLE_FETCH_STAGE1_DETAILED = "Use the detailed flow";
export const SIMPLE_FETCH_STAGE1_CANCEL = "Cancel";
export const SIMPLE_FETCH_STAGE1_REMOTE_WINS: string = $msg("Overwrite all with remote files");
export const SIMPLE_FETCH_STAGE1_NEWER_WINS: string = $msg("Compare time and take newer");
export const SIMPLE_FETCH_STAGE1_DETAILED: string = $msg("Use the detailed flow");
export const SIMPLE_FETCH_STAGE1_CANCEL: string = $msg("Cancel");
export const SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE = "Keep local files even if not on remote";
export const SIMPLE_FETCH_STAGE2_REMOTE_DELETE_ALL = "Delete local files if not on remote";
export const SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE: string = $msg("Keep local files even if not on remote");
export const SIMPLE_FETCH_STAGE2_REMOTE_DELETE_ALL: string = $msg("Delete local files if not on remote");
export const SIMPLE_FETCH_STAGE2_NEWER_CLEANUP = "Delete local files if deleted on remote";
export const SIMPLE_FETCH_STAGE2_NEWER_SYNC_ALL = "Keep local files even if deleted on remote";
export const STAGE2_ABORT = "Cancel all and reboot";
export const SIMPLE_FETCH_STAGE2_NEWER_CLEANUP: string = $msg("Delete local files if deleted on remote");
export const SIMPLE_FETCH_STAGE2_NEWER_SYNC_ALL: string = $msg("Keep local files even if deleted on remote");
export const STAGE2_ABORT: string = $msg("Cancel all and reboot");
const SIMPLE_FETCH_MODE_KEY = "simple-fetch-mode";
@@ -91,20 +92,26 @@ export async function askSimpleFetchMode(
const remembered = getRememberedSimpleFetchMode(host);
if (remembered) return remembered;
const msg = `We are about to retrieve the remote data.
const msg = $msg(
`We are about to retrieve the remote data.
Firstly, how shall we handle the data retrieved from this remote source?
- **${SIMPLE_FETCH_STAGE1_NEWER_WINS}**: Compares the modified time of files and takes the newer one.
- **\${NEWER_WINS}**: Compares the modified time of files and takes the newer one.
If you have been using Self-hosted LiveSync and have made changes on multiple devices, this option may be suitable for you as it tries to merge changes based on modified time.
- **${SIMPLE_FETCH_STAGE1_REMOTE_WINS}**: Remote data is the source of truth.
- **\${REMOTE_WINS}**: Remote data is the source of truth.
If you are new to using Self-hosted LiveSync. This option may be easiest to understand and get started with.
It will overwrite all your local files with the remote data, so please make sure you have a backup if there is any important data in your vault.
- **${SIMPLE_FETCH_STAGE1_DETAILED}**: Opens the detailed setup wizard.
If you want to have more control over the synchronisation process, or want to review the changes before applying, you can choose this option to use the detailed flow.
`;
- **\${DETAILED}**: Opens the detailed setup wizard.
If you want to have more control over the synchronisation process, or want to review the changes before applying, you can choose this option to use the detailed flow.`,
{
NEWER_WINS: SIMPLE_FETCH_STAGE1_NEWER_WINS,
REMOTE_WINS: SIMPLE_FETCH_STAGE1_REMOTE_WINS,
DETAILED: SIMPLE_FETCH_STAGE1_DETAILED,
}
);
const stage1 = await host.services.UI.confirm.confirmWithMessage(
"Data retrieval scheduled",
$msg("Data retrieval scheduled"),
msg,
[
SIMPLE_FETCH_STAGE1_NEWER_WINS,
@@ -123,15 +130,21 @@ Firstly, how shall we handle the data retrieved from this remote source?
}
if (stage1 === SIMPLE_FETCH_STAGE1_REMOTE_WINS) {
const msg = `Since you have chosen to overwrite all local files with remote data, **how would you like to handle local files that are not present in the remote database?**
const msg = $msg(
`Since you have chosen to overwrite all local files with remote data, **how would you like to handle local files that are not present in the remote database?**
- **${SIMPLE_FETCH_STAGE2_REMOTE_DELETE_ALL}**: Local-only files and remote-deleted files will be removed.
- **\${DELETE_ALL}**: Local-only files and remote-deleted files will be removed.
This option will make your local vault exactly the same as the remote database, but please make sure you have a backup if there is any important data in your vault.
- **${SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE}**: All existing local files will be preserved.
This option will keep all your local files, but it may cause duplicates if there are files that exist on local but not on remote. You can clean up these duplicates manually after the synchronisation.`;
- **\${DELETE_NONE}**: All existing local files will be preserved.
This option will keep all your local files, but it may cause duplicates if there are files that exist on local but not on remote. You can clean up these duplicates manually after the synchronisation.`,
{
DELETE_ALL: SIMPLE_FETCH_STAGE2_REMOTE_DELETE_ALL,
DELETE_NONE: SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE,
}
);
const stage2 = await host.services.UI.confirm.confirmWithMessage(
"How to handle extra existing local files?",
$msg("How to handle extra existing local files?"),
msg,
[SIMPLE_FETCH_STAGE2_REMOTE_DELETE_ALL, SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE, STAGE2_ABORT],
SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE,
@@ -146,16 +159,21 @@ Firstly, how shall we handle the data retrieved from this remote source?
}
if (stage1 === SIMPLE_FETCH_STAGE1_NEWER_WINS) {
const msg = `How should files that were deleted on other devices be handled?
const msg = $msg(
`How should files that were deleted on other devices be handled?
- **${SIMPLE_FETCH_STAGE2_NEWER_CLEANUP}**: Delete local files if they were deleted on remote.
- **\${NEWER_CLEANUP}**: Delete local files if they were deleted on remote.
This is useful if you want to keep your vault clean and consistent across devices, but please make sure you have a backup if there is already any important data in your vault.
- **${SIMPLE_FETCH_STAGE2_NEWER_SYNC_ALL}**: Recreate remote files even if they were deleted on remote.
This option will keep all your local files, but it may cause duplicates if there are files that exist on local but not on remote. You can clean up these duplicates manually after the synchronisation.
`;
- **\${NEWER_SYNC_ALL}**: Recreate remote files even if they were deleted on remote.
This option will keep all your local files, but it may cause duplicates if there are files that exist on local but not on remote. You can clean up these duplicates manually after the synchronisation.`,
{
NEWER_CLEANUP: SIMPLE_FETCH_STAGE2_NEWER_CLEANUP,
NEWER_SYNC_ALL: SIMPLE_FETCH_STAGE2_NEWER_SYNC_ALL,
}
);
const stage2 = await host.services.UI.confirm.confirmWithMessage(
"Conflict & Deletion Options",
$msg("Conflict & Deletion Options"),
msg,
[SIMPLE_FETCH_STAGE2_NEWER_CLEANUP, SIMPLE_FETCH_STAGE2_NEWER_SYNC_ALL, STAGE2_ABORT],
SIMPLE_FETCH_STAGE2_NEWER_SYNC_ALL,
@@ -172,8 +190,8 @@ Firstly, how shall we handle the data retrieved from this remote source?
return "cancelled";
}
const RERUN_PROCESS = "Reboot to re-run the process";
const RELEASE_FLAG_PROCESS = "Finalise the process and resume normal operation";
const RERUN_PROCESS: string = $msg("Reboot to re-run the process");
const RELEASE_FLAG_PROCESS: string = $msg("Finalise the process and resume normal operation");
export async function askAndPerformFastSetupOnScheduledFetchAll(
host: NecessaryServices<
| "vault"
@@ -246,9 +264,9 @@ export async function askAndPerformFastSetupOnScheduledFetchAll(
);
if (!syncResult) {
const canRelease = await host.services.UI.confirm.askSelectStringDialogue(
"Some files failed to synchronise. What would you like to do?",
$msg("Some files failed to synchronise. What would you like to do?"),
[RERUN_PROCESS, RELEASE_FLAG_PROCESS],
{ defaultAction: RELEASE_FLAG_PROCESS, title: "Synchronisation Issues Detected" }
{ defaultAction: RELEASE_FLAG_PROCESS, title: $msg("Synchronisation Issues Detected") }
);
if (canRelease === RERUN_PROCESS) {
log("User chose to reboot and re-run the process.", LOG_LEVEL_NOTICE);