google-translate icon indicating copy to clipboard operation
google-translate copied to clipboard

Try uncomment-region before translate

Open OGAWAHirofumi opened this issue 8 years ago • 3 comments

For example, if I try to translate emacs-lisp-mode like following,

[region-start] ;; If `google-translate-enable-ido-completion' is non-NIL, the input ;; will be read with ido-style completion. [region-end]

comment mark bother to translate it, ";;" works like the punctuation.

So this copies the region, uncommented, then make string without modifying original buffer. The result like following

[region-start] If `google-translate-enable-ido-completion' is non-NIL, the input will be read with ido-style completion. [region-end]

patch file

OGAWAHirofumi avatar Dec 08 '16 06:12 OGAWAHirofumi

I've created PR #67 for this. I updated docstrings and README. I will add the functional test for this soon, and it will be merged.

Thank you!

Btw, I would like to add you to the Contributors (see README.md and/or a head of each el file). Could you please provide your email address?

atykhonov avatar Dec 11 '16 22:12 atykhonov

OK. My email address is OGAWA Hirofumi <[email protected]>

Thanks.

OGAWAHirofumi avatar Dec 11 '16 23:12 OGAWAHirofumi

I found the problem when copying major-mode state. E.g. message-mode sets buffer-file-name for backup when called its major-mode.

So, new patch temporary sets buffer-file-name to prevent creating auto backup.

v2 patch file

OGAWAHirofumi avatar Dec 23 '16 23:12 OGAWAHirofumi