Skip to content

Commit

Permalink
[Google Translate] Added Copy Pronunciation keyboard shortcut (#9262)
Browse files Browse the repository at this point in the history
* add copy pronounciation shortcut

* update changelog
  • Loading branch information
gebeto authored Nov 16, 2023
1 parent 7ec7470 commit d242d5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions extensions/google-translate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Google Translate Changelog

## [Enhancement] - 2023-11-15

- Added Copy Pronunciation keyboard shortcut

## [Enhancement] - 2023-08-31

- Added pronunciation for Translate and Translate Form
Expand Down
9 changes: 5 additions & 4 deletions extensions/google-translate/src/translate-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ export default function TranslateForm() {
actions={
<ActionPanel>
<ActionPanel.Section title="Generals">
<Action.CopyToClipboard title="Copy Translated" content={translated?.translatedText ?? ""} />
<Action.CopyToClipboard title="Copy Text" content={text ?? ""} />
<Action.CopyToClipboard
title="Copy Translated"
content={translated?.translatedText ?? ""}
icon={getLanguageFlag(toLangObj)}
title="Copy Pronunciation"
shortcut={{ modifiers: ["cmd", "shift"], key: "p" }}
content={translated?.pronunciationText ?? ""}
/>
<Action.CopyToClipboard title="Copy Text" content={text ?? ""} icon={getLanguageFlag(fromLangObj)} />
<Action.OpenInBrowser
title="Open in Google Translate"
shortcut={{ modifiers: ["opt"], key: "enter" }}
Expand Down

0 comments on commit d242d5f

Please sign in to comment.