v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-20 01:30:07 -07:00

docs: fix grammar error & change sound to text to speech

This commit is contained in:
eeeXun 2023-05-12 14:58:58 +08:00
parent 6c8bbac7d8
commit 8dcf8c449d
2 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@ Supported Translator:
## ⚠️ Note for ChatGPT ## ⚠️ Note for ChatGPT
You need to apply a API key on [ChatGPT](https://platform.openai.com/account/api-keys). You need to apply an API key on [OpenAI API keys](https://platform.openai.com/account/api-keys).
And write it to `$XDG_CONFIG_HOME/gtt/gtt.yaml` or `$HOME/.config/gtt/gtt.yaml`. And write it to `$XDG_CONFIG_HOME/gtt/gtt.yaml` or `$HOME/.config/gtt/gtt.yaml`.
```yaml ```yaml
@ -92,10 +92,10 @@ Copy all text in source of translation window.
Copy all text in destination of translation window. Copy all text in destination of translation window.
`<C-o>` `<C-o>`
Play sound on source of translation window. Play text to speech on source of translation window.
`<C-p>` `<C-p>`
Play sound on destination of translation window. Play text to speech on destination of translation window.
`<C-x>` `<C-x>`
Stop play sound. Stop play sound.

8
ui.go
View File

@ -30,9 +30,9 @@ const (
[#%[1]s]<C-r>[-] [#%[1]s]<C-r>[-]
Copy all text in destination of translation window. Copy all text in destination of translation window.
[#%[1]s]<C-o>[-] [#%[1]s]<C-o>[-]
Play sound on source of translation window. Play text to speech on source of translation window.
[#%[1]s]<C-p>[-] [#%[1]s]<C-p>[-]
Play sound on destination of translation window. Play text to speech on destination of translation window.
[#%[1]s]<C-x>[-] [#%[1]s]<C-x>[-]
Stop play sound. Stop play sound.
[#%[1]s]<C-t>[-] [#%[1]s]<C-t>[-]
@ -500,7 +500,7 @@ func translateWindowHandler(event *tcell.EventKey) *tcell.EventKey {
} }
dstOutput.SetText(srcText) dstOutput.SetText(srcText)
case tcell.KeyCtrlO: case tcell.KeyCtrlO:
// Play source sound // Play text to speech on source of translation window.
if translator.LockAvailable() { if translator.LockAvailable() {
message := srcInput.GetText() message := srcInput.GetText()
// Only play when message exist // Only play when message exist
@ -517,7 +517,7 @@ func translateWindowHandler(event *tcell.EventKey) *tcell.EventKey {
} }
case tcell.KeyCtrlP: case tcell.KeyCtrlP:
// Play destination sound // Play text to speech on destination of translation window.
if translator.LockAvailable() { if translator.LockAvailable() {
message := dstOutput.GetText(false) message := dstOutput.GetText(false)
// Only play when message exist // Only play when message exist