Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add i18n framework #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BigFab
Copy link
Contributor

@BigFab BigFab commented Dec 28, 2018

Summary

Internationalization of emails has been introduced in Hydrophone through the use of static HTML files that contain placeholders for localized content to be filled at runtime.
This content is based on the audience language. The audience language follows a logic based on Tidepool user language, browser language and English as a default.

As a matter of fact, the previous logic of having in-code templates (ie in .go files) for emails has been moved to a logic of having templates generated from static files residing on the file system. A potential evolution can be to have files hosted on a S3 bucket (after pitfall described below is solved).

Pitfall

Following the previous logic of having all the templates in memory when the API service is starting, this first version of emails based on HTML templates has the same pitfall: it needs a service restart to take changes in the HTML files into consideration.

Details

For more details, please check docs/README

@pazaan
Copy link
Contributor

pazaan commented Jan 3, 2019

Thanks for the PR @BigFab! Given that it's quite a big diff, we're going to defer review of this PR until we evaluate our overall messaging options once we've moved to OAuth.
Given that you have your own repo, this means that you should still be able to use this in your own deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants