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
are indeed passed through to the i18n.configure() method, but still I can't actually use the objectNotation options. I just get my keys returned back to me.
Okay I have worked out what's wrong. The objectNotation feature was added to i18n-node in version 0.5.0 about a week ago, and the version in Sails.js's package.js is 0.4.1
As discussed in this Stackoverflow question, I can't work out how to get Sails'
i18n
to support anything other than the most trivial ofi18n
examples.I've had a look through the code, and, looking at lines 54 to 59 of sails/lib/hooks/i18n/index.js the configuration I set in my projects own
config/i18n.js
file, namely:are indeed passed through to the
i18n.configure()
method, but still I can't actually use theobjectNotation
options. I just get my keys returned back to me.I've generated a new
Sails
project that demonstrates this error. See https://github.com/davesag/sails-i18n-exampleIn view
homepage.jade
In
config/i18n.js
https://github.com/davesag/sails-i18n-example/blob/master/config/i18n.js#L17 shows that the
objectNotation: true
flag is set.In
config/locales/en.json
https://github.com/davesag/sails-i18n-example/blob/master/config/locales/en.json#L4 shows the expected translation.
The text was updated successfully, but these errors were encountered: