Skip to content

High performance self-hosted photo and video management solution.

fix: add missing translations for image editor (#25957)

Michel Heusschen211dc3c056b4
diff --git a/i18n/en.json b/i18n/en.json
index 2d3d3680f8..dedbea1bfe 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -997,6 +997,11 @@
"editor_close_without_save_prompt": "The changes will not be saved",
"editor_close_without_save_title": "Close editor?",
"editor_confirm_reset_all_changes": "Are you sure you want to reset all changes?",
+ "editor_discard_edits_confirm": "Discard edits",
+ "editor_discard_edits_prompt": "You have unsaved edits. Are you sure you want to discard them?",
+ "editor_discard_edits_title": "Discard edits?",
+ "editor_edits_applied_error": "Failed to apply edits",
+ "editor_edits_applied_success": "Edits applied successfully",
"editor_flip_horizontal": "Flip horizontal",
"editor_flip_vertical": "Flip vertical",
"editor_orientation": "Orientation",
diff --git a/web/src/lib/managers/edit/edit-manager.svelte.ts b/web/src/lib/managers/edit/edit-manager.svelte.ts
index be74c6ead8..e9c7b78f13 100644
--- a/web/src/lib/managers/edit/edit-manager.svelte.ts
+++ b/web/src/lib/managers/edit/edit-manager.svelte.ts
@@ -2,6 +2,7 @@ import TransformTool from '$lib/components/asset-viewer/editor/transform-tool/tr
import { transformManager } from '$lib/managers/edit/transform-manager.svelte';
import { eventManager } from '$lib/managers/event-manager.svelte';
import { waitForWebsocketEvent } from '$lib/stores/websocket';
+import { getFormatter } from '$lib/utils/i18n';
import { editAsset, removeAssetEdits, type AssetEditsDto, type AssetResponseDto } from '@immich/sdk';
import { ConfirmModal, modalManager, toastManager } from '@immich/ui';
import { mdiCropRotate } from '@mdi/js';
@@ -63,10 +64,12 @@ export class EditManager {
this.isShowingConfirmDialog = true;
+ const t = await getFormatter();
+
const confirmed = await modalManager.show(ConfirmModal, {
- title: 'Discard Edits?',
- prompt: 'You have unsaved edits. Are you sure you want to discard them?',
- confirmText: 'Discard Edits',
+ title: t('editor_discard_edits_title'),
+ prompt: t('editor_discard_edits_prompt'),
+ confirmText: t('editor_discard_edits_confirm'),
});
this.isShowingConfirmDialog = false;
@@ -120,6 +123,7 @@ export class EditManager {
}
const assetId = this.currentAsset.id;
+ const t = await getFormatter();
try {
// Setup the websocket listener before sending the edit request
@@ -138,12 +142,12 @@ export class EditManager {
eventManager.emit('AssetEditsApplied', assetId);
- toastManager.success('Edits applied successfully');
+ toastManager.success(t('editor_edits_applied_success'));
this.hasAppliedEdits = true;
return true;
} catch {
- toastManager.danger('Failed to apply edits');
+ toastManager.danger(t('editor_edits_applied_error'));
return false;
} finally {
this.isApplyingEdits = false;