mirror of
https://github.com/immich-app/immich.git
synced 2026-02-13 12:27:56 +03:00
fix: add missing translations for image editor (#25957)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user