- Based on Azure GPT-4o-128k + manual correction translation.
- Comments are manually added.
- Only need to maintain the index.json files in the dict directory; if you feel the translation is incorrect, feel free to submit a PR.
- Modify _translate in index.json as needed.
- _translate is the translated content, and _note is your understanding of it as an annotation._note field supports HTML format and will be directly rendered below the original text.
- Pull from the original repository Prosemirror/website, compare with last-commit.txt; if there are updates, proceed to the next step; if not, interrupt CI.
- cd into website, follow instructions from the original repository: after
npm i
+make
, various index.html files will be built in the publish directory. - After running
npm i
in root directory, run index.js to query dictionary files (index.json) in dict directories that match paths with those under public for Chinese replacement; if fields aren't found, perform AI translation and update dictionary. - Move
website/public
directory up one level intopublic
directory and push remotely to trigger Vercel's build update.
- Replace
secrets.OPENAI_API_KEY
andsecrets.OPENAI_URL
inutils.js
with your own. - Execute
./local.sh
(requires execution permissions). - Check if each
index.html
under thewebsite/public
directory is functioning properly.
- This project's CI can be triggered two ways: manually or via weekly checks once per week 2.CI may modify files within dict directories along with generating new index.htmls overwriting same-path/same-name ones inside public 3.CI commits modifications back into this repo triggering Vercel updates hence merges cannot trigger here
- 基于 Azure GPT-4o-128k + 人工修正翻译。
- 注释部分为人工添加。
- 只需要维护 dict 目录的各个 index.json 即可,如果感觉翻译的不对,欢迎提交 PR。
- 修改 index.json 中的 _translate 即可。
- _translate 是翻译内容,_note 是你对内容的理解注释。_note 字段支持 HTML 格式,会直接渲染到原文下方。
- 拉取原仓库 Prosemirror/website,对比 last-commit.txt,有更新则执行下一步,无更新则中断 CI。
- cd 到 website,按原仓库说明,
npm i
+make
后,会构建出 publish 目录的各个 index.html - 根目录
npm i
后,运行 index.js,查询跟 index 在 public 中同路径的 dict 目录中的 index.json 字典,进行中文替换,如果字段未查询到,则进行 AI 翻译并更新字典。 - 将 website 中的 public 目录移动到上层的 docs 目录中,推送到远端,出发 Vercel 的构建更新。
- 替换
utils.js
中的secrets.OPENAI_API_KEY
和secrets.OPENAI_URL
为你自己的。 - 执行
./local.sh
(需要执行权限)。 - 检查
website/public
目录下的各个index.html
是否正常。
- 本项目 CI 有两种触发方式:手动触发和每周检查一次。
- ci 可能会修改 dict 目录中的文件,以及新产生 index.html 覆盖 public 中的同路径同名文件。
- ci 会将修改再次提交到本仓库中,以触发 Vercel 的更新,因此本仓库不能通过 Merge 触发。