summaryrefslogtreecommitdiff
path: root/server.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-01-28 10:35:59 +0100
committerPatrick Simianer <p@simianer.de>2016-01-28 10:35:59 +0100
commitd85ce7be7dd2d59603d6ec6b3f8b1bf2f208d2b2 (patch)
treefc0b6c4878e279b8a01ff91cb2faef46c047ab10 /server.rb
parentb8eda88fb64f2e0993a8409cb5f40f0cd562703d (diff)
fix exception
Diffstat (limited to 'server.rb')
-rwxr-xr-xserver.rb9
1 files 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