Skip to content

Commit 2f1d1a4

Browse files
committed
refactor: 将项目名称改为小写
- 修改了多个文件中的 "Saladict" 为 "saladict"(tauri 1,linux二进制文件是小写,tauri 2有变化,二进制和app显示名称分开了)
1 parent da3baa6 commit 2f1d1a4

File tree

8 files changed

+116
-116
lines changed

8 files changed

+116
-116
lines changed

.github/workflows/package.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
run: |
158158
# Set paths
159159
app_path="src-tauri/target/${{ matrix.target }}/release/bundle/macos/Saladict.app"
160-
dmg_path="src-tauri/target/${{ matrix.target }}/release/bundle/dmg/Saladict_${{needs.change-version.outputs.version}}_${{ contains(matrix.target, 'aarch64') && 'aarch64' || 'x86_64' }}.dmg"
160+
dmg_path="src-tauri/target/${{ matrix.target }}/release/bundle/dmg/saladict_${{needs.change-version.outputs.version}}_${{ contains(matrix.target, 'aarch64') && 'aarch64' || 'x86_64' }}.dmg"
161161
ocr_arm64_path="${app_path}/Contents/Resources/resources/ocr-aarch64-apple-darwin"
162162
ocr_x86_path="${app_path}/Contents/Resources/resources/ocr-x86_64-apple-darwin"
163163
@@ -221,8 +221,8 @@ jobs:
221221
run: |
222222
cd src-tauri/target/aarch64-apple-darwin/release/bundle/macos
223223
rm -f Saladict.app.tar.gz Saladict.app.tar.gz.sig
224-
tar -czf Saladict_${{needs.change-version.outputs.version}}_aarch64.app.tar.gz Saladict.app
225-
pnpm tauri signer sign -k "$TAURI_PRIVATE_KEY" -p "$TAURI_KEY_PASSWORD" "$PWD/Saladict_${{needs.change-version.outputs.version}}_aarch64.app.tar.gz"
224+
tar -czf saladict_${{needs.change-version.outputs.version}}_aarch64.app.tar.gz Saladict.app
225+
pnpm tauri signer sign -k "$TAURI_PRIVATE_KEY" -p "$TAURI_KEY_PASSWORD" "$PWD/saladict_${{needs.change-version.outputs.version}}_aarch64.app.tar.gz"
226226
227227
- name: Change File Name
228228
if: matrix.target == 'x86_64-apple-darwin'
@@ -232,8 +232,8 @@ jobs:
232232
run: |
233233
cd src-tauri/target/x86_64-apple-darwin/release/bundle/macos
234234
rm -f Saladict.app.tar.gz Saladict.app.tar.gz.sig
235-
tar -czf Saladict_${{needs.change-version.outputs.version}}_x64.app.tar.gz Saladict.app
236-
pnpm tauri signer sign -k "$TAURI_PRIVATE_KEY" -p "$TAURI_KEY_PASSWORD" "$PWD/Saladict_${{needs.change-version.outputs.version}}_x64.app.tar.gz"
235+
tar -czf saladict_${{needs.change-version.outputs.version}}_x64.app.tar.gz Saladict.app
236+
pnpm tauri signer sign -k "$TAURI_PRIVATE_KEY" -p "$TAURI_KEY_PASSWORD" "$PWD/saladict_${{needs.change-version.outputs.version}}_x64.app.tar.gz"
237237
238238
- name: Upload Artifacts
239239
uses: actions/upload-artifact@v4
@@ -378,9 +378,9 @@ jobs:
378378
$env:TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}"
379379
$env:TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}"
380380
pnpm tauri build -b nsis,updater --target ${{ matrix.target }}
381-
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.exe Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.exe
382-
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.nsis.zip Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.nsis.zip
383-
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.nsis.zip.sig Saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.nsis.zip.sig
381+
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.exe saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.exe
382+
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.nsis.zip saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.nsis.zip
383+
Rename-Item .\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}-setup.nsis.zip.sig saladict_${{needs.change-version.outputs.version}}_${{ matrix.arch }}_fix_webview2_runtime-setup.nsis.zip.sig
384384
- name: Upload Artifacts
385385
uses: actions/upload-artifact@v4
386386
with:

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ winget install allentown521.Saladict
184184

185185
1.[Release](https://github.com/allentown521/saladict/releases/latest) 页面下载最新 `exe` 安装包。
186186

187-
- 64 位机器下载 `Saladict_{version}_x64-setup.exe`
188-
- 32 位机器下载 `Saladict_{version}_x86-setup.exe`
189-
- arm64 机器下载 `Saladict_{version}_arm64-setup.exe`
187+
- 64 位机器下载 `saladict_{version}_x64-setup.exe`
188+
- 32 位机器下载 `saladict_{version}_x86-setup.exe`
189+
- arm64 机器下载 `saladict_{version}_arm64-setup.exe`
190190

191191
2. 双击安装包进行安装。
192192

@@ -196,7 +196,7 @@ winget install allentown521.Saladict
196196

197197
检查是否卸载/禁用了 WebView2,如果卸载/禁用了 WebView2,请手动安装 WebView2 或将其恢复。
198198

199-
如果是企业版系统不方便安装或无法安装 WebView2,请尝试在 [Release](https://github.com/allentown521/saladict/releases/latest) 下载内置 WebView2 的版本 `Saladict_{version}_{arch}_fix_webview2_runtime-setup.exe`
199+
如果是企业版系统不方便安装或无法安装 WebView2,请尝试在 [Release](https://github.com/allentown521/saladict/releases/latest) 下载内置 WebView2 的版本 `saladict_{version}_{arch}_fix_webview2_runtime-setup.exe`
200200

201201
若问题仍然存在请尝试使用 Windows7 兼容模式启动。
202202

@@ -215,7 +215,7 @@ M-series Macs 用户可以从 Mac App Store 安装。
215215

216216
### 手动安装
217217

218-
1.[Release](https://github.com/allentown521/saladict/releases/latest) 页面下载最新的 `dmg` 安装包。(如果您使用的是 M1 芯片,请下载名为`Saladict_{version}_aarch64.dmg`的安装包,否则请下载名为`Saladict_{version}_x64.dmg`的安装包)
218+
1.[Release](https://github.com/allentown521/saladict/releases/latest) 页面下载最新的 `dmg` 安装包。(如果您使用的是 M1 芯片,请下载名为`saladict_{version}_aarch64.dmg`的安装包,否则请下载名为`saladict_{version}_x64.dmg`的安装包)
219219
2. 双击下载的文件后将 沙拉翻译 拖入 Applications 文件夹即可完成安装。
220220

221221
### 通过 Brew 安装
@@ -289,7 +289,7 @@ GET "/ocr_translate?screenshot=true" => 截图翻译,
289289
### 调用流程
290290

291291
1. 使用其他截图工具截图
292-
2. 将截图保存在 `$CACHE/allen.town.focus.saladict/pot_screenshot_cut.png`
292+
2. 将截图保存在 `$CACHE/allen.town.focus.saladict/Saladict_screenshot_cut.png`
293293
3. 向`127.0.0.1:port/ocr_recognize?screenshot=false`发送请求即可调用成功
294294

295295
> `$CACHE`为系统缓存目录,例如在 Windows 上为`C:\Users\{用户名}\AppData\Local\allen.town.focus.saladict\pot_screenshot_cut.png`
@@ -357,8 +357,8 @@ bind = ALT, C, exec, grim -g "$(slurp)" ~/.cache/allen.town.focus.saladict/pot_s
357357
由于目前 沙拉翻译 在 Wayland 下还无法获取到正确的鼠标坐标,所以内部的实现无法工作。 对于某些桌面环境/窗口管理器,可以通过设置窗口规则来实现窗口跟随鼠标位置,这里以 Hyprland 为例:
358358

359359
```conf
360-
windowrulev2 = float, class:(pot), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
361-
windowrulev2 = move cursor 0 0, class:(pot), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.
360+
windowrulev2 = float, class:(saladict), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
361+
windowrulev2 = move cursor 0 0, class:(saladict), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.
362362
```
363363

364364
<div align="center">

README_EN.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ The built-in services are limited. But you can expand the app's functionality th
151151

152152
You can find plugins you need in the [Plugin List](https://saladict-app.aichatone.com/plugin.html), and then go to the plugin repo to download it.
153153

154-
The file extension of pot plugin is `.potext`. After downloading the `.potext` file, go to Preferences - Service Settings - Add External Plugin - Install External Plugin to select the corresponding `.potext` to install it. It will then be added to the service list and can be used like a built-in service.
154+
The file extension of Saladict plugin is `.potext`. After downloading the `.potext` file, go to Preferences - Service Settings - Add External Plugin - Install External Plugin to select the corresponding `.potext` to install it. It will then be added to the service list and can be used like a built-in service.
155155

156156
### Troubleshooting
157157

@@ -185,9 +185,9 @@ winget install allentown521.Saladict
185185

186186
1. Download the installation package ending in `.exe` from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) page.
187187

188-
- 64-bit machine download `Saladict_{version}_x64-setup.exe`
189-
- 32-bit machine download `Saladict_{version}_x86-setup.exe`
190-
- arm64 machine download `Saladict_{version}_arm64-setup.exe`
188+
- 64-bit machine download `saladict_{version}_x64-setup.exe`
189+
- 32-bit machine download `saladict_{version}_x86-setup.exe`
190+
- arm64 machine download `saladict_{version}_arm64-setup.exe`
191191

192192
2. Double click the downloaded file to install it.
193193

@@ -197,7 +197,7 @@ winget install allentown521.Saladict
197197

198198
Check if WebView2 is uninstalled/disabled, if so, install WebView2 manually or restore it.
199199

200-
If the enterprise edition system is inconvenient to install or cannot install WebView2, please try to download the fix WebView2 version `Saladict_{version} at [Release](https://github.com/allentown521/saladict/releases/latest) _{arch}_fix_webview2_runtime-setup.exe`
200+
If the enterprise edition system is inconvenient to install or cannot install WebView2, please try to download the fix WebView2 version `saladict_{version} at [Release](https://github.com/allentown521/saladict/releases/latest) _{arch}_fix_webview2_runtime-setup.exe`
201201

202202
If the issue persists, please try starting in Windows 7 compatibility mode.
203203

@@ -220,26 +220,26 @@ For M-series Macs, you can install it from Mac App Store
220220
brew tap allentown521/homebrew-saladict
221221
```
222222

223-
2. Install pot:
223+
2. Install Saladict:
224224

225225
```bash
226226
brew install --cask saladict
227227
```
228228

229-
3. Upgrade pot
229+
3. Upgrade Saladict
230230

231231
```bash
232232
brew upgrade --cask saladict
233233
```
234234

235235
### Install Manually
236236

237-
1. Download the installation package ending in `.dmg` from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) page. (If you are using M1, please download the installation package named `Saladict_{version}_aarch64.dmg`, otherwise download the installation package named `Saladict_{version}_x64.dmg`)
237+
1. Download the installation package ending in `.dmg` from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) page. (If you are using M1, please download the installation package named `saladict_{version}_aarch64.dmg`, otherwise download the installation package named `saladict_{version}_x64.dmg`)
238238
2. Double click the downloaded file to install it.
239239

240240
### Troubleshooting
241241

242-
- If you encounter a permission prompt every time you open it, or if you cannot perform a shortcut translation, please go to Settings -> Privacy & Security -> Supporting Features to remove pot, and then re-add pot.
242+
- If you encounter a permission prompt every time you open it, or if you cannot perform a shortcut translation, please go to Settings -> Privacy & Security -> Supporting Features to remove Saladict, and then re-add Saladict.
243243

244244
## Linux
245245

@@ -256,7 +256,7 @@ Please note that: There are two deb package, `universal` is based on `glibc2.28`
256256

257257
</div>
258258

259-
Saladict provides a complete HTTP interface for integration with other software. You can call pot by sending HTTP requests to `127.0.0.1:port`, where `port` is the listening port of pot, default to `60606`, and can be changed in the app settings.
259+
Saladict provides a complete HTTP interface for integration with other software. You can call Saladict by sending HTTP requests to `127.0.0.1:port`, where `port` is the listening port of Saladict, default to `60606`, and can be changed in the app settings.
260260

261261
## API Docs:
262262

@@ -278,7 +278,7 @@ GET "/ocr_translate?screenshot=true" => Translate screenshot
278278

279279
- Call translation by selection:
280280

281-
To call pot's translation by selection, simply send a request to `127.0.0.1:port`:
281+
To call Saladict's translation by selection, simply send a request to `127.0.0.1:port`:
282282

283283
E.g. using curl:
284284

@@ -288,7 +288,7 @@ GET "/ocr_translate?screenshot=true" => Translate screenshot
288288

289289
## OCR without internal screenshot
290290

291-
This allows you to perform OCR/translation without using pot's internal screenshot, so you can use your own screenshot tools. It also solves the problem where pot's internal screenshot doesn't work on some platforms.
291+
This allows you to perform OCR/translation without using Saladict's internal screenshot, so you can use your own screenshot tools. It also solves the problem where Saladict's internal screenshot doesn't work on some platforms.
292292
293293
### Workflow:
294294
@@ -311,16 +311,16 @@ rm ~/.cache/allen.town.focus.saladict/pot_screenshot_cut.png && flameshot gui -s
311311
### SnipDo (Windows)
312312
313313
1. Download and install SnipDo in the [Microsoft Store](https://apps.microsoft.com/store/detail/snipdo/9NPZ2TVKJVT7)
314-
2. Download the SnipDo extension of pot from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) (Saladict.pbar)
314+
2. Download the SnipDo extension of Saladict from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) (Saladict.pbar)
315315
3. Double click the downloaded file to install it.
316-
4. Selection some text, you can see the pot icon in the upper right corner of the selection, click the icon to translate.
316+
4. Selection some text, you can see the Saladict icon in the upper right corner of the selection, click the icon to translate.
317317
318318
### PopClip (MacOS)
319319
320320
1. Download and install PopClip in the [Official Website](https://www.popclip.app/)
321-
2. Download the PopClip extension of pot from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) (Saladict.popclipextz)
321+
2. Download the PopClip extension of Saladict from the Latest [Release](https://github.com/allentown521/saladict/releases/latest) (Saladict.popclipextz)
322322
3. Double click the downloaded file to install it.
323-
4. Enable the pot extension in PopClip settings, and then you can translate by selecting text.
323+
4. Enable the Saladict extension in PopClip settings, and then you can translate by selecting text.
324324
325325
### Starry (Linux)
326326
@@ -334,16 +334,16 @@ Github: [ccslykx/Starry](https://github.com/ccslykx/Starry)
334334
335335
</div>
336336
337-
Due to the varying levels of support for Wayland among different distributions, pot itself cannot achieve perfect compatibility. However, here are some solutions to common issues that can be implemented through proper configuration, allowing pot to run flawlessly on Wayland.
337+
Due to the varying levels of support for Wayland among different distributions, Saladict itself cannot achieve perfect compatibility. However, here are some solutions to common issues that can be implemented through proper configuration, allowing Saladict to run flawlessly on Wayland.
338338
339339
## Shortcut key cannot be used
340340
341-
Due to Tauri's lack of support for Wayland, the shortcut key scheme in the pot application cannot be used under Wayland.
342-
You can set the system shortcut and send a request with `curl` to call pot, see [External Calls](#external-calls) for details
341+
Due to Tauri's lack of support for Wayland, the shortcut key scheme in the Saladict application cannot be used under Wayland.
342+
You can set the system shortcut and send a request with `curl` to call Saladict, see [External Calls](#external-calls) for details
343343

344344
## Screenshot doesn't work
345345

346-
In some pure Wayland desktop environments/window managers (such as Hyprland), the built-in screenshot feature of pot cannot be used. In this case, you can use other screenshot tools instead. For more details, please refer to the section [Not Using Built-in Screenshot](#not-using-built-in-screenshot).
346+
In some pure Wayland desktop environments/window managers (such as Hyprland), the built-in screenshot feature of Saladict cannot be used. In this case, you can use other screenshot tools instead. For more details, please refer to the section [Not Using Built-in Screenshot](#not-using-built-in-screenshot).
347347

348348
Below is a configuration example for Hyprland using `grim` and `slurp` to achieve screenshot functionality:
349349

@@ -356,12 +356,12 @@ Other desktop environments/window managers also have similar operations.
356356

357357
## The translation window follows the mouse position.
358358

359-
Due to the current inability of pot to obtain accurate mouse coordinates under Wayland, its internal implementation cannot function properly.
359+
Due to the current inability of Saladict to obtain accurate mouse coordinates under Wayland, its internal implementation cannot function properly.
360360
For certain desktop environments/window managers, it is possible to achieve window following mouse position by setting window rules. Here we take Hyprland as an example:
361361

362362
```conf
363-
windowrulev2 = float, class:(pot), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
364-
windowrulev2 = move cursor 0 0, class:(pot), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.
363+
windowrulev2 = float, class:(saladict), title:(Translator|OCR|PopClip|Screenshot Translate) # Translation window floating
364+
windowrulev2 = move cursor 0 0, class:(saladict), title:(Translator|PopClip|Screenshot Translate) # Translation window follows the mouse position.
365365
```
366366

367367
<div align="center">
@@ -403,7 +403,7 @@ Rust >= 1.80.0
403403
2. Install dependencies
404404

405405
```bash
406-
cd pot-desktop
406+
cd saladict
407407
pnpm install
408408
```
409409

0 commit comments

Comments
 (0)