Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » Applications created with U++ » Google Translator
Re: Google Translator [message #21580 is a reply to message #21565] Thu, 28 May 2009 10:10 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

cbpporter wrote on Wed, 27 May 2009 10:17

It is up to you to decide if you want to keep it in bazaar or just release on the forum. If you wish to put it in bazaar and you don't have write access to it, please pm Mirek and he may grant you the right.


I was released on the forum. and every time when I will change this I will release this.

I would like to put this in bazaar, in case if exist who interested in this!

Thank you for suggestion!
Re: Google Translator [message #21625 is a reply to message #21575] Sat, 30 May 2009 05:32 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Hello All!

I'm happy to put GoogleTranslator in Bazaar svn version.

If is any propouses I'm glad to add in GoogleTranslator!

Have a nice day!
Re: Google Translator [message #21698 is a reply to message #21625] Mon, 01 June 2009 12:13 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello tojocky

GoogleTranslator works well for me without proxy, but with proxy it does not.

The program waits for about 10 seconds moving the progress bar in:

	result_text = httpClient.ExecuteRedirect(HttpClient::DEFAULT_MAX_REDIRECT, 
						HttpClient::DEFAULT_RETRIES, _progress);


And after that result_text is filled with

Quote:

Error: 171.20.1.44:808: connecting to host timed out,
status: 0,
header:


The proxy address is the same I use in Firefox and IExplorer.
The real port used is 8080 instead of 808, but if I put it the progress bar moves fast some tenths of second and the message I get in result_text is

Quote:

Error:HTTP/1.1 407 Proxy Authenti


Perhaps this problem is not due to GoogleTranslator but U++ http client. I cannot answer about this.

Best regards
Koldo


Best regards
Iñaki
Re: Google Translator [message #21700 is a reply to message #21698] Mon, 01 June 2009 12:59 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Mon, 01 June 2009 13:13

Hello tojocky

GoogleTranslator works well for me without proxy, but with proxy it does not.
..............
Perhaps this problem is not due to GoogleTranslator but U++ http client. I cannot answer about this.

Best regards
Koldo


I use not default port and proxy address and everything works fine!

Add:
Maybe you didn't check option "Use HTTP proxy" on the connection tab in options?

[Updated on: Mon, 01 June 2009 13:03]

Report message to a moderator

Re: Google Translator [message #21704 is a reply to message #21700] Mon, 01 June 2009 13:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello tojocky

The "Use HTTP proxy" option is checked.

With
Quote:

GoogleTranslator works well for me without proxy, but with proxy it does not.
I meant that running the program in a site without proxy, it works well, but if I use it in a site with a proxy it does not and I get the symptoms I have reported.

Any ideas?

Best regards
Koldo


Best regards
Iñaki
Re: Google Translator [message #21705 is a reply to message #21704] Mon, 01 June 2009 15:20 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Mon, 01 June 2009 14:57

Hello tojocky

The "Use HTTP proxy" option is checked.
.............
Any ideas?

Best regards
Koldo


Maybe in proxy server setting is:
1. username and password. I didn't implemented yet. But if is need I will add for you!
2. filter by specific protocols (ex: Mozila, IE or other)

Over Ideas I have not.

Ion Lupascu (tojocky)
Re: Google Translator [message #21707 is a reply to message #21705] Mon, 01 June 2009 16:42 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Ion

I do not have any idea about proxy, but perhaps it is a matter of username and password. If you can implement it I will try it.

Best regards
Koldo


Best regards
Iñaki
Re: Google Translator [message #23847 is a reply to message #21707] Thu, 26 November 2009 10:48 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Mon, 01 June 2009 17:42

Hello Ion

I do not have any idea about proxy, but perhaps it is a matter of username and password. If you can implement it I will try it.

Best regards
Koldo


Hello Koldo,
Sorry for my delay.

I was finished with new release of GoogleTranslator.

I was attached the new release here. In evening I will upload in svn repository.

Please test user name and password. I didn't tested this.

Change log:

  • User name and password for proxy setting (in option form)
  • [Ctrl]+[C]+[C] shortcut works for linux too(thanks to Mirek). To show notify message of translatet text need to apply the patch from andrei_natanael(full address:http://www.ultimatepp.org/forum/index.php?t=msg& goto=23834&#msg_23823)
  • New languages for translate (total 80 languagies)
  • Translit method (non latin chars will write in latin chars).
  • Show translation without parsing. (option: "Do not parse translated text"). This option will show original translation text as "{"sentences":[{"trans":"écrivez ici le texte à traduire","orig":"write here text for translation","translit":""}],"src":"en"}"
  • Can translate from Unknown language.


[Updated on: Thu, 26 November 2009 10:51]

Report message to a moderator

Re: Google Translator [message #23850 is a reply to message #23847] Thu, 26 November 2009 14:21 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hello Ion,

thanks for the tool.
I have tried it in WinXP, compiled with MSC9.

I had to change declaration of 2nd function parameter of SetProxyAuth to String (it was int before).

What is not working correctly is translation for multi-line phrases. Translation always stops after first line.

Regards,
Matthias
Re: Google Translator [message #23857 is a reply to message #23850] Fri, 27 November 2009 09:53 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

masu wrote on Thu, 26 November 2009 15:21

Hello Ion,

thanks for the tool.
I have tried it in WinXP, compiled with MSC9.

I had to change declaration of 2nd function parameter of SetProxyAuth to String (it was int before).

What is not working correctly is translation for multi-line phrases. Translation always stops after first line.

Regards,
Matthias


Thank you Matthias for test.

I was attached the new version of GoogleTranslator with correction!
Can you test?

Regards,
Ion.

file deleted!

[Updated on: Fri, 27 November 2009 19:56]

Report message to a moderator

Re: Google Translator [message #23859 is a reply to message #23857] Fri, 27 November 2009 12:31 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Ion

I have tried it under a proxy and I get this:

Quote:

Error:HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
, status: 407, HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
, header: Via: 1.1 BNT44
Proxy-Authenticate: Negotiate
Proxy-Authenticate: Kerberos
Proxy-Authenticate: NTLM
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 4112


In configuration I have entered the same proxy data I have in Firefox, that works well.

Perhaps I can try something to try to solve this. Could you give me some advice ?

Best regards
Koldo


Best regards
Iñaki
Re: Google Translator [message #23860 is a reply to message #23859] Fri, 27 November 2009 13:30 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Fri, 27 November 2009 13:31

Hello Ion

I have tried it under a proxy and I get this:

Quote:

Error:HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
, status: 407, HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
, header: Via: 1.1 BNT44
Proxy-Authenticate: Negotiate
Proxy-Authenticate: Kerberos
Proxy-Authenticate: NTLM
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 4112


In configuration I have entered the same proxy data I have in Firefox, that works well.

Perhaps I can try something to try to solve this. Could you give me some advice ?

Best regards
Koldo


Did you check the option "Use HTTP proxy"?
regards, Ion
Re: Google Translator [message #23861 is a reply to message #23860] Fri, 27 November 2009 14:05 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hello Ion,

it works like a charm now, thanks !

BTW, I also have to use a proxy ...

Regards,
Matthias
Re: Google Translator [message #23862 is a reply to message #23860] Fri, 27 November 2009 14:16 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
tojocky wrote on Fri, 27 November 2009 13:30

koldo wrote on Fri, 27 November 2009 13:31

Hello Ion

I have tried it under a proxy and I get this:

Quote:

Error:HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
, status: 407, HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
, header: Via: 1.1 BNT44
Proxy-Authenticate: Negotiate
Proxy-Authenticate: Kerberos
Proxy-Authenticate: NTLM
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 4112


In configuration I have entered the same proxy data I have in Firefox, that works well.

Perhaps I can try something to try to solve this. Could you give me some advice ?

Best regards
Koldo


Did you check the option "Use HTTP proxy"?
regards, Ion



Hello Ion

Yes. I check "Use HTTP Proxy:" and "Use HTTP Proxy password:" and I fill "Address", "port", "Username" and "Password". This data is the same I use for Internet browser Firefox I use daily.

I have also debugged the program and it does what it seems it have to do. Any additional advice ?

Best regards
Koldo


Best regards
Iñaki
Re: Google Translator [message #23864 is a reply to message #23862] Fri, 27 November 2009 16:08 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Fri, 27 November 2009 15:16



Hello Ion

Yes. I check "Use HTTP Proxy:" and "Use HTTP Proxy password:" and I fill "Address", "port", "Username" and "Password". This data is the same I use for Internet browser Firefox I use daily.

I have also debugged the program and it does what it seems it have to do. Any additional advice ?

Best regards
Koldo


Hello Koldo,

Try this:
If it is web authorization, I thing that you need first login in Firefox, leave Firefox browser opened and try to translate with GoogleTranslator without option "Use HTTP Proxy password:".

Can you upload screenshots with your firefox proxy settings and user authentication?

Regards,
Ion.

P.S. I thing that your http proxy server do not filter by browser Agent from request packet data. Now the GoogleTranslator Agent is: "Ultimate++ HTTP clientUltimate++ HTTP client":
request << "Agent: " << Nvl(agent, "Ultimate++ HTTP client") << "\r\n";
Re: Google Translator [message #23865 is a reply to message #23864] Fri, 27 November 2009 19:53 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Hello All!

I was changed a little my Google Translator.

Change log:
- in option form when I do not check option "Use HTTP Proxy" set disable proxy address, port, username, password.

Any other suggestions are welcome!

New to do to do item:
- Set in option form available languages and possibility user add new language. To find needed language in all 80 languages is too boring.

regards,
Ion.

[Updated on: Fri, 27 November 2009 19:54]

Report message to a moderator

Re: Google Translator [message #23877 is a reply to message #23864] Mon, 30 November 2009 08:50 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Ion

No success doing this:
Quote:

Try this:
If it is web authorization, I thing that you need first login in Firefox, leave Firefox browser opened and try to translate with GoogleTranslator without option "Use HTTP Proxy password:".


I do not know what to do with this.

Quote:

P.S. I thing that your http proxy server do not filter by browser Agent from request packet data. Now the GoogleTranslator Agent is: "Ultimate++ HTTP clientUltimate++ HTTP client":
request << "Agent: " << Nvl(agent, "Ultimate++ HTTP client") << "\r\n";


Probably the problem does not come from Google Translator but from the U++ http support. Perhaps my proxy is tricky in any way so that Firefox is enough smart to pass it but not U++.

Best regards
Koldo


Best regards
Iñaki
Re: Google Translator [message #23885 is a reply to message #23877] Tue, 01 December 2009 08:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
While trying to compile to check the reported DocEdit bug:

u:\temp.src\googletranslator\GoogleTranslator.h(32) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversio

(password parameter needs to be String)

[Updated on: Tue, 01 December 2009 08:29]

Report message to a moderator

Re: Google Translator [message #23972 is a reply to message #23885] Sun, 13 December 2009 10:40 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

luzr wrote on Tue, 01 December 2009 09:27

While trying to compile to check the reported DocEdit bug:

u:\temp.src\googletranslator\GoogleTranslator.h(32) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversio

(password parameter needs to be String)

Thank you Mirek for found error.
Now I updated the latest version to svn! I tested your commend. it seems I already corrected this!
Re: Google Translator [message #24125 is a reply to message #23877] Sun, 27 December 2009 18:37 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

koldo wrote on Mon, 30 November 2009 09:50

Hello Ion
Probably the problem does not come from Google Translator but from the U++ http support. Perhaps my proxy is tricky in any way so that Firefox is enough smart to pass it but not U++.

Best regards
Koldo

Can you put screenshot of your firefox settings?
Previous Topic: Open Source Project
Next Topic: Distance - geodesic - Vincenty - very accurate
Goto Forum:
  


Current Time: Thu Mar 28 18:01:59 CET 2024

Total time taken to generate the page: 0.01524 seconds