@futo-org/backups-orchestrator-ui 0.45.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/components/backends/BackendItem.svelte +17 -13
  2. package/dist/components/backends/BackendsList.svelte +4 -3
  3. package/dist/components/backends/dialogs/CreateLocalBackendModal.svelte +6 -5
  4. package/dist/components/backends/dialogs/OAuthDeviceFlowModal.svelte +3 -2
  5. package/dist/components/backends/dialogs/SelectBackendModal.svelte +7 -6
  6. package/dist/components/backups/BackupItem.svelte +13 -12
  7. package/dist/components/backups/BackupStatus.svelte +45 -40
  8. package/dist/components/backups/BackupsList.svelte +6 -5
  9. package/dist/components/backups/dialogs/ConfigureRepositoryModal.svelte +9 -8
  10. package/dist/components/backups/dialogs/CreateRepositoryModal.svelte +8 -4
  11. package/dist/components/backups/dialogs/ImportRepositoryModal.svelte +5 -4
  12. package/dist/components/backups/dialogs/ReconfigureRepositoryBackendModal.svelte +3 -3
  13. package/dist/components/backups/dialogs/RestoreSnapshotModal.svelte +16 -15
  14. package/dist/components/backups/dialogs/RollbackSnapshotModal.svelte +9 -8
  15. package/dist/components/backups/dialogs/SelectRepositoryModal.svelte +13 -7
  16. package/dist/components/backups/dialogs/ViewStatusModal.svelte +50 -19
  17. package/dist/components/backups/metrics-history/MetricsHistoryModal.svelte +37 -21
  18. package/dist/components/backups/run-history/RepositoryRunHistory.svelte +4 -3
  19. package/dist/components/backups/run-history/RepositoryRunHistoryItem.svelte +32 -12
  20. package/dist/components/backups/run-history/RepositoryRunHistoryPage.svelte +16 -14
  21. package/dist/components/backups/run-history/RunHistoryModal.svelte +5 -1
  22. package/dist/components/backups/snapshots-list/RepositorySnapshotsList.svelte +5 -4
  23. package/dist/components/backups/snapshots-list/RepositorySnapshotsListItem.svelte +15 -5
  24. package/dist/components/backups/snapshots-list/RepositorySnapshotsPage.svelte +7 -6
  25. package/dist/components/backups/snapshots-list/SnapshotsListModal.svelte +5 -1
  26. package/dist/components/dashboard/DashboardAvgBackupTime.svelte +2 -1
  27. package/dist/components/dashboard/DashboardBackupHealth.svelte +14 -10
  28. package/dist/components/dashboard/DashboardCurrentUsage.svelte +2 -1
  29. package/dist/components/dashboard/DashboardDailyBackupTime.svelte +2 -1
  30. package/dist/components/dashboard/DashboardInstall.svelte +3 -2
  31. package/dist/components/dashboard/DashboardRecentBackups.svelte +9 -4
  32. package/dist/components/dashboard/DashboardTotalStored.svelte +7 -2
  33. package/dist/components/integrations/immich/ImmichBackupSettingsPage.svelte +2 -0
  34. package/dist/components/integrations/immich/ImmichBackupsAdminNavButton.svelte +2 -1
  35. package/dist/components/integrations/immich/ImmichBackupsSidebarItem.svelte +22 -14
  36. package/dist/components/integrations/immich/ImmichDatabaseDumpAlert.svelte +43 -0
  37. package/dist/components/integrations/immich/ImmichDatabaseDumpAlert.svelte.d.ts +18 -0
  38. package/dist/components/integrations/immich/ImmichManageBackupOverview.svelte +15 -14
  39. package/dist/components/integrations/immich/ImmichManageBackupPage.svelte +5 -2
  40. package/dist/components/integrations/immich/ImmichOnboardingSetupFlow.svelte +2 -1
  41. package/dist/components/integrations/immich/settings/ImmichSettingsBackupContents.svelte +32 -31
  42. package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte +140 -0
  43. package/dist/components/integrations/immich/settings/ImmichSettingsBandwidth.svelte.d.ts +3 -0
  44. package/dist/components/integrations/immich/settings/ImmichSettingsSchedule.svelte +16 -15
  45. package/dist/components/integrations/immich/settings/ImmichSettingsStorage.svelte +19 -18
  46. package/dist/components/onboarding/OnboardingBootstrapError.svelte +5 -4
  47. package/dist/components/onboarding/OnboardingLogin.svelte +4 -4
  48. package/dist/components/onboarding/RecoveryKeyDisplay.svelte +5 -4
  49. package/dist/components/onboarding/SampleOnboarding.svelte +4 -3
  50. package/dist/components/onboarding/dialogs/BackupsRecoveryKeyModal.svelte +4 -3
  51. package/dist/components/onboarding/restore-point-flow/RestorePointFlow.svelte +2 -1
  52. package/dist/components/onboarding/restore-point-flow/RestorePointFlow2SelectSnapshot.svelte +8 -4
  53. package/dist/components/onboarding/restore-point-flow/RestorePointFlow3ConfirmRestore.svelte +9 -8
  54. package/dist/components/onboarding/restore-point-flow/RestorePointFlow4Restore.svelte +2 -1
  55. package/dist/components/onboarding/stages/OnboardingStageBackupServices.svelte +9 -6
  56. package/dist/components/onboarding/stages/OnboardingStageKeyImport.svelte +6 -5
  57. package/dist/components/onboarding/stages/OnboardingStageTelemetry.svelte +6 -7
  58. package/dist/components/onboarding/steps/OnboardingStep1FinishSetup.svelte +12 -11
  59. package/dist/components/onboarding/steps/OnboardingStep2ConnectAccount.svelte +13 -12
  60. package/dist/components/onboarding/steps/OnboardingStep3SaveRecoveryKey.svelte +5 -4
  61. package/dist/components/onboarding/steps/OnboardingStep4FirstBackup.svelte +8 -8
  62. package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte +11 -14
  63. package/dist/components/onboarding/upsell/UpsellBackupFeaturesGrid.svelte.d.ts +2 -17
  64. package/dist/components/onboarding/upsell/UpsellExplainFutoBackups.svelte +10 -5
  65. package/dist/components/onboarding/upsell/UpsellFrequentlyAskedQuestions.svelte +2 -1
  66. package/dist/components/onboarding/upsell/UpsellFutoBackupsBadge.svelte +2 -1
  67. package/dist/components/onboarding/upsell/UpsellHowItWorks.svelte +10 -10
  68. package/dist/components/onboarding/upsell/UpsellProtectYourImmichLibrary.svelte +14 -11
  69. package/dist/components/schedules/RepositoryPicker.svelte +8 -7
  70. package/dist/components/schedules/ScheduleItem.svelte +6 -5
  71. package/dist/components/schedules/ScheduleList.svelte +4 -3
  72. package/dist/components/schedules/dialogs/ConfigureScheduleModal.svelte +4 -3
  73. package/dist/components/schedules/dialogs/CreateScheduleModal.svelte +7 -3
  74. package/dist/components/settings/SettingsBackends.svelte +3 -2
  75. package/dist/components/settings/SettingsBilling.svelte +13 -12
  76. package/dist/components/settings/SettingsNotifications.svelte +11 -10
  77. package/dist/components/ui/PageLayout.svelte +3 -2
  78. package/dist/components/ui/Pagination.svelte +4 -3
  79. package/dist/components/ui/PathListField.svelte +5 -4
  80. package/dist/components/ui/PathPickerField.svelte +4 -3
  81. package/dist/components/ui/PathPickerModal.svelte +16 -13
  82. package/dist/components/ui/StackListItem.svelte +2 -1
  83. package/dist/components/util/DeviceFlowAction.svelte +3 -2
  84. package/dist/components/util/DeviceFlowCode.svelte +4 -3
  85. package/dist/components/util/RelativeTime.svelte +2 -1
  86. package/dist/fetch-client.d.ts +24 -0
  87. package/dist/fetch-client.js +25 -0
  88. package/dist/i18n.d.ts +3 -0
  89. package/dist/i18n.js +13 -0
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.js +1 -0
  92. package/dist/locales/en-XA.d.ts +2 -0
  93. package/dist/locales/en-XA.js +1 -0
  94. package/dist/locales/en-XA.po +2198 -0
  95. package/dist/locales/en.d.ts +2 -0
  96. package/dist/locales/en.js +1 -0
  97. package/dist/locales/en.po +2446 -0
  98. package/dist/services/backend.service.d.ts +2 -1
  99. package/dist/services/backend.service.js +6 -5
  100. package/dist/services/config.service.d.ts +17 -0
  101. package/dist/services/config.service.js +37 -0
  102. package/dist/services/deviceFlow.service.svelte.js +6 -5
  103. package/dist/services/filesystem.service.js +2 -1
  104. package/dist/services/immich.integration.service.d.ts +6 -1
  105. package/dist/services/immich.integration.service.js +32 -6
  106. package/dist/services/integrations.service.js +4 -3
  107. package/dist/services/log.service.svelte.js +9 -3
  108. package/dist/services/onboarding.service.js +8 -7
  109. package/dist/services/repository.service.d.ts +2 -1
  110. package/dist/services/repository.service.js +19 -18
  111. package/dist/services/runHistory.service.d.ts +2 -1
  112. package/dist/services/runHistory.service.js +5 -4
  113. package/dist/services/schedule.service.d.ts +2 -1
  114. package/dist/services/schedule.service.js +18 -17
  115. package/dist/services/session.service.js +2 -1
  116. package/dist/services/snapshot.service.d.ts +2 -1
  117. package/dist/services/snapshot.service.js +15 -14
  118. package/dist/services/task.service.js +3 -2
  119. package/dist/utils/format.js +10 -8
  120. package/dist/utils/handle-error.js +2 -1
  121. package/package.json +12 -5
@@ -12,6 +12,7 @@
12
12
  import { Badge, Icon } from "@immich/ui";
13
13
  import { mdiCloudOutline, mdiHarddisk, mdiShieldCheckOutline } from "@mdi/js";
14
14
  import StackListItem from "../ui/StackListItem.svelte";
15
+ import { t, msg } from "svelte-i18n-lingui";
15
16
 
16
17
  type Props = {
17
18
  repository?: LocalRepositoryDto;
@@ -28,21 +29,24 @@
28
29
  };
29
30
 
30
31
  const BackendNames: Record<BackendType, string> = {
31
- yucca: "FUTO Backups",
32
- local: "Local Storage",
33
- s3: "S3 Server",
32
+ yucca: msg`FUTO Backups`,
33
+ local: msg`Local Storage`,
34
+ s3: msg`S3 Server`,
34
35
  };
35
36
 
36
37
  const BackendDescriptions: Record<BackendType, string> = {
37
- yucca: "Hosted cloud backup storage",
38
- local: "A folder on this computer",
39
- s3: "An S3-compatible server",
38
+ yucca: msg`Hosted cloud backup storage`,
39
+ local: msg`A folder on this computer`,
40
+ s3: msg`An S3-compatible server`,
40
41
  };
41
42
 
42
43
  const title = $derived(
43
44
  repositoryBackend?.primary
44
- ? `${BackendNames[backend.type]} (primary)`
45
- : BackendNames[backend.type],
45
+ ? $t({
46
+ message: "{name} (primary)",
47
+ values: { name: $t(BackendNames[backend.type]) },
48
+ })
49
+ : $t(BackendNames[backend.type]),
46
50
  );
47
51
 
48
52
  const online = $derived(
@@ -50,7 +54,7 @@
50
54
  );
51
55
 
52
56
  const { LoginAgain, Reconfigure } = $derived(
53
- getBackendActions(repository, backend, repositoryBackend, () =>
57
+ getBackendActions(repository, backend, $t, repositoryBackend, () =>
54
58
  handleStartYuccaLogin(),
55
59
  ),
56
60
  );
@@ -61,16 +65,16 @@
61
65
  <Icon icon={BackendIcons[backend.type]} />
62
66
  {/snippet}
63
67
 
64
- {backend.description ?? BackendDescriptions[backend.type]}
68
+ {backend.description ?? $t(BackendDescriptions[backend.type])}
65
69
 
66
70
  {#snippet trailing()}
67
71
  <Badge color={online ? "success" : "danger"} size="small">
68
72
  {#if !backend.isOnline}
69
- Offline
73
+ {$t`Offline`}
70
74
  {:else if repositoryBackend}
71
- {repositoryBackend.online ? "Active" : "Missing on service"}
75
+ {repositoryBackend.online ? $t`Active` : $t`Missing on service`}
72
76
  {:else}
73
- Online
77
+ {$t`Online`}
74
78
  {/if}
75
79
  </Badge>
76
80
  {/snippet}
@@ -12,6 +12,7 @@
12
12
  import OnEvents from "../util/OnEvents.svelte";
13
13
  import Suspense from "../util/Suspense.svelte";
14
14
  import BackendItem from "./BackendItem.svelte";
15
+ import { t } from "svelte-i18n-lingui";
15
16
 
16
17
  type Props = {
17
18
  repository?: LocalRepositoryDto;
@@ -40,7 +41,7 @@
40
41
  <OnEvents {onBackendCreate} />
41
42
 
42
43
  {#snippet heading()}
43
- Where your backup is stored
44
+ {$t`Where your backup is stored`}
44
45
  {/snippet}
45
46
 
46
47
  <StackList title={repository ? heading : undefined}>
@@ -64,12 +65,12 @@
64
65
  <Button
65
66
  size="small"
66
67
  variant="outline"
67
- onclick={() => handleStartYuccaLogin()}>Login with FUTO Backups</Button
68
+ onclick={() => handleStartYuccaLogin()}>{$t`Login with FUTO Backups`}</Button
68
69
  >
69
70
  <Button
70
71
  size="small"
71
72
  variant="outline"
72
- onclick={() => handleSetupLocalStorage()}>New local storage</Button
73
+ onclick={() => handleSetupLocalStorage()}>{$t`New local storage`}</Button
73
74
  >
74
75
  </HStack>
75
76
  {/if}
@@ -2,6 +2,7 @@
2
2
  import PathPickerField from "../../ui/PathPickerField.svelte";
3
3
  import { useCreateLocalBackend } from "../../../services/backend.service";
4
4
  import { FormModal, Stack } from "@immich/ui";
5
+ import { t } from "svelte-i18n-lingui";
5
6
 
6
7
  type Props = {
7
8
  onClose: () => void;
@@ -28,7 +29,7 @@
28
29
 
29
30
  <FormModal
30
31
  size="small"
31
- title="Create local backend"
32
+ title={$t`Create local backend`}
32
33
  disabled={path.length === 0 || mutation.isPending}
33
34
  {onSubmit}
34
35
  {onClose}
@@ -36,11 +37,11 @@
36
37
  <Stack gap={4}>
37
38
  <PathPickerField
38
39
  bind:value={path}
39
- pickerTitle="Choose backend folder"
40
- pickerDescription="Pick the local directory where backups will be stored."
40
+ pickerTitle={$t`Choose backend folder`}
41
+ pickerDescription={$t`Pick the local directory where backups will be stored.`}
41
42
  >
42
- {#snippet title()}Path{/snippet}
43
- {#snippet description()}Local directory to store backups.{/snippet}
43
+ {#snippet title()}{$t`Path`}{/snippet}
44
+ {#snippet description()}{$t`Local directory to store backups.`}{/snippet}
44
45
  </PathPickerField>
45
46
  </Stack>
46
47
  </FormModal>
@@ -17,6 +17,7 @@
17
17
  } from "@immich/ui";
18
18
  import { onDestroy } from "svelte";
19
19
  import OnEvents from "../../util/OnEvents.svelte";
20
+ import { t } from "svelte-i18n-lingui";
20
21
 
21
22
  type Props = {
22
23
  onCreate?: (backendId: string) => void;
@@ -50,7 +51,7 @@
50
51
 
51
52
  <OnEvents {onBackendCreate} />
52
53
 
53
- <Modal title="Logging into FUTO Backups" icon={false} {onClose}>
54
+ <Modal title={$t`Logging into FUTO Backups`} icon={false} {onClose}>
54
55
  <ModalBody>
55
56
  {#if flow.state.userCode}
56
57
  <DeviceFlowCode {flow} />
@@ -63,7 +64,7 @@
63
64
  <ModalFooter>
64
65
  <HStack fullWidth>
65
66
  <Button shape="round" color="secondary" fullWidth onclick={onClose}>
66
- Cancel
67
+ {$t`Cancel`}
67
68
  </Button>
68
69
  <DeviceFlowAction {flow} />
69
70
  </HStack>
@@ -18,6 +18,7 @@
18
18
  } from "@immich/ui";
19
19
  import { mdiHarddisk, mdiShieldCheck } from "@mdi/js";
20
20
  import type { Snippet } from "svelte";
21
+ import { t } from "svelte-i18n-lingui";
21
22
 
22
23
  type Props = {
23
24
  title?: string;
@@ -63,25 +64,25 @@
63
64
  <StackList>
64
65
  <StackListOption
65
66
  {disabled}
66
- title="FUTO Backups"
67
+ title={$t`FUTO Backups`}
67
68
  onclick={onFutoBackups}
68
69
  >
69
70
  {#snippet icon()}
70
71
  <Icon icon={mdiShieldCheck} />
71
72
  {/snippet}
72
73
 
73
- Simple, hosted backups.
74
+ {$t`Simple, hosted backups.`}
74
75
  </StackListOption>
75
76
  <StackListOption
76
77
  {disabled}
77
- title="Local Storage"
78
+ title={$t`Local Storage`}
78
79
  onclick={onLocalBackups}
79
80
  >
80
81
  {#snippet icon()}
81
82
  <Icon icon={mdiHarddisk} />
82
83
  {/snippet}
83
84
 
84
- A folder on this computer.
85
+ {$t`A folder on this computer.`}
85
86
  </StackListOption>
86
87
 
87
88
  <Suspense query={backends}>
@@ -90,7 +91,7 @@
90
91
  {#if backend.type === "local"}
91
92
  <StackListOption
92
93
  {disabled}
93
- title="Existing Local Storage"
94
+ title={$t`Existing Local Storage`}
94
95
  onclick={() => {
95
96
  onSelect(backend.id);
96
97
  }}
@@ -110,7 +111,7 @@
110
111
  </ModalBody>
111
112
  <ModalFooter>
112
113
  <HStack>
113
- <Button variant="ghost" {disabled} onclick={onCancel}>Cancel</Button>
114
+ <Button variant="ghost" {disabled} onclick={onCancel}>{$t`Cancel`}</Button>
114
115
  </HStack>
115
116
  </ModalFooter>
116
117
  </Modal>
@@ -7,6 +7,7 @@
7
7
  import { mdiArchiveOutline } from "@mdi/js";
8
8
  import StackListItem from "../ui/StackListItem.svelte";
9
9
  import RelativeTime from "../util/RelativeTime.svelte";
10
+ import { t, msg } from "svelte-i18n-lingui";
10
11
 
11
12
  type Props = {
12
13
  repository: LocalRepositoryDto;
@@ -17,9 +18,9 @@
17
18
  const local = getProvider().api === "orchestrator";
18
19
 
19
20
  const BackendNames = {
20
- yucca: "FUTO Backups",
21
- local: "Local Storage",
22
- s3: "S3 Server",
21
+ yucca: msg`FUTO Backups`,
22
+ local: msg`Local Storage`,
23
+ s3: msg`S3 Server`,
23
24
  };
24
25
 
25
26
  const outcome = $derived(getBackupOutcome(repository.metrics));
@@ -32,7 +33,7 @@
32
33
  Import,
33
34
  MetricsHistory,
34
35
  Delete,
35
- } = $derived(getRepositoryActions(repository, local));
36
+ } = $derived(getRepositoryActions(repository, $t, local));
36
37
  </script>
37
38
 
38
39
  <StackListItem
@@ -53,38 +54,38 @@
53
54
  {/snippet}
54
55
 
55
56
  {#if repository.backends}
56
- {BackendNames[repository.backends.primary.type]} &middot;
57
+ {$t(BackendNames[repository.backends.primary.type])} &middot;
57
58
  {/if}
58
59
 
59
60
  {#if repository.meter}
60
61
  <FormatBytes bytes={repository.meter.sizeBytes} />
61
62
  {:else}
62
- Estimated <FormatBytes bytes={repository.metrics.sizeBytes} />
63
+ {$t`Estimated`} <FormatBytes bytes={repository.metrics.sizeBytes} />
63
64
  {/if}
64
65
 
65
66
  {#if repository.worm}
66
- &middot; write-only
67
+ &middot; {$t`write-only`}
67
68
  {/if}
68
69
 
69
70
  {#snippet trailing()}
70
71
  {#if repository.backends && !repository.backends.primary.online}
71
- <Badge size="tiny" color="danger">Offline</Badge>
72
+ <Badge size="tiny" color="danger">{$t`Offline`}</Badge>
72
73
  {/if}
73
74
 
74
75
  {#if outcome === "failed"}
75
76
  <Badge size="tiny" color="danger">
76
- Failed <RelativeTime time={repository.metrics.lastBackup!} />
77
+ {$t`Failed`} <RelativeTime time={repository.metrics.lastBackup!} />
77
78
  </Badge>
78
79
  {:else if outcome === "warn"}
79
80
  <Badge size="tiny" color="warning">
80
- Warnings <RelativeTime time={repository.metrics.lastBackup!} />
81
+ {$t`Warnings`} <RelativeTime time={repository.metrics.lastBackup!} />
81
82
  </Badge>
82
83
  {:else if outcome === "complete"}
83
84
  <Badge size="tiny" color="success">
84
- Successful <RelativeTime time={repository.metrics.lastBackup!} />
85
+ {$t`Successful`} <RelativeTime time={repository.metrics.lastBackup!} />
85
86
  </Badge>
86
87
  {:else}
87
- <Badge size="tiny" color="warning">Never backed up</Badge>
88
+ <Badge size="tiny" color="warning">{$t`Never backed up`}</Badge>
88
89
  {/if}
89
90
  {/snippet}
90
91
  </StackListItem>
@@ -23,6 +23,7 @@
23
23
  Text,
24
24
  } from "@immich/ui";
25
25
  import type { Snippet } from "svelte";
26
+ import { msg, plural, t } from "svelte-i18n-lingui";
26
27
 
27
28
  type Props = {
28
29
  title: string;
@@ -53,77 +54,77 @@
53
54
  }: Props = $props();
54
55
 
55
56
  const phases: Record<BackupStatusType, [string, string, string]> = {
56
- backup: ["Preparing backup", "Backing up", "Finalizing backup"],
57
- restore: ["Preparing restore", "Restoring", "Finalizing restore"],
58
- forget: ["Preparing prune", "Pruning", "Finalizing prune"],
57
+ backup: [msg`Preparing backup`, msg`Backing up`, msg`Finalizing backup`],
58
+ restore: [msg`Preparing restore`, msg`Restoring`, msg`Finalizing restore`],
59
+ forget: [msg`Preparing prune`, msg`Pruning`, msg`Finalizing prune`],
59
60
  };
60
61
 
61
62
  const succeeded: Record<BackupStatusType, string> = {
62
- backup: "Your library was backed up successfully",
63
- restore: "Your library was restored successfully",
64
- forget: "Old backups were pruned successfully",
63
+ backup: msg`Your library was backed up successfully`,
64
+ restore: msg`Your library was restored successfully`,
65
+ forget: msg`Old backups were pruned successfully`,
65
66
  };
66
67
 
67
68
  const warned: Record<BackupStatusType, string> = {
68
- backup: "Your library was backed up, with warnings",
69
- restore: "Your library was restored, with warnings",
70
- forget: "Old backups were pruned, with warnings",
69
+ backup: msg`Your library was backed up, with warnings`,
70
+ restore: msg`Your library was restored, with warnings`,
71
+ forget: msg`Old backups were pruned, with warnings`,
71
72
  };
72
73
 
73
74
  const failed: Record<BackupStatusType, string> = {
74
- backup: "Your library could not be backed up",
75
- restore: "Your library could not be restored",
76
- forget: "Old backups could not be pruned",
75
+ backup: msg`Your library could not be backed up`,
76
+ restore: msg`Your library could not be restored`,
77
+ forget: msg`Old backups could not be pruned`,
77
78
  };
78
79
 
79
80
  const cancelled: Record<BackupStatusType, string> = {
80
- backup: "Your backup was cancelled",
81
- restore: "Your restore was cancelled",
82
- forget: "Pruning old backups was cancelled",
81
+ backup: msg`Your backup was cancelled`,
82
+ restore: msg`Your restore was cancelled`,
83
+ forget: msg`Pruning old backups was cancelled`,
83
84
  };
84
85
 
85
86
  const reassurance: Record<BackupStatusType, string> = {
86
- backup: "No changes were made to your existing backups.",
87
- restore: "Your backups are untouched — nothing was lost.",
88
- forget: "No backups were removed.",
87
+ backup: msg`No changes were made to your existing backups.`,
88
+ restore: msg`Your backups are untouched — nothing was lost.`,
89
+ forget: msg`No backups were removed.`,
89
90
  };
90
91
 
91
92
  const running: Record<BackupStatusType, string> = {
92
- backup:
93
- "You can close this window and the backup will continue in the background.",
94
- restore:
95
- "You can close this window and the restore will continue in the background.",
96
- forget:
97
- "You can close this window and the prune will continue in the background.",
93
+ backup: msg`You can close this window and the backup will continue in the background.`,
94
+ restore: msg`You can close this window and the restore will continue in the background.`,
95
+ forget: msg`You can close this window and the prune will continue in the background.`,
98
96
  };
99
97
 
100
98
  const phase = $derived(
101
99
  progress <= 0
102
- ? phases[type][0]
100
+ ? $t(phases[type][0])
103
101
  : progress >= 0.95
104
- ? phases[type][2]
105
- : phases[type][1],
102
+ ? $t(phases[type][2])
103
+ : $t(phases[type][1]),
106
104
  );
107
105
 
108
106
  const headline = $derived.by(() => {
109
107
  switch (backupState) {
110
108
  case "connecting": {
111
- return "Connecting…";
109
+ return $t`Connecting…`;
112
110
  }
113
111
  case "failed": {
114
- return failed[type];
112
+ return $t(failed[type]);
115
113
  }
116
114
  case "cancelled": {
117
- return cancelled[type];
115
+ return $t(cancelled[type]);
118
116
  }
119
117
  case "complete": {
120
- return succeeded[type];
118
+ return $t(succeeded[type]);
121
119
  }
122
120
  case "warned": {
123
- return warned[type];
121
+ return $t(warned[type]);
124
122
  }
125
123
  default: {
126
- return `${phase} · ${Math.round(progress * 100)}%`;
124
+ return $t({
125
+ message: "{phase} · {percent}%",
126
+ values: { phase, percent: Math.round(progress * 100) },
127
+ });
127
128
  }
128
129
  }
129
130
  });
@@ -154,17 +155,21 @@
154
155
  <Heading size="small">{headline}</Heading>
155
156
 
156
157
  {#if backupState === "running" && start}
157
- <Text color="muted">Started <RelativeTime time={start} /></Text>
158
+ <Text color="muted">{$t`Started`} <RelativeTime time={start} /></Text>
158
159
  {:else if backupState === "failed"}
159
- <Text color="muted">{reassurance[type]}</Text>
160
+ <Text color="muted">{$t(reassurance[type])}</Text>
160
161
  {:else if duration}
161
- <Text color="muted">Completed in {duration}</Text>
162
+ <Text color="muted">
163
+ {$t({ message: "Completed in {duration}", values: { duration } })}
164
+ </Text>
162
165
  {/if}
163
166
 
164
167
  {#if backupState === "warned" && errors.length > 0}
165
168
  <Text color="warning">
166
- Completed with {errors.length}
167
- {errors.length === 1 ? "warning" : "warnings"}.
169
+ {$plural(errors.length, {
170
+ one: "Completed with # warning.",
171
+ other: "Completed with # warnings.",
172
+ })}
168
173
  </Text>
169
174
  {/if}
170
175
  </Stack>
@@ -183,7 +188,7 @@
183
188
  <Stack gap={4}>
184
189
  {#if backupState === "failed" && onRetry}
185
190
  <HStack gap={4} class="items-center">
186
- <Button shape="round" onclick={onRetry}>Try again</Button>
191
+ <Button shape="round" onclick={onRetry}>{$t`Try again`}</Button>
187
192
  </HStack>
188
193
  {/if}
189
194
 
@@ -202,7 +207,7 @@
202
207
  {/if}
203
208
 
204
209
  {#if backupState === "running"}
205
- <Text color="muted">{running[type]}</Text>
210
+ <Text color="muted">{$t(running[type])}</Text>
206
211
  {:else if (backupState === "complete" || backupState === "warned") && details}
207
212
  <Text color="muted">{@render details()}</Text>
208
213
  {/if}
@@ -12,6 +12,7 @@
12
12
  import Suspense from "../util/Suspense.svelte";
13
13
  import BackupItem from "./BackupItem.svelte";
14
14
  import CreateRepositoryModal from "./dialogs/CreateRepositoryModal.svelte";
15
+ import { t } from "svelte-i18n-lingui";
15
16
 
16
17
  type Props = {
17
18
  initialData?: RepositoryListResponseDto;
@@ -44,7 +45,7 @@
44
45
  {#if local}
45
46
  <Stack gap={2}>
46
47
  <StackList>
47
- {#snippet title()}Backups on this machine{/snippet}
48
+ {#snippet title()}{$t`Backups on this machine`}{/snippet}
48
49
 
49
50
  <Suspense {query}>
50
51
  {#each localRepositories as repository (repository.id)}
@@ -53,7 +54,7 @@
53
54
 
54
55
  {#if localRepositories.length === 0}
55
56
  <StackListPlaceholder>
56
- No backups on this machine yet.
57
+ {$t`No backups on this machine yet.`}
57
58
  </StackListPlaceholder>
58
59
  {/if}
59
60
  </Suspense>
@@ -64,7 +65,7 @@
64
65
  shape="round"
65
66
  size="tiny"
66
67
  variant="outline"
67
- onclick={createNewBackup}>Create new backup</Button
68
+ onclick={createNewBackup}>{$t`Create new backup`}</Button
68
69
  >
69
70
  </HStack>
70
71
  </Stack>
@@ -72,7 +73,7 @@
72
73
 
73
74
  <StackList>
74
75
  {#snippet title()}
75
- {local ? "Backups found elsewhere" : "Your Backups"}
76
+ {local ? $t`Backups found elsewhere` : $t`Your Backups`}
76
77
  {/snippet}
77
78
 
78
79
  <Suspense {query}>
@@ -82,7 +83,7 @@
82
83
 
83
84
  {#if remoteRepositories.length === 0}
84
85
  <StackListPlaceholder>
85
- {local ? "No other backups found." : "No backups yet."}
86
+ {local ? $t`No other backups found.` : $t`No backups yet.`}
86
87
  </StackListPlaceholder>
87
88
  {/if}
88
89
  </Suspense>
@@ -13,6 +13,7 @@
13
13
  Stack,
14
14
  } from "@immich/ui";
15
15
  import { SvelteSet } from "svelte/reactivity";
16
+ import { t } from "svelte-i18n-lingui";
16
17
 
17
18
  type Props = {
18
19
  repository: LocalRepositoryDto;
@@ -42,14 +43,14 @@
42
43
  <FormModal
43
44
  disabled={name.length === 0 ||
44
45
  updateMutation.isPending}
45
- title={`Configure ${name}`}
46
+ title={$t({ message: "Configure {name}", values: { name } })}
46
47
  size="large"
47
48
  {onSubmit}
48
49
  {onClose}
49
50
  >
50
51
  <Stack gap={4}>
51
52
  <Stack gap={2}>
52
- <Field label="Name">
53
+ <Field label={$t`Name`}>
53
54
  <Input bind:value={name} />
54
55
  </Field>
55
56
  </Stack>
@@ -57,13 +58,13 @@
57
58
  {#if repository.configuration}
58
59
  <PathListField
59
60
  {paths}
60
- addLabel="Add path"
61
- manageLabel="Add first path"
62
- pickerTitle="Backup Paths"
63
- pickerDescription="Select files and folders to include in this backup."
61
+ addLabel={$t`Add path`}
62
+ manageLabel={$t`Add first path`}
63
+ pickerTitle={$t`Backup Paths`}
64
+ pickerDescription={$t`Select files and folders to include in this backup.`}
64
65
  >
65
- {#snippet label()}Backup Paths{/snippet}
66
- {#snippet empty()}No paths configured yet.{/snippet}
66
+ {#snippet label()}{$t`Backup Paths`}{/snippet}
67
+ {#snippet empty()}{$t`No paths configured yet.`}{/snippet}
67
68
  </PathListField>
68
69
  {/if}
69
70
 
@@ -9,6 +9,7 @@
9
9
  Stack,
10
10
  } from "@immich/ui";
11
11
  import ConfigureRepositoryModal from "./ConfigureRepositoryModal.svelte";
12
+ import { t } from "svelte-i18n-lingui";
12
13
 
13
14
  type Props = {
14
15
  onClose: () => void;
@@ -40,18 +41,21 @@
40
41
  </script>
41
42
 
42
43
  <FormModal
43
- title="Create A New Backup"
44
+ title={$t`Create A New Backup`}
44
45
  disabled={name.length === 0 || mutation.isPending}
45
46
  {onSubmit}
46
47
  {onClose}
47
48
  >
48
49
  <Stack gap={4}>
49
- <Field label="Name" description="A memorable name for this backup">
50
+ <Field
51
+ label={$t`Name`}
52
+ description={$t`A memorable name for this backup`}
53
+ >
50
54
  <Input bind:value={name} />
51
55
  </Field>
52
56
  <Field
53
- label="Write once (WORM)"
54
- description="Prevent anything being deleted"
57
+ label={$t`Write once (WORM)`}
58
+ description={$t`Prevent anything being deleted`}
55
59
  >
56
60
  <Checkbox bind:checked={worm} />
57
61
  </Field>
@@ -7,6 +7,7 @@
7
7
  } from "../../../services/repository.service";
8
8
  import { FormModal, modalManager, Text } from "@immich/ui";
9
9
  import ConfigureRepositoryModal from "./ConfigureRepositoryModal.svelte";
10
+ import { t } from "svelte-i18n-lingui";
10
11
 
11
12
  type Props = {
12
13
  onClose: () => void;
@@ -42,17 +43,17 @@
42
43
  </script>
43
44
 
44
45
  <FormModal
45
- title={`Import ${repository.name}`}
46
- submitText="Import"
46
+ title={$t({ message: "Import {name}", values: { name: repository.name } })}
47
+ submitText={$t`Import`}
47
48
  disabled={check.data?.readable !== true || mutation.isPending}
48
49
  {onSubmit}
49
50
  {onClose}
50
51
  >
51
52
  <Suspense query={check}>
52
53
  {#if check.data?.readable}
53
- <Text>Repository is readable and accessible!</Text>
54
+ <Text>{$t`Repository is readable and accessible!`}</Text>
54
55
  {:else}
55
- <Text>Can't read repository.</Text>
56
+ <Text>{$t`Can't read repository.`}</Text>
56
57
  {/if}
57
58
  </Suspense>
58
59
  </FormModal>
@@ -3,6 +3,7 @@
3
3
  import type { LocalRepositoryDto } from "../../../fetch-client";
4
4
  import { useReconfigureRepositoryPrimaryBackend } from "../../../services/repository.service";
5
5
  import { Text } from "@immich/ui";
6
+ import { t } from "svelte-i18n-lingui";
6
7
 
7
8
  type Props = {
8
9
  repository: LocalRepositoryDto;
@@ -22,7 +23,7 @@
22
23
  </script>
23
24
 
24
25
  <SelectBackendModal
25
- title="Select new service"
26
+ title={$t`Select new service`}
26
27
  disabled={reconfigure.isPending}
27
28
  onSelect={onSelectBackend}
28
29
  onCancel={onClose}
@@ -33,8 +34,7 @@
33
34
  {/if}
34
35
 
35
36
  <Text
36
- >You may reset and reconfigure your backups by selecting one of the
37
- following.</Text
37
+ >{$t`You may reset and reconfigure your backups by selecting one of the following.`}</Text
38
38
  >
39
39
  {/snippet}
40
40
  </SelectBackendModal>