Add back missing handling of newline characters in translation files using C++11 regular expression support.
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <regex>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@@ -135,6 +136,9 @@ bool MultiLangMgr::load (const Glib::ustring& fname, MultiLangMgr* fallbackMgr)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const std::regex newline ("\\\\n");
|
||||||
|
value = std::regex_replace (value, newline, "\n");
|
||||||
|
|
||||||
translations.emplace (key, value);
|
translations.emplace (key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user