Conversation
https://github.com/reactivepixel/Max-Bot into multiLang_Hess Updated code for multiLang_Hess
|
Ready for Review and Release 3! |
|
en, es, and al are all working with every command if it's in the scope add a check for the user's defined LANGUAGE in the .evn that it is an available option. Other than that your good to merge! 👍 |
mattpezzente
left a comment
There was a problem hiding this comment.
Make sure to implement the default fallback in-case the LANGUAGE is not set int he .env, or incase an incorrect LANGUAGE is set.
bot/controllers/channels.js
Outdated
| const msg = require('../locale/messages.json'); | ||
|
|
||
| const LANGUAGE = process.env.LANGUAGE; | ||
| const lang = process.env.LANGUAGE; |
There was a problem hiding this comment.
Make a provision for setting the default language to en, incase no language is set in the .env.
bot/controllers/verify.js
Outdated
| return msg.verify.verifyEmailDenied[lang]; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Make sure to default all languages to en. If none are set, or if an incorrect langauge is set, all messages appear as underfined in Discord.
|
Besides the changes requested above overall looks good! |
|
Changes have been made default Language is now en! |
|
Looks like CircleCI found some ESLint Issues. |
currently uses English(en), Spanish(es), and Alien(al).
.env example: LANGUAGE=en
messages are located in bot/locale/messages.json sorted by controllers.