Return the language entered by the user
The user is free to pick any language which is not necessarily covered by kagi--languages.
This commit is contained in:
parent
d0cd974683
commit
a6cf81c652
1 changed files with 6 additions and 8 deletions
6
kagi.el
6
kagi.el
|
@ -416,14 +416,12 @@ Otherwise, show the result in a separate buffer."
|
||||||
|
|
||||||
PROMPT is passed to the corresponding parameters of
|
PROMPT is passed to the corresponding parameters of
|
||||||
`completing-read', refer to its documentation for more info."
|
`completing-read', refer to its documentation for more info."
|
||||||
(alist-get (completing-read prompt
|
(completing-read prompt kagi--languages
|
||||||
kagi--languages
|
|
||||||
nil
|
nil
|
||||||
nil
|
nil
|
||||||
nil
|
nil
|
||||||
kagi--language-history
|
kagi--language-history
|
||||||
"English")
|
"English"))
|
||||||
kagi--languages))
|
|
||||||
|
|
||||||
(defun kagi-translate (text target-language &optional source-language interactive-p)
|
(defun kagi-translate (text target-language &optional source-language interactive-p)
|
||||||
"Translate the TEXT to TARGET-LANGUAGE using FastGPT.
|
"Translate the TEXT to TARGET-LANGUAGE using FastGPT.
|
||||||
|
|
Loading…
Reference in a new issue