-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[fixes #3833] Take locale into account in views.render() #3889
Conversation
Hi @Josebaseba! It looks like your pull request title doesn’t quite conform to our guidelines. Please edit the title so that it starts with [proposal], [patch], [fixes #], or [implements #]. Once you've fixed it, post a comment below (e.g. "ok, fixed!") and we'll take a look! |
ok, fixed! |
Hi @Josebaseba! It looks like your pull request title doesn’t quite conform to our guidelines. Please edit the title so that it starts with [proposal], [patch], [fixes #], or [implements #]. Once you've fixed it, post a comment below (e.g. "ok, fixed!") and we'll take a look! |
Fixed this time? Please don't hate me sailsbot... I'm doing my best 😢 |
Hi @Josebaseba! It looks like your pull request title doesn’t quite conform to our guidelines. Please edit the title so that it starts with [proposal], [patch], [fixes #], or [implements #]. Once you've fixed it, post a comment below (e.g. "ok, fixed!") and we'll take a look! |
😢 😢 😢 |
@Josebaseba thanks! Will take a look asap (realistically later today or tomorrow morning) |
var Sails = require('../../../lib').constructor; | ||
var path = require('path'); | ||
|
||
describe('res.render() with i18n', function (){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Josebaseba minor thing: can we change the "describe" label to say sails.hooks.views.render()
instead of res.render
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Josebaseba would you change the label of the describe
and add an inline comment above the req.headers['accept-langua...
bit just to explain what/why it's doing for future reference?
Thanks again!
@mikermcneil ping! |
@Josebaseba thank you! |
@Josebaseba this is now included if you do |
And so on... Everything works perfectly! All the tests and all the pages/emails related with i18n 👍 Thanks @mikermcneil |
@Josebaseba Nice! Publishing momentarily (just waiting on one other verification re sockets since this 0.12.10 includes a couple of other changes) |
@Josebaseba :
|
uou! thanks @karsasmus, I'm gonna fix it right now 👍 |
(btw @Josebaseba if you get a chance, would you mind rebasing this on master?) |
[fixes #3833] Take locale into account in views.render()
Support locale as options, broken since v0.12.5
Complete info here / fixes: #3833
Tests added to this functionality too, with different languages and default values. Plase take a look if this is what you want 👍
Thanks guys