all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrey Tykhonov <atykhonov@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: google-translate (was: Re: Is it possible to transform text before feeding it to ispell?)
Date: Wed, 9 Sep 2015 10:18:26 +0300	[thread overview]
Message-ID: <CAM7J8H+ghFy2jQW6z8XmQ8Ut+3f1F2qtPYJBLKpZs+xkTj4oGw@mail.gmail.com> (raw)
In-Reply-To: <87d1xs5yd5.fsf_-_@debian.uxu>

Hi Emanuel,

On 9 September 2015 at 01:40, Emanuel Berg <embe8573@student.uu.se> wrote:

> Alexis <flexibeast@gmail.com> writes:
>
> > i don't know about ready-made solutions for this,
> > but perhaps something could be built around the
> > `google-translate` package that's available from
> > MELPA and Marmalade?
>
> I have used that from the shell for some time but for
> whatever reason it stopped working recently, so thank
> you for this. I had to write this -
>
> (require 'w3m-unisearch)
>
> (defun swedish-to-english (&optional text)
>   (interactive)
>   (let ((text (get-search-string "ord")))
>     (google-translate-translate "Swedish" "English" text 'kill-ring)
>     (let ((translation (string-make-unibyte (current-kill 0 t))))
>       (message "%s: %s" text translation) )))
>
> (defalias 'sv 'swedish-to-english)
>
> - to get the DWIM region/word-at-point/just-type
> interface I also have for w3m Google searches (and
> more); for the above to work, get it here:
>
>     http://user.it.uu.se/~embe8573/conf/emacs-init/w3m/w3m-unisearch.el
>
> But it seems I found a bug already. Try this line:
>
>     (google-translate-translate "Swedish" "English" "i")
>
> It gives an error, even tho such short words are
> common in many languages and are likely to be
> translated now and then.
>


Thank you for the bug report! I'll fix it as soon as possible!


>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
>
>
>


  reply	other threads:[~2015-09-09  7:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08  8:29 Is it possible to transform text before feeding it to ispell? Marcin Borkowski
2015-09-08 10:19 ` Alexis
2015-09-08 11:45   ` Tassilo Horn
2015-09-08 22:40   ` google-translate (was: Re: Is it possible to transform text before feeding it to ispell?) Emanuel Berg
2015-09-09  7:18     ` Andrey Tykhonov [this message]
2015-09-10  0:51       ` Emanuel Berg
2015-09-16  3:01       ` google-translate Emanuel Berg
2015-09-16 12:22         ` google-translate Alex Kost
2015-09-16 23:29           ` google-translate Emanuel Berg
2015-09-17 22:32           ` google-translate Emanuel Berg
2015-09-19  0:09             ` google-translate Emanuel Berg
2015-09-19  4:17               ` google-translate Ian Zimmerman
2015-09-19 15:03                 ` google-translate Emanuel Berg
2015-09-19 15:25                 ` google-translate Emanuel Berg
2015-09-08 13:06 ` Is it possible to transform text before feeding it to ispell? Michael Heerdegen
2015-09-08 15:24   ` Marcin Borkowski
2015-09-08 17:39     ` Eli Zaretskii
2015-09-08 15:54 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM7J8H+ghFy2jQW6z8XmQ8Ut+3f1F2qtPYJBLKpZs+xkTj4oGw@mail.gmail.com \
    --to=atykhonov@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.