funktionswerk / hapi-i18n

Translation module for hapi based on mashpie's i18n module
MIT License
39 stars 22 forks source link

Fix: Add i18n object in `onRequest` #27

Closed rluba closed 5 years ago

rluba commented 5 years ago

… to ensure that it’s available in onPreResponse in case no route was found.

kaywolter commented 5 years ago

Hi and thanks for your contribution. You commit message states that you added i18n in "onRequest" extension point but the diff shows another "onPreAuth" request extension. Is this intended? Can you please add a test case that covers your fix?

rluba commented 5 years ago

Hi @kaywolter,

thank you. That was a real blunder of mine. We’ve had this fix in production for years and I made a mistake when porting it to the current master of hapi-i18n.

I’ll add a test as well to demonstrate the issue.

kaywolter commented 5 years ago

Thanks a lot, looks good now :)

kaywolter commented 5 years ago

I released new version 2.1.2 with your fix.