ports/131305: Update to misc/translate to make it work
Pieter de Boer
pieter at thedarkside.nl
Mon Feb 2 20:00:12 UTC 2009
>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:
More information about the freebsd-ports-bugs
mailing list