Skip to content

Resolve "[tech task] extract default "english mode""

aguestuser requested to merge 78-extract-default-english-mode into master

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!

side-effects:

  • various refactors, including:
    • only returning commandResult from processCommand (not a commandResult/dispatchable tuple!)
    • adding a proper senderType enum and using it in classifySender instead of boolean flags
    • finally cleaning up dispatcher/messenger#format (yay!)
    • making constant refs terser in dispacher/messenger

Merge request reports