diff options
author | Patrick Simianer <p@simianer.de> | 2016-01-28 10:35:59 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-01-28 10:35:59 +0100 |
commit | d85ce7be7dd2d59603d6ec6b3f8b1bf2f208d2b2 (patch) | |
tree | fc0b6c4878e279b8a01ff91cb2faef46c047ab10 /server.rb | |
parent | b8eda88fb64f2e0993a8409cb5f40f0cd562703d (diff) |
fix exception
Diffstat (limited to 'server.rb')
-rwxr-xr-x | server.rb | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |