eth
is built on top of google-translate. It just allows for an additional editing of the candidates proposed by google-translate
. Those candidates are displayed either in the minibuffer or a dedicated side-buffer, and are then simply inserted in the main text after editing.
eth
is not a Computer Assisted Translation software.
In its current state, eth
just takes the next sentence in your document, highlights it, and proposes a translation in a dedicated buffer. Once you’re done editing this candidate, the final translation replaces the original sentence in your original document.
eth
has just one function at this stage: eth-translate-next-sentence
. It can be bound to a convenient shortcut and called in any buffer and any mode.
Once eth
is downloaded and put within your path, add the following in your init file:
;; google-translate is required:
(use-package google-translate
:ensure t
:init
(require 'google-translate)
(require 'google-translate-smooth-ui)
:config
(defun google-translate--search-tkk ()
"Search TKK."
(list 430675 2721866130)))
;; An example for the eth part:
(require 'eth)
(global-set-key "\C-cT" 'eth-translate-next-sentence)
(setq eth-source-language "en")
(setq eth-target-language "fr")
(setq eth-edit-in-minibuffer-p nil)
Also, remember that the variable sentence-end-double-space
will have a huge impact on what is detected as a proper sentence.
- [ ] Allow more general segments than just sentences.
- [ ] Allow more major modes than just text-mode in side buffer.
- [ ] Add a cancel option in side buffer (as
C-c C-k
in org-capture buffers)