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
@aexmachina we're still sorting out some of the details, and some of it might end up in a new project that uses i18nliner-handlebars as its foundation (maybe i18nliner-ember?). In the meantime it should be possible to make it work with a little bit of duct tape...
You'll need to hook into ember-cli's handlebars compilation so that i18nliner's pre-processor can do its thing. I haven't dug into it too much to know where, but the gist of it is you need to give EmberHandlebars a pre-processed AST rather than the source string, e.g.
// somewhere inside ember-cli / ember-template-compiler ... assuming we have a `source` var varHandlebars=require('handlebars');varast=Handlebars.parse(source);varPreProcessor=require('i18nliner-handlebars/dist/lib/pre_processor')['default'];PreProcessor.process(ast);varresult=EmberHandlebars.precompile(ast).toString();// do whatever you usually do with result
i18nliner handlebars helpers for ember ... see here for something that ought to work.
So yeah, it takes a little bit to wire everything up, but it's not too terrible. I'm using i18nliner in three different ember apps atm, but none of them uses ember-cli (one broccoli, one grunt, and one franken-guard). We'll definitely be improving this in the near term, so watch this space. I'll post some updates and close this ticket once the plan solidifies a bit more.
Happy to help out, just want to know how I should approach it.
The text was updated successfully, but these errors were encountered: