forked from Galactic/galactic-bot
OS bs
This commit is contained in:
parent
793f7a604c
commit
a1b59a5ef2
@ -50,6 +50,7 @@ class LocaleLoader {
|
|||||||
|
|
||||||
loadFile(file) {
|
loadFile(file) {
|
||||||
|
|
||||||
|
if (process.platform === 'linux') file = file.replaceAll('\r', '');
|
||||||
const lines = file.split('\n');
|
const lines = file.split('\n');
|
||||||
const parsed = {};
|
const parsed = {};
|
||||||
|
|
||||||
@ -74,9 +75,9 @@ class LocaleLoader {
|
|||||||
}
|
}
|
||||||
parsed[matched] = text;
|
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');
|
parsed[key] = value.replace(/^(\r)|(\r){1,}$/gu, '').replace(/\r/gu, '\n');
|
||||||
console.log(String.raw`${value}`);
|
// console.log(String.raw`${value}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parsed;
|
return parsed;
|
||||||
|
Loading…
Reference in New Issue
Block a user