From 72d144ed7446ff8ae6e1608165ada9dee92f4a3d Mon Sep 17 00:00:00 2001 From: fzk <458813868@qq.com> Date: Tue, 14 May 2024 09:16:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=E9=A1=B5=E5=9B=BD=E9=99=85=E5=8C=96=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +++-- .../web/src/components/upload/UploadImg.tsx | 2 +- packages/web/src/i18n/locales/de-DE.json | 4 ++ packages/web/src/i18n/locales/en-US.json | 4 ++ packages/web/src/i18n/locales/zh-CN.json | 4 ++ packages/web/src/pages/shotScreen/index.tsx | 40 +++++++++++++++---- 6 files changed, 50 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5c4b3b96..23acf52f 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,6 @@ The cross-Platform of `pear-rec` is based on `electronjs`, and the front-end is based on `reactjs`. The functions of screenshot, screen recording, recording, recording (dynamic image) gif are a project based on `webrtc` and `webcodecs`. -## πŸ–– Vue - -Screenshot implemented by community personnel based on `vue` πŸ‘‰ [electron-screenshort](https://github.com/yejimeiming/electron-screenshort). - ## 🌰 Example [web pages](https://pear-rec-xiguapi.vercel.app/) @@ -154,6 +150,11 @@ Features that have been ticked are the latest in the development process but may | --- | --- | --- | --- | | Link | [Download](https://github.com/027xiguapi/pear-rec/releases) | [Download](https://github.com/027xiguapi/pear-rec/releases) | [Download](https://github.com/027xiguapi/pear-rec/releases) | + +## πŸ–– Vue + +Screenshot implemented by community personnel based on `vue` πŸ‘‰ [electron-screenshort](https://github.com/yejimeiming/electron-screenshort). + ## πŸ‘¨β€πŸ‘¨β€πŸ‘¦β€πŸ‘¦ Feedback We recommend that [issue](https://github.com/027xiguapi/pear-rec/issues) be used for problem feedback. diff --git a/packages/web/src/components/upload/UploadImg.tsx b/packages/web/src/components/upload/UploadImg.tsx index 87b67dc6..315fd403 100644 --- a/packages/web/src/components/upload/UploadImg.tsx +++ b/packages/web/src/components/upload/UploadImg.tsx @@ -19,7 +19,7 @@ function UploadImg(props) { return ( ({}); @@ -65,6 +67,7 @@ function ShotScreen() { setScreenShotImg(''); }); } + i18n = Local.get('i18n'); } async function getShotScreenImg() { @@ -251,6 +254,27 @@ function ShotScreen() { url={screenShotImg} width={window.innerWidth} height={window.innerHeight} + lang={ + i18n != 'zh' + ? { + operation_undo_title: 'Undo', + operation_mosaic_title: 'Mosaic', + operation_text_title: 'Text', + operation_brush_title: 'Brush', + operation_arrow_title: 'Arrow', + operation_ellipse_title: 'Ellipse', + operation_rectangle_title: 'Rectangle', + magnifier_position_label: 'Position', + operation_ok_title: 'Ok', + operation_cancel_title: 'Cancel', + operation_save_title: 'Save', + operation_redo_title: 'Redo', + operation_search_title: 'Search', + operation_scan_title: 'Scan', + operation_pin_title: 'Pin', + } + : {} + } onSave={onSave} onCancel={onCancel} onOk={onOk} @@ -262,9 +286,9 @@ function ShotScreen() { <> ) : ( - + {t('shotScreen.image')} )}