app/assets/javascripts/autotolk/locales.js.coffee in autotolk-0.1.3 vs app/assets/javascripts/autotolk/locales.js.coffee in autotolk-0.1.4
- old
+ new
@@ -15,8 +15,8 @@
if $translationArea.innerText == '' && autotranslatingClicked == 1
translate(original, to_lang, $translationArea)
translate = (original, to, textarea) ->
$.get '/translate', {original: original, to: to}, ((response) ->
- if response.status == 200
+ if response.status >= 200 && response.status < 400
textarea.innerText = response.translated
), 'json'