1
0
Fork 0

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:
Bram Schoenmakers 2024-01-25 08:16:11 +01:00
parent d0cd974683
commit a6cf81c652
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

14
kagi.el
View file

@ -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.