jovo-framework icon indicating copy to clipboard operation
jovo-framework copied to clipboard

❇️ Add event.$t middleware

Open rmtuckerphx opened this issue 1 year ago • 3 comments

Proposed Changes

Add event.$t middleware to provide an easy way to listen to and track analytics on translation keys.

Types of Changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] My code follows the code style of this project
  • [x] My change requires a change to the documentation
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] All new and existing tests passed

rmtuckerphx avatar Aug 22 '22 16:08 rmtuckerphx

Let's have a conversation to see if this is possible without making there be an await this.$t(...)

rmtuckerphx avatar Aug 22 '22 16:08 rmtuckerphx

Thank you @rmtuckerphx! We'll take a look this week

jankoenig avatar Aug 30 '22 08:08 jankoenig

@jankoenig I added this to a local project by hacking the file in node_modules and it worked fine. TypeScript doesn't like the PR though.

rmtuckerphx avatar Aug 31 '22 01:08 rmtuckerphx