DonationCoder.com Forum
DonationCoder.com Software => Find And Run Robot => Mouser's Zone => FARR Plugins and Aliases => Topic started by: mouser on January 31, 2008, 06:29 AM
-
http://www.google.com/language_tools?hl=en
google can translate between a lot of languages, it would be nice if a plugin could be made so you can indicate what language you want to translate to and from..
like:
gt en fr hello there my friend!
would do google translate from english to french the phrase "hello there my friend!"
Screenshot from czechboy's plugin:
[ You are not allowed to view attachments ]
-
DOWNLOAD:
As part of: CZB pack (https://www.donationcoder.com/forum/index.php?topic=17153.0).
-
hahahahaha it works!!!! :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup:
wonderful. :up: :up:
this is a really great one.
it might be nice to be able to skip having to put the "" around the text.
this translate plugin really deserves its own thread so im going to split it off into a separate thread if you don't mind.
-
looks really nice but does not work on my computer... :(
it works sometimes... very rarely... strange
[ You are not allowed to view attachments ]
-
cool looking script. i have a tool like this that pulls the translation from google. but just like nitrix-ud the plugin is not working, do i have to press enter or something? currently it doesn't translate anything..
[ You are not allowed to view attachments ]
-
well.. I must say that there may be (and I think there are) many bugs... so I will take a look into the code once more and see what is wrong there... And if you know just a little of javascript you are welcome to help me with it ;)
EDIT: nitrix-ud: I am not seasoned coder but let as see. If you try to translate "friend" from english french on this site ( http://translate.google.com/translate_t ) do you see there the result? if so, could you please copy and paste here source code of the page with result? so that I can check the regex... ;)
EDIT: I have found that English->German does not work for me even on translate.google.com (it writes the same in english as result).. strange :o
EDIT: I post a new version. Now you can type something like gt en fr hello there my friend!
After space is pressed it searches for the result. So check it and tell me if it works or not ;)
-
Lanux: There's no portuguese equivalent for the english term "muito obrigado", it's the other way around :P
-
@czechboy
here is the code source of the google page
note: i tried the latest version with no luck
-
Lanux: There's no portuguese equivalent for the english term "muito obrigado", it's the other way around :P-jgpaiva
ah, no wonder! my blunder.. :-[
-
New version:
now it displays Greek, russian etc corectly (hopefuly)
you can write "gt 4 6 school"
or "gt school"
it remembers last chosen languages
-
it remembers last chosen languages
-czechboy
Now THAT is a touch of class :P
-
hummmm... doesn't work either here (like nitrix-ud (https://www.donationcoder.com/forum/index.php?topic=12124.msg99888#msg99888))
-
Armando: and what exactly does it tell you? If you have my last version, does it say: error: Connection failed... or error: No translation found...? BTW: Are you able to debug javascript?
Try this version and copy paste what it tells you ;)
-
Hi czechboy,
Thanks for your answer. Like I said, it did exactly the same think as Reply #3 by nitrix-ud : error: No translation found (whatever the words).
But now I replaced the plugin with the new proposed version, and now nothing appears at all when I press "space" at the end of the expression.
[ You are not allowed to view attachments ]
But right before inserting the space this is what it shows :
[ You are not allowed to view attachments ]
(Sorry : I realized after attaching the screenshots that farr had transparency enabled... I'm just reattaching new images) Everything's ok now! ;)
Thanks!
-
BTW: Are you able to debug javascript?-czechboy
I forgot to answer that one... unfortunately, no. :-[
-
I see.. fine. that is unicode description of the sentence. Ok.. Probably there is problem in RTF file or probably I have writen the RTF unicode wrong. Is here anybody who knows RTF1 very well so that he/she can help me in writing unicode the right way? Anyway what I would suggest is to make new RTF files in a program you use most (MS OFFICE etc), copy and paste the text from both RTF files in plugin folder and save and override the former RTF files. Probably it will help since those files are created in StarOffice on Czech locals... But it is only guess...
But I am glad to see that it went fine through all the way till the unicode ;)
one more thing to mouser: How do you display RTF in FARR? Is it dependant on the system or not? I mean, if it can happen that people have different version of RTF and display text differently or not...
-
OK. So I have modified RTF files and also all RTF printing so it works on my PC just fine... So lets say this is something like final version :-[ Hopefully everything works just fine. So please let me know if it does not work and what exactly does not work ;)
[ You are not allowed to view attachments ]
-
works wonderfully here!
one minor suggestion: the search on space is really nice. i think you should add also to search on end of sentence punctuation (period, exclamation point, questionmark, quotationmark) [.!?"]
-
It still doesn't work for me. Am I having unusual unicode problems of some sort??? I'm starting to wonder what's wrong with my farr installation (I'm also having perpetual and unresolved problems with the farr alt tab plugin which I have permanently disabled).
-
Armando, try going to the Plugins panel in the Options and look into "Advanced Settings". maybe there will be a clue.
-
What's the role of fscript.dll? There seems to be a problem with "it" or something in relation to it.
The "configure advanced plugin options" of the google translate plugin pops up that window :
[ You are not allowed to view attachments ]
And if I click OK, this is what happens :
[ You are not allowed to view attachments ]
-
i think then there must be something wrong with fscript.dll which is the underlying engine for the JS-based plugins such as Farr-AltTab, Delicious & etc. maybe the respective authors can shed more light?
-
What's the role of fscript.dll? There seems to be a problem with "it" or something in relation to it.
Hum, the dialog shouldn't show at all since there is no options to configure. I will remove that as soon as possible.
-
ecaradec: I would like to suggest something. Is it possible to make javascript SDK plugin such way that all javascript plugins would be saved in folder like Fscript/jsplugins/myplugin and there would be only one fscript.dll for all javascript plugins. So that you would be able to update fscript yourself without us. Now I have to update all fscript.dll for my plugins manualy...
-
ecaradec: I would like to suggest something. Is it possible to make javascript SDK plugin such way that all javascript plugins would be saved in folder like Fscript/jsplugins/myplugin and there would be only one fscript.dll for all javascript plugins. So that you would be able to update fscript yourself without us. Now I have to update all fscript.dll for my plugins manualy...-czechboy
good idea! :up: i had been thinking along the same way since that means all the JS plugins would be streamlined making it easier pinpoint if any error occurs.
-
If someone of you would like to translate to chinese etc, then just open results.rtf and change font of "$$1" to Arial Unicode MS or Code2000.
-
Thanks for the tip czechboy.
Any news of a new version of fscript.dll ? I'm still having issues with it... GT still not showing anything in my case. I can't imagine I'm the only one... Am I ? :(
-
ecaradec: I would like to suggest something. Is it possible to make javascript SDK plugin such way that all javascript plugins would be saved in folder like Fscript/jsplugins/myplugin and there would be only one fscript.dll for all javascript plugins. So that you would be able to update fscript yourself without us. Now I have to update all fscript.dll for my plugins manualy...
-czechboy
This was my first idea. I'm not sure how I could do it, because FARR expect a plugin to export only one alias or one regex. I could make it work for aliases by filtering queries, but I'm not sure how I could do that for regexes because I would need to handle them myself and it may be not 100% compatible with FARR regexes.
-
I uploaded a new SDK with the correction for option dialog. A conflict between several instances of fscript.dll caused the problem. Download the last SDK from https://www.donationcoder.com/forum/index.php?topic=11804.0 . The options should work now. It is now possible to open the dialog on demand by calling FARR.showOptions(). I did it in the last delicious plugin, the dialog open after the installation of the plugins if the options are not configured.
I just realized how big the problem could be if there was a lot of plugins based on the fscript.dll. A bug in the SDK would force all developers of plugins based on the buggy SDK to upload a correction. I could create a version that does not use the regexes of FARR and let the plugins developers use the javascript regexes to match requests instead. Would that be acceptable ? This would help in creating a dll that is used for all plugins.
-
Well, why not? Is there any reason why not to use javascript regex? So I am for ;)
-
Well, why not? Is there any reason why not to use javascript regex? So I am for ;)
-czechboy
It may be slightly incompatible with FARR regexes, there would be no call to onRegexSearchMatch. It wouldn't be possible to change the regexes from the FARR dialogs.
It's ok for me, may be someone has an objection :)
-
@czechboy
here is the code source of the google page
note: i tried the latest version with no luck
-nitrix-ud
nitrix-ud : were you able to have the google translate plugin working?
-
@armando
nitrix-ud : were you able to have the google translate plugin working?
i just tried now and it seems to work as expected !
PS: je me suis un temps demandé si cela avait a voir avec le fait que nous soyons francais ! (je crois que tu l'es ;))
mais mon windows xp est un windows anglais...
-
Thanks nitrix-ud -- ahah, yes I do speak French, and... it still doesn't work for me. My Windows is in English too, so that's ruled out. I really wonder what the problem is on my side...
-
This translation plugin looks great! It is quicke to use compared to having FARR opening a page in the browser. Has anyone thought about writing a similar plugin that replaces/supplements the default "define" action in FARR? Example: typing "df football" could trigger a plugin that shows the english definition for the english word football (="the greatest sport ever") in the FARR results field, similarly to how the translation plugin works. The definitions could be pulled from definr.com or from one of the site used in the current define action in FARR.
-
i really like the idea behind this plugin (i'm new in the world of FARR), but i can't get it working properly.
I just get the screen (below), and nothing more happens :(
any suggestions (i allready gave FARR full rights to the internet in my firewall, but that doesn't seems to be it)
[ You are not allowed to view attachments ]
edit by jgpaiva: fixed attachment tag
-
try typing a period at the end to tell it to GO.
-
cheers mouser, i thought it would be something simple, and there you go! great tool this is btw (FARR in general), starting to like this more and more :Thmbsup:
-
the real thanks go to ecaradec and czechboy for making this plugin possible :up: :up:
-
New version, now without any results.rtf (since it did not work properly)
-
Thank you so much czechboy! Now everything is working! :-*
-
Actually, I realize that others get a nice screen with all the codes for languages (see reply #35 (https://www.donationcoder.com/forum/index.php?topic=12124.msg102780#msg102780)) : I don't. Is that normal? :-[
-
Well... again it is loaded from a file. Where is your FARR installed? Since it seams like that you can not open any file?? :tellme: Ok I can avoid any loading of files but then it can get a little bit messy..
-
Hi czechboy. Thanks.
farr is installed very normally in the program files folder. Here's the path : C:\Program Files\FindAndRunRobot\Plugins\Google_Translate\
-
New version. Google translate now supports 24 languages!
-
BTW, I should note here that my previous problems with Google Translate were fixed with the reinstallation of Windows Script:
http://www.microsoft.com/downloads/details.aspx?familyid=47809025-D896-482E-A0D6-524E7E844D81&displaylang=en
thanks to czechboy's suggestion here (https://www.donationcoder.com/forum/index.php?action=profile;u=111647).
Again : thanks!!!
-
Hi czechboy,
I'm having some trouble updating to the new version through the DC updater. Here's what I wrote there (https://www.donationcoder.com/forum/index.php?topic=13314.msg112666#msg112666)... : "DcUpdater always says that my "Google translate" installed version is 1.01.02 and that version on the web is 1.01.04, even after several updates.
Any ideas?"
Also, after the update, the language numbers don't seem to match the actual languages aymore. e.g. : according to the list, French should now be 10, but I found that it's rather 5 and English is 4... So it seems that only the language "presentation page" has been updated in the process, but not the actual real number-language association.
(Hopefully, what I wrote is understandable... :))
-
I have checked the version on the web and it is all right. To me it seams as if DC updater tries to update your files but can not. Try to delete all files in the directory manualy but dcupdate file and see if update goes smoothly.
Mouser: Is there any check in DC updater which would check if the instalation was succesful => I all files were overwriten corectly?
-
I've checked the google translate plugin updating and like czb im not seeing any trouble. its telling me that verstion 1.01.04 is installed and is on web.
I suspect that what might be happening is that you have google translate manually placed in a slightly different subdirectory than you should.
As czb says go look in your FARR plugin directory -- see if you dont have 2 dif subdirectories for it (maybe one double nested in like Plugins\Google_Translate\Google_Translate or something like that.. if so , delete it.
I suspect the problem is that the update from the web is installing, but you have an old copy in a dif location which is not being replaced.
-
It would probably be a good idea for adding a command in FARR to install a plugin, so as to avoid users having to manually unpack files in the FARR plugin directory themself.
-
Even better why not just do ALL plugin management through the updater. Any new plugin that is available would be listed in the "Available for Installation" tab minus any plugins you have already installed. The updater would handle all installing/uninstalling and updating ala quicksilver.
-
yes, that's been suggested, and i will add code to do that. it's already done partly like that now, but not completely for all plugins.
-
I suspect the problem is that the update from the web is installing, but you have an old copy in a dif location which is not being replaced.
-mouser
That was it. Many thanks. I don't know that happened... but it did... :-[
It would probably be a good idea for adding a command in FARR to install a plugin, so as to avoid users having to manually unpack files in the FARR plugin directory themself.
-mouser
Good idea, yes. It would certainly help to avoid that kind of situation.
-
Hi All.
Can I use this plugin for translate non-latin languages (for example, en-ru translation)? First try was failed... seems like cyrillic is not supported :((((
-
Hi All.
Can I use this plugin for translate non-latin languages (for example, en-ru translation)? First try was failed... seems like cyrillic is not supported :((((
-cansee
You can but you must have Arial Unicode MS font ;)
-
Hi All.
Can I use this plugin for translate non-latin languages (for example, en-ru translation)? First try was failed... seems like cyrillic is not supported :((((
-cansee
Uh... sorry. "gt en ru hello" does not work, but "gt 8 21 hello" working properly. Fine plugin :)
-
czechboy, some ideas:
- decrease fontsize for lang list from fs24 to fs20
- it would be good if a default input/output language could be locked if the user adds them to the plugin settings. Specifying other languages in the FARR input box would then only temporarily override the default.
- maybe let more than one space at the end of the searchphrase trigger toggling of output language.
example: "gt sunshine " translates from english to german, "gt sunshine " (two spaces) translates from english to spanish, three spaces = french, and so on for some set default languages.
- put current input/output language name in status bar
-
czechboy, some ideas:
- decrease fontsize for lang list from fs24 to fs20
- it would be good if a default input/output language could be locked if the user adds them to the plugin settings. Specifying other languages in the FARR input box would then only temporarily override the default.
- maybe let more than one space at the end of the searchphrase trigger toggling of output language.
example: "gt sunshine " translates from english to german, "gt sunshine " (two spaces) translates from english to spanish, three spaces = french, and so on for some set default languages.
- put current input/output language name in status bar
-Nod5
Hi, I have released new version ;)
to your comments:
1) done
2) well for now you can modify it directly in fscript.js (first two lines) => I will add settings later
3) try ctrl+tab instead ;)
4) done :)
Now you can also use enter :Thmbsup:
-
Neat! :Thmbsup:
-
just corrected small bug. When you typed "gt" and hit ctrl+tab an error occured. it should be fixed now ;)
-
Now that Google support Hebrew I've tried to change gt for my need.
var output, languages = new Array("ar","bg","zh-CN","zh-TW","hr","cs","da","nl","en","fi","fr","de","el","hi","it","ja","ko","no","pl","pt","ro","ru","es","sv","iw");
var lang_names = new Array("Arabic","Bulgarian","Chinese (Simplified)","Chinese (Traditional)","Croatian","Czech","Danish","Dutch","English","Finnish","French","German","Greek","Hindi","Italian","Japanese","Korean","Norwegian","Polish","Portuguese","Romanian","Russian","Spanish","Swedish","Hebrew");
like that, but it's not working, any idea what else need to be changed ? :(
-
I have uploaded new version, where you can find all languages, I have also modified way of fetching data and corrected a few small bugs :Thmbsup:
-
The original download link from the first post is not working. Is there an alternate location?
-
try here, it has become part of CZB pack (https://www.donationcoder.com/forum/index.php?topic=17153.0).
-
There's something wrong with some characters. It's weird, accented characters work fine when translating, for example, to french, but it seems to have a problem with apostrophes ("L'elephant" becomes "l'éléphant"):
[ You are not allowed to view attachments ]
-
The Client for Google Translate app has been working well for me lately by automagically translating highlighted text in various languages into English by clicking a pop-up icon. It works with Acrobat and Firefox, and has proven to be especially useful in translating plain text from Google Books. The translated text appears in a larger, scrollable pop-up box which can be saved to the clipboard. Freeware.
http://translateclient.com/
-
The "Download" link is dead. :down: Is there some other way to install this very usefull plug in?
-
It has become part of: CZB pack (https://www.donationcoder.com/forum/index.php?topic=17153.0).
-
It has become part of: CZB pack (https://www.donationcoder.com/forum/index.php?topic=17153.0).
-mouser
why I can't download this plugins of CZB pack ?
-
CZB pack download is here:
https://www.donationcoder.com/forum/index.php?topic=17153.0
-
Updated Google Translate due to invalid Syntax. The CZB's Pack wouldn't load due to errors so I used the one available in this thread which is why i'm posted it here.
Essentially, google updated some of their html which in turn broke this plugin.
In addition, if you look in the screenshot, i've added some of the romaji/pinyin for various languages (chinese, japanese, korean). ATM since FARR doesn't support unicode(?), you can only translate from english to another language, at least that is what i've discovered (I think some posts here were trying a workaround). This might be pretty buggy but my tests succeeded.
@koro: late, but it appears that the reason why your apostrophe looks so weird is because you've converted it to its html code counterpart.
-
I added Vietnamese as number 14 : http://www.box.com/s/1lqv0db0ueid3nefyc3d
-
Hi - complete newbie. Not a coder. Installed the Google Translate Plugin and can't get it to work. Any word I type in get the error "error: No translation found...". I invoke by typing gt and then a word. i.e. gt hello I get the error message. The plugin is in C:\Program Files (x86)\FindAndRunRobot\Plugins\Google_Translate and has the following files in the folder. Appreciate any help.
favicon.ico
FScript.cfi
FScript.dll
fscript.js
fscript.rtf
fsubscript.js
Google_Translate.dcupdate
icon.ico
options.xml
results.rtf
-
hi asrjcb
I dont know if this one works any more - check out this thread/post:
Since CZB's Google Translate script doesn't work anymore (because of the Google Api changes) I thought I'd make a script that loads the GoogleTranslate page in FARR with a given word.-verszipo
-
Got it. Too bad & thanks so much. I was going crazy.
-
In case you're interested, you can find my solution HERE (https://www.donationcoder.com/forum/index.php?topic=35033.0).
You need to have FARRSubScript installed but you should probably already have it installed.
In case you don't have it yet, you can get the FARRSubScript from CZB's pack from HERE (https://www.donationcoder.com/forum/index.php?topic=17153.0) (look at the "Requirements" area it has a link to the script).
-
Thanks so much for the help but I think the plugin is broke. I downloaded and installed both the CBZ's pack and FSubscript per the instructions and Google Translate still does not work and gives the same error "error: No translation found...".
-
Doesn't work any more, got "error: No translation found..."
-
Well i know one thing, and that is that the google translate script is more specific now on why it's failing.. (?)