汉化脚本
作者: unknowissue创建于 2024年4月29日更新于 2024年8月12日
Only applicable for win:
Logic:
- Read the environment variable $username = $env:USERNAME
- Read the version field in the file C:\Users\$username\AppData\Roaming\Notion\latestVersion.json
- Based on the value of the version field, check whether the following two files exist: C:\Users\$username\AppData\Roaming\Notion\notionAssetCache-v2\$version\assets_assets\index-en-US-***.html C:\Users\$username\AppData\Roaming\Notion\notionAssetCache-v2\$version\assets_assets\localeSetup-zh-CN-***.js
- If the two files exist, read the filename of C:\Users\$username\AppData\Roaming\Notion\notionAssetCache-v2\$version\assets_assets\localeSetup-zh-CN-***.js and copy it to $name_localeSetup-zh-CN
- Get the following string:'
- In the file C:\Users\$username\AppData\Roaming\Notion\notionAssetCache-v2\$version\assets_assets\index-en-US-***.html, replace the content of the head tag with the following:'
In addition, due to the security policy settings in win, it is necessary to start the powershell script with bat.
内容来源: Reamd7/notion-zh_CN