From 7fc5346bae68e471e601b163a19f7738b33f1936 Mon Sep 17 00:00:00 2001 From: tdixon Date: Sun, 7 May 2017 18:57:41 -0300 Subject: [PATCH] Strip escaped newlines from edtext dialogues --- scripts/EdText.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/EdText.rb b/scripts/EdText.rb index 0a15263..fb4c87f 100644 --- a/scripts/EdText.rb +++ b/scripts/EdText.rb @@ -25,7 +25,12 @@ module EdText sleep 0.2 end result = nil + # so here, we strip unescaped newlines from the untranslated text + # for the translator to find the right string. Then from the + # translated text, we replace escaped newlines with empty strings. + # yeah. text = Language.tr(text.to_s.gsub(/\s*\n\s*/, " ").strip) + .to_s.gsub(/\s*\\n\s*/, "").strip thread = Thread.new do result = Oneshot.msgbox(type, text .gsub("\\p", $game_oneshot.player_name) +