Strip escaped newlines from edtext dialogues

This commit is contained in:
tdixon 2017-05-07 18:57:41 -03:00
parent 96f1c43ac1
commit 7fc5346bae

View file

@ -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) +