Bug#786431: jessie-pu: package translate-shell/0.8.21-1
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu
The Google API has changed which renders the package non-functional.
The proposed upload to stable-proposed-updates cherry-picks the fix
from upstream git. Attached is a debdiff with the proposed upload.
Please confirm that I should do this upload.
Kind regards and thanks for working for the Debian release
Andreas.
-- System Information:
Debian Release: 8.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru translate-shell-0.8.21/debian/changelog translate-shell-0.8.21/debian/changelog
--- translate-shell-0.8.21/debian/changelog 2014-09-22 15:59:03.000000000 +0200
+++ translate-shell-0.8.21/debian/changelog 2015-05-21 18:13:46.000000000 +0200
@@ -1,3 +1,10 @@
+translate-shell (0.8.21-2) stable-proposed-updates; urgency=medium
+
+ * switch to new Google Translate API
+ Closes: #782811
+
+ -- Andreas Tille <tille@debian.org> Thu, 21 May 2015 17:48:14 +0200
+
translate-shell (0.8.21-1) unstable; urgency=medium
* New upstream version
diff -Nru translate-shell-0.8.21/debian/patches/0001_switch_to_new_Google_Translate_API.patch translate-shell-0.8.21/debian/patches/0001_switch_to_new_Google_Translate_API.patch
--- translate-shell-0.8.21/debian/patches/0001_switch_to_new_Google_Translate_API.patch 1970-01-01 01:00:00.000000000 +0100
+++ translate-shell-0.8.21/debian/patches/0001_switch_to_new_Google_Translate_API.patch 2015-05-21 18:13:46.000000000 +0200
@@ -0,0 +1,34 @@
+From 8354bbe738419d4b1d6ae00d125fb348f76b692d Mon Sep 17 00:00:00 2001
+From: Mort Yao <mort.yao@gmail.com>
+Date: Wed, 8 Apr 2015 11:28:48 +0800
+Subject: [PATCH] switch to new Google Translate API * fix #45
+
+---
+ include/Translate.awk | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/include/Translate.awk
++++ b/include/Translate.awk
+@@ -49,9 +49,10 @@ function postprocess(text) {
+
+ # Send an HTTP request and get response from Google Translate.
+ function getResponse(text, sl, tl, hl, content, url) {
+- url = HttpPathPrefix "/translate_a/t?client=t" \
+- "&ie=UTF-8&oe=UTF-8" \
+- "&text=" preprocess(text) "&sl=" sl "&tl=" tl "&hl=" hl
++ url = HttpPathPrefix "/translate_a/single?client=t" \
++ "&ie=UTF-8&oe=UTF-8" \
++ "&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&dt=at" \
++ "&q=" preprocess(text) "&sl=" sl "&tl=" tl "&hl=" hl
+
+ print "GET " url " HTTP/1.1\n" \
+ "Host: " HttpHost "\n" \
+@@ -106,7 +107,7 @@ function getTranslation(text, sl, tl, hl
+
+ # Debug mode
+ if (Option["debug"]) {
+- d(sprintf("content='%s'", content))
++ d(content)
+ da(tokens, "tokens[%s]='%s'")
+ da(ast, "ast[%s]='%s'")
+ }
diff -Nru translate-shell-0.8.21/debian/patches/series translate-shell-0.8.21/debian/patches/series
--- translate-shell-0.8.21/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ translate-shell-0.8.21/debian/patches/series 2015-05-21 18:13:46.000000000 +0200
@@ -0,0 +1 @@
+0001_switch_to_new_Google_Translate_API.patch
Reply to: