From 953763c6fb28d69914669817b8174e1d6f97c813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=A1=BA=E5=BC=BA?= <978987373@qq.com> Date: Wed, 22 Nov 2023 14:25:56 +0800 Subject: [PATCH] update sdoc version and sdoc translate --- frontend/package-lock.json | 30 +++++++++++++++++++++++------- frontend/package.json | 2 +- sdoc-helper.sh | 22 ++++++++++++++-------- 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e208b84f56e..46ba1377c63 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,7 +11,7 @@ "@gatsbyjs/reach-router": "1.3.9", "@seafile/react-image-lightbox": "2.0.2", "@seafile/resumablejs": "1.1.16", - "@seafile/sdoc-editor": "0.3.7", + "@seafile/sdoc-editor": "0.3.9", "@seafile/seafile-calendar": "0.0.12", "@seafile/seafile-editor": "0.4.8", "@uiw/codemirror-extensions-langs": "^4.19.4", @@ -4615,9 +4615,9 @@ "integrity": "sha512-8rBbmAEuuwOAGHYGCtEzpx+bxAcGS+V30otMmhRe7bPAdh4E57RWgCa8x7pkzHGFlY1t5d+ILz1gojvPVMYQig==" }, "node_modules/@seafile/sdoc-editor": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@seafile/sdoc-editor/-/sdoc-editor-0.3.7.tgz", - "integrity": "sha512-NtruiyOESXIJPSEj8/69lRaPayzKf842cukBXd8ktrFjpoQjeKQXOJkRkJ5iFuEQzzg4+SEMCKxhoI2QAYg2Bw==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@seafile/sdoc-editor/-/sdoc-editor-0.3.9.tgz", + "integrity": "sha512-MA9gmxova1lx2DrYX9eOwrt3W90Akx+4869njtb4QLBRZx1N8mecsjwcVFWBGUPRTbf7CwKWznuzFxZSzkPkBw==", "dependencies": { "@seafile/react-image-lightbox": "2.0.4", "@seafile/slate": "0.91.8", @@ -4629,6 +4629,7 @@ "copy-to-clipboard": "^3.3.3", "dayjs": "1.11.2", "deep-copy": "1.4.2", + "goober": "2.1.13", "is-hotkey": "0.2.0", "is-url": "^1.2.4", "lodash.throttle": "4.1.1", @@ -12446,6 +12447,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/goober": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.13.tgz", + "integrity": "sha512-jFj3BQeleOoy7t93E9rZ2de+ScC4lQICLwiAQmKMg9F6roKGaLSHoCDYKkWlSafg138jejvq/mTdvmnwDQgqoQ==", + "peerDependencies": { + "csstype": "^3.0.10" + } + }, "node_modules/good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -29840,9 +29849,9 @@ "integrity": "sha512-8rBbmAEuuwOAGHYGCtEzpx+bxAcGS+V30otMmhRe7bPAdh4E57RWgCa8x7pkzHGFlY1t5d+ILz1gojvPVMYQig==" }, "@seafile/sdoc-editor": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@seafile/sdoc-editor/-/sdoc-editor-0.3.7.tgz", - "integrity": "sha512-NtruiyOESXIJPSEj8/69lRaPayzKf842cukBXd8ktrFjpoQjeKQXOJkRkJ5iFuEQzzg4+SEMCKxhoI2QAYg2Bw==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@seafile/sdoc-editor/-/sdoc-editor-0.3.9.tgz", + "integrity": "sha512-MA9gmxova1lx2DrYX9eOwrt3W90Akx+4869njtb4QLBRZx1N8mecsjwcVFWBGUPRTbf7CwKWznuzFxZSzkPkBw==", "requires": { "@seafile/react-image-lightbox": "2.0.4", "@seafile/slate": "0.91.8", @@ -29854,6 +29863,7 @@ "copy-to-clipboard": "^3.3.3", "dayjs": "1.11.2", "deep-copy": "1.4.2", + "goober": "2.1.13", "is-hotkey": "0.2.0", "is-url": "^1.2.4", "lodash.throttle": "4.1.1", @@ -35907,6 +35917,12 @@ "slash": "^3.0.0" } }, + "goober": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.13.tgz", + "integrity": "sha512-jFj3BQeleOoy7t93E9rZ2de+ScC4lQICLwiAQmKMg9F6roKGaLSHoCDYKkWlSafg138jejvq/mTdvmnwDQgqoQ==", + "requires": {} + }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index cbb4df2f653..7616a71a8fc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,7 +6,7 @@ "@gatsbyjs/reach-router": "1.3.9", "@seafile/react-image-lightbox": "2.0.2", "@seafile/resumablejs": "1.1.16", - "@seafile/sdoc-editor": "0.3.7", + "@seafile/sdoc-editor": "0.3.9", "@seafile/seafile-calendar": "0.0.12", "@seafile/seafile-editor": "0.4.8", "@uiw/codemirror-extensions-langs": "^4.19.4", diff --git a/sdoc-helper.sh b/sdoc-helper.sh index 6db450694b8..b65a2bf731a 100644 --- a/sdoc-helper.sh +++ b/sdoc-helper.sh @@ -1,22 +1,28 @@ #!/bin/sh +# Enter the frontend directory and install the latest version of sdoc-editor +echo 'install sdoc-editor version' cd frontend - npm install @seafile/sdoc-editor@latest +# Copy the font icon of sdoc-editor +echo 'copy sdoc-editor font icon' cd .. - cp -r frontend/node_modules/@seafile/sdoc-editor/public/media/sdoc-editor-font media/sdoc-editor/ cp -r frontend/node_modules/@seafile/sdoc-editor/public/media/sdoc-editor-font.css media/sdoc-editor/sdoc-editor-font.css +# Get the latest translation content of sdoc-editor +echo 'update sdoc-editor translation content' tx pull -s -t -f seahub.sdoc-editor - cp -r media/sdoc-editor/locales/zh_CN/sdoc-editor.json media/sdoc-editor/locales/zh-CN/sdoc-editor.json -git add . - -git commit -m "update sdoc version and sdoc translate" - -git push origin master +echo 'Please check the updated content and see if it needs to be submitted.' +read -p "Do you want to continue submitting code? y/n: " Y +if [ $Y = 'y' ] +then + git add . + git commit -m "update sdoc version and sdoc translate" + git push origin master +fi