Add back missing handling of newline characters in translation files using C++11 regular expression support.

This commit is contained in:
Adam Reichold
2016-01-11 23:09:26 +01:00
parent 255ba25164
commit 8a86094198

View File

@@ -19,6 +19,7 @@
#include "multilangmgr.h"
#include <fstream>
#include <regex>
#ifdef WIN32
#include <windows.h>
@@ -135,6 +136,9 @@ bool MultiLangMgr::load (const Glib::ustring& fname, MultiLangMgr* fallbackMgr)
continue;
}
static const std::regex newline ("\\\\n");
value = std::regex_replace (value, newline, "\n");
translations.emplace (key, value);
}