From ebe8751c381efa24e0c2fb0ee8bab704c65d087a Mon Sep 17 00:00:00 2001 From: abhishek-gaonkar Date: Sat, 5 Oct 2024 16:29:45 +0530 Subject: [PATCH] fix: useEffect re-render param; right-pane add ctrl+v info --- renderer/components/main-content/index.tsx | 2 +- renderer/components/main-content/instructions-card.tsx | 2 ++ renderer/locales/en.json | 3 ++- renderer/locales/es.json | 3 ++- renderer/locales/fr.json | 3 ++- renderer/locales/ja.json | 3 ++- renderer/locales/ru.json | 3 ++- renderer/locales/zh.json | 3 ++- 8 files changed, 15 insertions(+), 7 deletions(-) diff --git a/renderer/components/main-content/index.tsx b/renderer/components/main-content/index.tsx index e3fcdfa..42c4720 100644 --- a/renderer/components/main-content/index.tsx +++ b/renderer/components/main-content/index.tsx @@ -260,7 +260,7 @@ const MainContent = ({ return () => { window.removeEventListener("paste", handlePasteEvent); }; - }, []); + }, [t]); return (
{t("APP.RIGHT_PANE_INFO.SELECT_IMAGES_DESCRIPTION")} +
+ {t("APP.RIGHT_PANE_INFO.PASTE_IMAGE_DESCRIPTION")}

)}

Upscayl v{version}

diff --git a/renderer/locales/en.json b/renderer/locales/en.json index 0694083..02e6bd0 100644 --- a/renderer/locales/en.json +++ b/renderer/locales/en.json @@ -147,7 +147,8 @@ "SELECT_FOLDER": "Select a Folder to Upscayl", "SELECT_IMAGE": "Select an Image to Upscayl", "SELECT_FOLDER_DESCRIPTION": "Make sure that the folder doesn't contain anything except PNG, JPG, JPEG & WEBP images.", - "SELECT_IMAGES_DESCRIPTION": "Select or drag and drop a PNG, JPG, JPEG or WEBP image." + "SELECT_IMAGES_DESCRIPTION": "Select or drag and drop a PNG, JPG, JPEG or WEBP image.", + "PASTE_IMAGE_DESCRIPTION": "Hit Ctrl + V or Cmd + V to Paste image from Clipboard" }, "PROGRESS": { "PROCESSING_TITLE": "Processing the image...", diff --git a/renderer/locales/es.json b/renderer/locales/es.json index 080701a..ae20c8c 100644 --- a/renderer/locales/es.json +++ b/renderer/locales/es.json @@ -147,7 +147,8 @@ "SELECT_FOLDER": "Selecciona una carpeta para aumentar", "SELECT_IMAGE": "Selecciona una imagen para aumentar", "SELECT_FOLDER_DESCRIPTION": "Asegúrate de que la carpeta no contenga nada excepto imágenes PNG, JPG, JPEG y WEBP.", - "SELECT_IMAGES_DESCRIPTION": "Selecciona o arrastra y suelta una imagen PNG, JPG, JPEG o WEBP." + "SELECT_IMAGES_DESCRIPTION": "Selecciona o arrastra y suelta una imagen PNG, JPG, JPEG o WEBP.", + "PASTE_IMAGE_DESCRIPTION": "Presiona Ctrl + V o Cmd + V para pegar la imagen desde el portapapeles" }, "PROGRESS": { "PROCESSING_TITLE": "Procesando la imagen...", diff --git a/renderer/locales/fr.json b/renderer/locales/fr.json index 37d8d0f..d1f75d1 100644 --- a/renderer/locales/fr.json +++ b/renderer/locales/fr.json @@ -147,7 +147,8 @@ "SELECT_FOLDER": "Sélectionnez un dossier à suréchantillonner", "SELECT_IMAGE": "Sélectionnez une image à suréchantillonner", "SELECT_FOLDER_DESCRIPTION": "Assurez-vous que le dossier ne contient rien d'autre que des images PNG, JPG, JPEG et WEBP.", - "SELECT_IMAGES_DESCRIPTION": "Sélectionnez ou glissez-déposez une image PNG, JPG, JPEG ou WEBP." + "SELECT_IMAGES_DESCRIPTION": "Sélectionnez ou glissez-déposez une image PNG, JPG, JPEG ou WEBP.", + "PASTE_IMAGE_DESCRIPTION": "Appuyez sur Ctrl + V ou Cmd + V pour coller l'image depuis le presse-papiers" }, "PROGRESS": { "PROCESSING_TITLE": "Traitement de l'image...", diff --git a/renderer/locales/ja.json b/renderer/locales/ja.json index 0fdea19..f60bb87 100644 --- a/renderer/locales/ja.json +++ b/renderer/locales/ja.json @@ -147,7 +147,8 @@ "SELECT_FOLDER": "Upscaylするフォルダを選択", "SELECT_IMAGE": "Upscaylする画像を選択", "SELECT_FOLDER_DESCRIPTION": "フォルダにはPNG、JPG、JPEG、WEBPの画像以外のものが含まれていないことを確認してください。", - "SELECT_IMAGES_DESCRIPTION": "PNG、JPG、JPEG、またはWEBP画像を選択するか、ドラッグアンドドロップしてください。" + "SELECT_IMAGES_DESCRIPTION": "PNG、JPG、JPEG、またはWEBP画像を選択するか、ドラッグアンドドロップしてください。", + "PASTE_IMAGE_DESCRIPTION": "Ctrl + V または Cmd + V を押してクリップボードから画像を貼り付けます" }, "PROGRESS": { "PROCESSING_TITLE": "画像を処理中...", diff --git a/renderer/locales/ru.json b/renderer/locales/ru.json index 90ecbdb..ecce345 100644 --- a/renderer/locales/ru.json +++ b/renderer/locales/ru.json @@ -147,7 +147,8 @@ "SELECT_FOLDER": "Выберите папку для увеличения", "SELECT_IMAGE": "Выберите изображение для увеличения", "SELECT_FOLDER_DESCRIPTION": "Убедитесь, что в папке нет ничего, кроме изображений PNG, JPG, JPEG и WEBP.", - "SELECT_IMAGES_DESCRIPTION": "Выберите или перетащите изображение в формате PNG, JPG, JPEG или WEBP." + "SELECT_IMAGES_DESCRIPTION": "Выберите или перетащите изображение в формате PNG, JPG, JPEG или WEBP.", + "PASTE_IMAGE_DESCRIPTION": "Нажмите Ctrl + V или Cmd + V, чтобы вставить изображение из буфера обмена" }, "PROGRESS": { "PROCESSING_TITLE": "Обработка изображения...", diff --git a/renderer/locales/zh.json b/renderer/locales/zh.json index bc99ec9..b8ea7b6 100644 --- a/renderer/locales/zh.json +++ b/renderer/locales/zh.json @@ -147,7 +147,8 @@ "SELECT_FOLDER": "选择要增强的文件夹", "SELECT_IMAGE": "选择要增强的图片", "SELECT_FOLDER_DESCRIPTION": "文件夹中只支持 PNG、JPG、JPEG 和 WEBP 图片。", - "SELECT_IMAGES_DESCRIPTION": "选择或拖放 PNG、JPG、JPEG 或 WEBP 图片。" + "SELECT_IMAGES_DESCRIPTION": "选择或拖放 PNG、JPG、JPEG 或 WEBP 图片。", + "PASTE_IMAGE_DESCRIPTION": "按 Ctrl + V 或 Cmd + V 以從剪貼簿貼上圖像" }, "PROGRESS": { "PROCESSING_TITLE": "正在处理图片...",