mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Strip escaped newlines from edtext dialogues
This commit is contained in:
parent
96f1c43ac1
commit
7fc5346bae
1 changed files with 5 additions and 0 deletions
|
|
@ -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) +
|
||||
|
|
|
|||
Loading…
Reference in a new issue