forked from mia/Aegisub
Replace newlines with \N when modifying text via the translation assistant. Updates #1414.
Originally committed to SVN as r6485.
This commit is contained in:
parent
b1930f06e5
commit
7f513e675d
1 changed files with 5 additions and 1 deletions
|
@ -239,7 +239,11 @@ void DialogTranslation::UpdateDisplay() {
|
|||
}
|
||||
|
||||
void DialogTranslation::Commit(bool next) {
|
||||
*active_line->Blocks[cur_block] = AssDialogueBlockPlain(translated_text->GetValue());
|
||||
wxString new_value = translated_text->GetValue();
|
||||
new_value.Replace("\r\n", "\\N");
|
||||
new_value.Replace("\r", "\\N");
|
||||
new_value.Replace("\n", "\\N");
|
||||
*active_line->Blocks[cur_block] = AssDialogueBlockPlain(new_value);
|
||||
active_line->UpdateText();
|
||||
c->ass->Commit(_("translation assistant"), AssFile::COMMIT_DIAG_TEXT);
|
||||
|
||||
|
|
Loading…
Reference in a new issue