Skip to content

Commit

Permalink
fix MyMemory request URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ghedo committed Oct 1, 2012
1 parent 7123fd7 commit 7dabc3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/DDG/Spice/Translate/MyMemory.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use DDG::Spice;
attribution github => ['https://github.com/ghedo', 'ghedo' ],
web => ['http://ghedini.me', 'Alessandro Ghedini'];

spice to => 'http://mymemory.translated.net/api/get?q=$2&langpair=$1';
spice from => '(.+)\/(.+)';
spice to => '"http://mymemory.translated.net/api/get?q=$3&langpair=$1|$2"';
spice from => '(.+)\/(.+)\/(.+)';
spice wrap_jsonp_callback => 1;

triggers start => '///***never trigger***///';
Expand Down
2 changes: 1 addition & 1 deletion share/spice/translate/basic/spice.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function ddg_spice_translate_basic(ir) {
if (words.split('%20').length > 1) {
base = '/js/spice/translate/my_memory/';

nrj(base + from + '|' + to + '/' + words);
nrj(base + from + '/' + to + '/' + words);
} else {
base = '/js/spice/translate/wordreference/';

Expand Down
2 changes: 1 addition & 1 deletion share/spice/translate/detect/spice.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function ddg_spice_translate_detect(ir) {
if (words.split('%20').length > 1) {
base = '/js/spice/translate/my_memory/';

nrj(base + from + '|' + to + '/' + words);
nrj(base + from + '/' + to + '/' + words);
} else {
base = '/js/spice/translate/wordreference/';

Expand Down

0 comments on commit 7dabc3f

Please sign in to comment.