You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These tags compile all our Handlebars templates through the localization system before registering them as partials within the page
How I envision this working:
Use jquery.i18n -- convert the current locale files into that "banana" format
Register the localization function as a Handlebars helper, and replace the Django localization calls with it
Store the locale in localStorage (to emulate what Django's doing, which is, I believe, using a session)
On locale change, dynamically grab the new banana file and either send out some "rerender" signal to all templates or (easier) just refresh the page
Potential issue: We take advantage of our two-step templating process by "localizing" strings that themselves contain Handlebars template syntax (for example). There's probably a hacky way to emulate this on the client-side, but it's really not a good way to localize and maybe we should just fix it as part of this change.
The text was updated successfully, but these errors were encountered:
@goldpbear I don't think this is done? Simply using the multiple index.html copies wasn't what I had in mind. I think we can de-prioritize this a bit, though, because we've found a workaround.
@zmbc -- ah right, sorry, I got in an issue-closing mood after merging the static site. Agreed there is more we can do to improve localization as detailed in this issue. Reopening.
(Part of #655)
Notes (for myself and others):
How I envision this working:
localStorage
(to emulate what Django's doing, which is, I believe, using a session)Potential issue: We take advantage of our two-step templating process by "localizing" strings that themselves contain Handlebars template syntax (for example). There's probably a hacky way to emulate this on the client-side, but it's really not a good way to localize and maybe we should just fix it as part of this change.
The text was updated successfully, but these errors were encountered: