locale parsing fixes for linux

This commit is contained in:
nolan 2020-07-29 12:21:58 -07:00
parent 02b439bae2
commit bbfd575983
4 changed files with 9 additions and 6 deletions

View File

@ -74,11 +74,13 @@ class LocaleLoader {
continue;
}
}
parsed[matched] = text;
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}`);
for(const [key, value] of Object.entries(parsed)) {
let text = process.platform === 'win32' ? value.replace(/^(\r)|(\r){1,}$/gu, '').replace(/\r/gu, '\n'): value;
if(process.platform === 'linux') text = text.trim();
parsed[key] = text;
}
//console.log(parsed);

View File

@ -6,8 +6,7 @@ class HelpCommand extends Command {
super(client, {
name: 'help',
module: 'information',
disabled: true //REMOVE THIS ONCE DONE
module: 'information'
});
this.client = client;

View File

@ -1,3 +1,5 @@
const { stripIndents } = require('common-tags');
const Component = require('./Component.js');
class Setting extends Component {

View File

@ -228,7 +228,7 @@ class ModerationManager {
infraction: dictionary.present,
targetType: `${targetType}${data.targets.length === 1 ? '' : 's'}`,
target: data.targets.map((t) => `**${Util.escapeMarkdown(t)}**`).join(' '),
reason: message.format(data.reason).trim()
reason: message.format(data.reason)
})}`;
(type === original && !success) //eslint-disable-line
? string = `${str}\n${string}`