1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 11:01:14 +00:00
seahub/sdoc-helper.sh

32 lines
1.2 KiB
Bash
Raw Normal View History

2023-11-04 03:01:09 +00:00
#!/bin/sh
2023-11-22 06:25:56 +00:00
# Enter the frontend directory and install the latest version of sdoc-editor
echo 'install sdoc-editor version'
2023-11-04 03:01:09 +00:00
cd frontend
npm install @seafile/sdoc-editor@latest
2023-11-22 06:25:56 +00:00
# Copy the font icon of sdoc-editor
echo 'copy sdoc-editor font icon'
2023-11-04 03:01:09 +00:00
cd ..
2023-11-22 03:56:44 +00:00
cp -r frontend/node_modules/@seafile/sdoc-editor/public/media/sdoc-editor-font media/sdoc-editor/
2023-11-04 03:01:09 +00:00
cp -r frontend/node_modules/@seafile/sdoc-editor/public/media/sdoc-editor-font.css media/sdoc-editor/sdoc-editor-font.css
2023-11-06 03:25:48 +00:00
2023-11-22 06:25:56 +00:00
# Get the latest translation content of sdoc-editor
echo 'update sdoc-editor translation content'
2023-11-04 03:01:09 +00:00
tx pull -s -t -f seahub.sdoc-editor
2023-11-06 03:25:48 +00:00
cp -r media/sdoc-editor/locales/zh_CN/sdoc-editor.json media/sdoc-editor/locales/zh-CN/sdoc-editor.json
2024-11-20 03:21:37 +00:00
cp -r media/sdoc-editor/locales/es_AR/sdoc-editor.json media/sdoc-editor/locales/es-AR/sdoc-editor.json
cp -r media/sdoc-editor/locales/es_MX/sdoc-editor.json media/sdoc-editor/locales/es-MX/sdoc-editor.json
2023-11-06 03:25:48 +00:00
2023-11-22 06:25:56 +00:00
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"
2024-06-05 07:14:31 +00:00
d=`git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3`
git push origin $d
2023-11-22 06:25:56 +00:00
fi
2023-11-04 03:01:09 +00:00