Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Feb 2009 19:51:17 GMT
From:      Pieter de Boer <pieter@thedarkside.nl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/131305: Update to misc/translate to make it work
Message-ID:  <200902021951.n12JpHBY030455@www.freebsd.org>
Resent-Message-ID: <200902022000.n12K0Bso099560@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         131305
>Category:       ports
>Synopsis:       Update to misc/translate to make it work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 02 20:00:11 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Pieter de Boer
>Release:        Irrelevant
>Organization:
>Environment:
Irrelevant
>Description:
misc/translate stopped working because Babelfish is now hosted by Yahoo instead of Altavista.
>How-To-Repeat:
Try to use misc/translate.
>Fix:
Apply the patch.

Patch attached with submission follows:

--- translate.orig	Mon Oct 16 13:04:47 2006
+++ translate	Mon Feb  2 20:42:33 2009
@@ -94,14 +94,14 @@
 my $convert_text = $ARGV[0];
 
 my $request=POST
-'http://babelfish.altavista.com/babelfish/tr',[doit=>"done",intl=>"1",tt=>"urltext",Submit=>"Translate",lp=>$convert_code,urltext=>$convert_text];
+'http://babelfish.yahoo.com/translate_txt',[ei=>"UTF-8",doit=>"done",fr=>"bf-home",intl=>"1",tt=>"urltext",btnTrTxt=>"Translate",lp=>$convert_code,trtext=>$convert_text];
 $request->content_type('application/x-www-form-urlencoded');
 my $do_browser=LWP::UserAgent->new;
 my $answer=$do_browser->request($request)->content;
 
 # let us see these results
 my $content = $answer;
-if($content =~ /<Div style=padding:10px;.*?>(.*?)<\/div>/si) { 
+if($content =~ /<div style="padding:0.6em;".*?>(.*?)<\/div>/si) { 
     $lort = $1; 
     $lort =~ s/\n//g;
 }


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902021951.n12JpHBY030455>