From 1205ec12fa94ad1bf2fc6ce3941f895ca2ad4fde Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 7 Nov 2022 04:58:49 -0800 Subject: [PATCH] Fix editor translate namespace --- src/components/ImageEditor.vue | 8 +- src/components/ImageEditorTranslations.ts | 186 +++++++++++----------- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/components/ImageEditor.vue b/src/components/ImageEditor.vue index 83a02424..01bdedc9 100644 --- a/src/components/ImageEditor.vue +++ b/src/components/ImageEditor.vue @@ -179,7 +179,7 @@ export default class ImageEditor extends Mixins(GlobalMixin) { ); const response = await axios.put(putUrl, new File([blob], fullName)); - showSuccess(this.t("viewer", "Image saved successfully")); + showSuccess(this.t("memories", "Image saved successfully")); if (putUrl !== this.src) { emit("files:file:created", { fileid: @@ -190,7 +190,7 @@ export default class ImageEditor extends Mixins(GlobalMixin) { } this.onClose(undefined, false); } catch (error) { - showError(this.t("viewer", "Error saving image")); + showError(this.t("memories", "Error saving image")); } } @@ -202,10 +202,10 @@ export default class ImageEditor extends Mixins(GlobalMixin) { translations.changesLoseConfirmation + "\n\n" + translations.changesLoseConfirmationHint, - this.t("viewer", "Unsaved changes"), + this.t("memories", "Unsaved changes"), { type: (OC.dialogs).YES_NO_BUTTONS, - confirm: this.t("viewer", "Drop changes"), + confirm: this.t("memories", "Drop changes"), confirmClasses: "error", cancel: translations.cancel, }, diff --git a/src/components/ImageEditorTranslations.ts b/src/components/ImageEditorTranslations.ts index 4a97772a..780642e5 100644 --- a/src/components/ImageEditorTranslations.ts +++ b/src/components/ImageEditorTranslations.ts @@ -8,104 +8,104 @@ import { translate as t } from "@nextcloud/l10n"; * @see https://raw.githubusercontent.com/scaleflex/filerobot-image-editor/v4/packages/react-filerobot-image-editor/src/context/defaultTranslations.js */ export default { - name: t("viewer", "Name"), - save: t("viewer", "Save"), - saveAs: t("viewer", "Save as"), - back: t("viewer", "Back"), - loading: t("viewer", "Loading …"), + name: t("memories", "Name"), + save: t("memories", "Save"), + saveAs: t("memories", "Save as"), + back: t("memories", "Back"), + loading: t("memories", "Loading …"), // resetOperations: 'Reset/delete all operations', - resetOperations: t("viewer", "Reset"), - changesLoseConfirmation: t("viewer", "All changes will be lost."), + resetOperations: t("memories", "Reset"), + changesLoseConfirmation: t("memories", "All changes will be lost."), changesLoseConfirmationHint: t( - "viewer", + "memories", "Are you sure you want to continue?" ), - cancel: t("viewer", "Cancel"), - continue: t("viewer", "Continue"), - undoTitle: t("viewer", "Undo"), - redoTitle: t("viewer", "Redo"), - showImageTitle: t("viewer", "Show original image"), - zoomInTitle: t("viewer", "Zoom in"), - zoomOutTitle: t("viewer", "Zoom out"), - toggleZoomMenuTitle: t("viewer", "Toggle zoom menu"), - adjustTab: t("viewer", "Adjust"), - finetuneTab: t("viewer", "Fine-tune"), - filtersTab: t("viewer", "Filters"), - watermarkTab: t("viewer", "Watermark"), - annotateTab: t("viewer", "Draw"), - resize: t("viewer", "Resize"), - resizeTab: t("viewer", "Resize"), - invalidImageError: t("viewer", "Invalid image."), - uploadImageError: t("viewer", "Error while uploading the image."), - areNotImages: t("viewer", "are not images"), - isNotImage: t("viewer", "is not an image"), - toBeUploaded: t("viewer", "to be uploaded"), - cropTool: t("viewer", "Crop"), - original: t("viewer", "Original"), - custom: t("viewer", "Custom"), - square: t("viewer", "Square"), - landscape: t("viewer", "Landscape"), - portrait: t("viewer", "Portrait"), - ellipse: t("viewer", "Ellipse"), - classicTv: t("viewer", "Classic TV"), - cinemascope: t("viewer", "CinemaScope"), - arrowTool: t("viewer", "Arrow"), - blurTool: t("viewer", "Blur"), - brightnessTool: t("viewer", "Brightness"), - contrastTool: t("viewer", "Contrast"), - ellipseTool: t("viewer", "Ellipse"), - unFlipX: t("viewer", "Un-flip X"), - flipX: t("viewer", "Flip X"), - unFlipY: t("viewer", "Un-flip Y"), - flipY: t("viewer", "Flip Y"), - hsvTool: t("viewer", "HSV"), - hue: t("viewer", "Hue"), - saturation: t("viewer", "Saturation"), - value: t("viewer", "Value"), - imageTool: t("viewer", "Image"), - importing: t("viewer", "Importing …"), - addImage: t("viewer", "+ Add image"), - lineTool: t("viewer", "Line"), - penTool: t("viewer", "Pen"), - polygonTool: t("viewer", "Polygon"), - sides: t("viewer", "Sides"), - rectangleTool: t("viewer", "Rectangle"), - cornerRadius: t("viewer", "Corner Radius"), - resizeWidthTitle: t("viewer", "Width in pixels"), - resizeHeightTitle: t("viewer", "Height in pixels"), - toggleRatioLockTitle: t("viewer", "Toggle ratio lock"), - reset: t("viewer", "Reset"), - resetSize: t("viewer", "Reset to original image size"), - rotateTool: t("viewer", "Rotate"), - textTool: t("viewer", "Text"), - textSpacings: t("viewer", "Text spacing"), - textAlignment: t("viewer", "Text alignment"), - fontFamily: t("viewer", "Font family"), - size: t("viewer", "Size"), - letterSpacing: t("viewer", "Letter spacing"), - lineHeight: t("viewer", "Line height"), - warmthTool: t("viewer", "Warmth"), - addWatermark: t("viewer", "+ Add watermark"), - addWatermarkTitle: t("viewer", "Choose watermark type"), - uploadWatermark: t("viewer", "Upload watermark"), - addWatermarkAsText: t("viewer", "Add as text"), - padding: t("viewer", "Padding"), - shadow: t("viewer", "Shadow"), - horizontal: t("viewer", "Horizontal"), - vertical: t("viewer", "Vertical"), - blur: t("viewer", "Blur"), - opacity: t("viewer", "Opacity"), - position: t("viewer", "Position"), - stroke: t("viewer", "Stroke"), - saveAsModalLabel: t("viewer", "Save image as"), - extension: t("viewer", "Extension"), - nameIsRequired: t("viewer", "Name is required."), - quality: t("viewer", "Quality"), - imageDimensionsHoverTitle: t("viewer", "Saved image size (width x height)"), + cancel: t("memories", "Cancel"), + continue: t("memories", "Continue"), + undoTitle: t("memories", "Undo"), + redoTitle: t("memories", "Redo"), + showImageTitle: t("memories", "Show original image"), + zoomInTitle: t("memories", "Zoom in"), + zoomOutTitle: t("memories", "Zoom out"), + toggleZoomMenuTitle: t("memories", "Toggle zoom menu"), + adjustTab: t("memories", "Adjust"), + finetuneTab: t("memories", "Fine-tune"), + filtersTab: t("memories", "Filters"), + watermarkTab: t("memories", "Watermark"), + annotateTab: t("memories", "Draw"), + resize: t("memories", "Resize"), + resizeTab: t("memories", "Resize"), + invalidImageError: t("memories", "Invalid image."), + uploadImageError: t("memories", "Error while uploading the image."), + areNotImages: t("memories", "are not images"), + isNotImage: t("memories", "is not an image"), + toBeUploaded: t("memories", "to be uploaded"), + cropTool: t("memories", "Crop"), + original: t("memories", "Original"), + custom: t("memories", "Custom"), + square: t("memories", "Square"), + landscape: t("memories", "Landscape"), + portrait: t("memories", "Portrait"), + ellipse: t("memories", "Ellipse"), + classicTv: t("memories", "Classic TV"), + cinemascope: t("memories", "CinemaScope"), + arrowTool: t("memories", "Arrow"), + blurTool: t("memories", "Blur"), + brightnessTool: t("memories", "Brightness"), + contrastTool: t("memories", "Contrast"), + ellipseTool: t("memories", "Ellipse"), + unFlipX: t("memories", "Un-flip X"), + flipX: t("memories", "Flip X"), + unFlipY: t("memories", "Un-flip Y"), + flipY: t("memories", "Flip Y"), + hsvTool: t("memories", "HSV"), + hue: t("memories", "Hue"), + saturation: t("memories", "Saturation"), + value: t("memories", "Value"), + imageTool: t("memories", "Image"), + importing: t("memories", "Importing …"), + addImage: t("memories", "+ Add image"), + lineTool: t("memories", "Line"), + penTool: t("memories", "Pen"), + polygonTool: t("memories", "Polygon"), + sides: t("memories", "Sides"), + rectangleTool: t("memories", "Rectangle"), + cornerRadius: t("memories", "Corner Radius"), + resizeWidthTitle: t("memories", "Width in pixels"), + resizeHeightTitle: t("memories", "Height in pixels"), + toggleRatioLockTitle: t("memories", "Toggle ratio lock"), + reset: t("memories", "Reset"), + resetSize: t("memories", "Reset to original image size"), + rotateTool: t("memories", "Rotate"), + textTool: t("memories", "Text"), + textSpacings: t("memories", "Text spacing"), + textAlignment: t("memories", "Text alignment"), + fontFamily: t("memories", "Font family"), + size: t("memories", "Size"), + letterSpacing: t("memories", "Letter spacing"), + lineHeight: t("memories", "Line height"), + warmthTool: t("memories", "Warmth"), + addWatermark: t("memories", "+ Add watermark"), + addWatermarkTitle: t("memories", "Choose watermark type"), + uploadWatermark: t("memories", "Upload watermark"), + addWatermarkAsText: t("memories", "Add as text"), + padding: t("memories", "Padding"), + shadow: t("memories", "Shadow"), + horizontal: t("memories", "Horizontal"), + vertical: t("memories", "Vertical"), + blur: t("memories", "Blur"), + opacity: t("memories", "Opacity"), + position: t("memories", "Position"), + stroke: t("memories", "Stroke"), + saveAsModalLabel: t("memories", "Save image as"), + extension: t("memories", "Extension"), + nameIsRequired: t("memories", "Name is required."), + quality: t("memories", "Quality"), + imageDimensionsHoverTitle: t("memories", "Saved image size (width x height)"), cropSizeLowerThanResizedWarning: t( - "viewer", + "memories", "Note that the selected crop area is lower than the applied resize which might cause quality decrease" ), - actualSize: t("viewer", "Actual size (100%)"), - fitSize: t("viewer", "Fit size"), + actualSize: t("memories", "Actual size (100%)"), + fitSize: t("memories", "Fit size"), };