support for emoji formatting
This commit is contained in:
parent
60012a12c1
commit
0491dee1f8
@ -3,6 +3,7 @@ const fs = require('fs');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const Util = require('../../Util.js');
|
||||
const { Emojis } = require('../../constants/index.js');
|
||||
|
||||
class LocaleLoader {
|
||||
|
||||
@ -29,6 +30,8 @@ class LocaleLoader {
|
||||
let string = this.languages[language][index];
|
||||
if (!string) return `< Missing Locale Index: ${language}.${index} >`;
|
||||
|
||||
for (const emoji of Object.keys(Emojis)) parameters[`emoji_${emoji}`] = Emojis[emoji];
|
||||
|
||||
for(const [ parameter, value ] of Object.entries(parameters)) {
|
||||
string = string.replace(new RegExp(Util.escapeRegex(`{${parameter.toLowerCase()}}`), 'giu'), value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user