This commit is contained in:
+6
-4
@@ -23,9 +23,11 @@ export default class Lang {
|
||||
}
|
||||
|
||||
parse(message = '') {
|
||||
if(this.prefix && typeof message === 'string' && message.startsWith(this.prefix)) {
|
||||
return this.get(message.slice(this.prefix.length));
|
||||
}
|
||||
return message;
|
||||
let sLangKey = this.getLangKey(message);
|
||||
return (sLangKey != '')?this.get(sLangKey):message;
|
||||
}
|
||||
|
||||
getLangKey(message = '') {
|
||||
return (this.prefix && typeof message === 'string' && message.startsWith(this.prefix))?message.slice(this.prefix.length):'';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user