This commit is contained in:
Erik 2020-07-25 12:41:21 +03:00
parent 793f7a604c
commit a1b59a5ef2

View File

@ -50,6 +50,7 @@ class LocaleLoader {
loadFile(file) {
if (process.platform === 'linux') file = file.replaceAll('\r', '');
const lines = file.split('\n');
const parsed = {};
@ -74,9 +75,9 @@ class LocaleLoader {
}
parsed[matched] = text;
/*if (process.platform === 'win32')*/ for (const [key, value] of Object.entries(parsed)) {
if (process.platform === 'win32') for (const [key, value] of Object.entries(parsed)) {
parsed[key] = value.replace(/^(\r)|(\r){1,}$/gu, '').replace(/\r/gu, '\n');
console.log(String.raw`${value}`);
// console.log(String.raw`${value}`);
}
return parsed;