From d85ce7be7dd2d59603d6ec6b3f8b1bf2f208d2b2 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 28 Jan 2016 10:35:59 +0100 Subject: fix exception --- server.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server.rb b/server.rb index 33d5854..3d24124 100755 --- a/server.rb +++ b/server.rb @@ -299,9 +299,7 @@ post '/next' do # (receive post-edit, update models), send next translation update_database end source = $db['source_segments'][$db['progress']] - source = source.strip.lstrip raw_source = $db['raw_source_segments'][$db['progress']] - raw_source = raw_source.strip.lstrip if !source # input is done logmsg :server, "end of input, sending 'fin'" $lock = false @@ -323,8 +321,11 @@ post '/next' do # (receive post-edit, update models), send next translation # 3. translate # 4. detokenize # 5. reply - # 0. no mt? - if NOMT + + source = source.strip.lstrip + raw_source = raw_source.strip.lstrip + + if NOMT # 0. no mt? $lock = false logmsg :server, "no mt" obj = Hash.new -- cgit v1.2.3