awamper / text-translator Goto Github PK
View Code? Open in Web Editor NEWNo longer maintained. extension for gnome-shell
Home Page: https://extensions.gnome.org/extension/593/text-translator/
No longer maintained. extension for gnome-shell
Home Page: https://extensions.gnome.org/extension/593/text-translator/
Hi,
thanks for this extension.
It would be really nice, if you could add support for offline dictionaries, like the DICT protocol.
Thanks, silberzwiebel
It'd be nice to add support for new Gnome 3.18 found in Fedora 23 Beta.
lg gives me error:
Expected type interface for Argument 'file' but got type 'string'
Awesome gadget!
I just wanted to point out a really strange issue I found and I think maybe it's a result of what is being put on the clipboard by the text translator.
If I copy a translation and paste it into GEdit then it pastes it as plain text no problem. But when I paste the same copied text to Thunderbird email it pastes an image (or some unrecognized object) not actually the text that I copied.
Cheers
Thanks for this great extension.
It would be nice that a language toggle will also update the result so users won't need to press the Go button.
I would even remove the Go button completely and simplify the design a little bit more to make it look as part of Gnome interface, like:
Just my 2cents, this is a very usable extension and I absolutely love it.
When I choose Yandex Translate insted of Google (which doesn't work anymore) in preferences, it will always automatically switch back to Google.
Same when I use the dconf-editor for configuration.
It's says "Can't translate text" on only Google Translate.
I believe users want it to speak the source language more often than target language. Or make a option for choice.
in line 883 and 884 of file entension.js.
this._dialog.target.text,
this._current_target_lang
make it to:
this._dialog.source.text,
this._current_source_lang
The extension has stopped working.
Have a complaint here too: https://extensions.gnome.org/extension/593/text-translator/
Hello @awamper,
I've been trying your extension lately and I like it lot, sorts out very nicely the hurdle of having to switch to the browser to open a translator in a tab, kudos!
However I found that it doesn't honors the languages I set in the configuration panel, steps to reproduce the issue:
Cheers.
The text in the translation window is a bit small for visually impaired people even with big text activated and the zoom can't be activated when in the translator window. The zoom will be active if switched on before starting the translator though. That's on Gnome 3.4,
Is there way to use gpaste instead of xclipit for translate primary selection?
Might make a pull request once I get some time. Would be a great time saver...
The translation window is too wide and it doesn't adapt to the screen width. I can't see the far right end of the translation window on a 10" screen netbook.
Can you please take on my branch for the new shell version? It works fine for me.
https://github.com/djmaze/text-translator/tree/3.10
By the way, I really love this extension! Thanks for that..
Currently this extensions have 2 providers: Google and Yandex. I want to add Bing Translator to have a solution when Google and Yandex both not working correctly. How can I do it ?
Please, it's now mainstream
Hello,
extreme good code, very useful extension thank you for sharing.
I added translit output maybe you can think about to merge this in your code.
Best Regards,
Florijan
Patch:
diff -rupN test/text-translator/google_tts.js [email protected]/google_tts.js
--- test/text-translator/google_tts.js 2014-08-09 23:00:35.901708315 +0200
+++ [email protected]/google_tts.js 2014-08-09 22:56:48.826271821 +0200
@@ -2,6 +2,7 @@ const Lang = imports.lang;
const Gst = imports.gi.Gst;
const URI = 'https://translate.google.com/translate_tts?ie=UTF-8&q=%s&tl=%s';
+const TRANSLIT_PART_SEPERATOR = '--------------------Translit--------------------\n\n';
const GoogleTTS = new Lang.Class({
Name: 'GoogleTTS',
@@ -24,6 +25,12 @@ const GoogleTTS = new Lang.Class({
speak: function(text, lang) {
this._kill_stream();
+ let translitPartIndex = text.indexOf(TRANSLIT_PART_SEPERATOR);
+
+ if(translitPartIndex > -1){
+ text = text.substring(0, translitPartIndex);
+ }
+
let uri = URI.format(encodeURIComponent(text), lang);
this._player.set_property("uri", uri);
this._player.set_state(Gst.State.PLAYING);
diff -rupN test/text-translator/translation_providers/google_translation_provider.js [email protected]/translation_providers/google_translation_provider.js
--- test/text-translator/translation_providers/google_translation_provider.js 2014-08-09 23:00:35.905041630 +0200
+++ [email protected]/translation_providers/google_translation_provider.js 2014-08-09 23:04:51.553656663 +0200
@@ -13,6 +13,7 @@ const LIMIT = 1400;
const MAX_QUERIES = 3;
const SENTENCES_REGEXP = /\n|([^\r\n.!?]+([.!?]+|\n|$))/gim;
+const TRANSLIT_PART_SEPERATOR = '--------------------Translit--------------------\n\n';
const DictionaryEntry = new Lang.Class({
Name: "DictionaryEntry",
@@ -288,6 +289,10 @@ const Translator = new Lang.Class({
for(let i = 0; i < json.sentences.length; i++) {
result += json.sentences[i].trans;
+ if(json.sentences[i].translit){
+ result += "\n\n" + TRANSLIT_PART_SEPERATOR;
+ result += json.sentences[i].translit;
+ }
}
result = Utils.escape_html(result);
Hi,
when i launch the translator extension, i can't access my applications on my second screen.
It could be fun to have the extension on one screen, when i'm writing documents on the second.
Anyway, thanks for your work.
Best regards.
Your extension is great, i like it. Do you plan including localization support? I would translate it to German for instance.
And one minor thing: Sometimes I think it is a bit annoying that the buttons at the bottom are moving. Mainly when the button you want to click has moved away in the mean time.
Hi, :-)
I want everytime qui the windows by click outside the windows, but I'm everytime frustrated by the need to click on "shutdown" buton, or escape keyboard...
I think that's will be good if we can do that...
Syncerely
.H.
Great extension, but there's a big ugly bug. I'm running gnome 3.8, Ubuntu 13.10 (beta)
The thing is: when I use translator, after 1 or 2 usage of the interface, I can't exit the translating window anymore.
It locks completely the other running app's windows (can't use them with either the mouse or the keyboard), and I can't get out of this with "esc" or else. I can only access the top bar, and thus only disconnect from the session to fix it.
Hey, I have a strange problem here, the first time I use the translator everything works well but after closing the window I can't open it again until I restart the gnome shell. There aren't any errors seen in looking glass or in xsession-errors. Maybe you have some idea? Thanks
I like the extension but I'm unable to use it at work, where it would be especially useful to me, because the requests aren't passing through the company's http proxy.
I'd be very grateful if someone could implement the support. Thank you!
If possible, please add an option for automatic or button/shortcut for manual pronunciation using Google Translate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.