Resolve "[tech task] extract default "english mode""
Closes #78 (closed)
changes:
- add ability to store languages on user subscriptions
- create an env-var-configurable default language for users without a stored langauge
- (set that env var to "EN" for the team-friendo signalboost instance)
- extract all current messages to
messages/EN
- add ability to dispatch on language preferences when sending message responses
result:
- since all current users have
EN
stored as their default language, dispatcher will always choose to send them english messages - however, when we play #75 (closed) , it will be trivially easy to
- (1) add a new language to
app/constants/languages
- (2) add a new file to
app/dispatcher/messages/ES
- and with that: enable spanish-language support!
- (1) add a new language to
side-effects:
- various refactors, including:
- only returning
commandResult
fromprocessCommand
(not acommandResult/dispatchable
tuple!) - adding a proper
senderType
enum and using it inclassifySender
instead of boolean flags - finally cleaning up
dispatcher/messenger#format
(yay!) - making constant refs terser in
dispacher/messenger
- only returning