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

This commit is contained in:
Michel Heusschen
2026-02-06 13:08:24 +01:00
committed by GitHub
parent ff9052f7f5
commit 211dc3c056
2 changed files with 14 additions and 5 deletions

View File

@@ -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",

View File

@@ -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;