Closed randym closed 11 years ago
+1. I did this in Iridium. I didn't even know this PR requested.
I am in favor of having a i18n convention on EmberJS, otherwise each APP will implement it on different ways. I have been using a similar approach with rake-pipeline and i18n.
@twinturbo How does this compare to what you did? Might be nice to have something in RPWF.
@wagenet see source here: https://github.com/radiumsoftware/iridium/blob/master/lib/rake-pipeline-web-filters/i18n_filter.rb
match "locales/**/*.ym" do
i18n "locales.js"
end
Very simple filter and straight to the point. The destination
could be configurable (something other than I18n.translations
).
While I have no basis to comment on the Worth noting that Ember.STRING and Ember.string.loc output was a bit of a PITA. I' be very happy to see EmberJS incorporate i18n-js from fnando as it would greatly simplify this filter.
moving this into a separate gem.
Hmm. This can be in the gem. I think some sort of functionality like this is useful. I'll just try out irdiums implementation in a pr On Nov 23, 2012 6:06 AM, "Randy Morgan (@morgan_randy)" < notifications@github.com> wrote:
moving this into a separate gem.
— Reply to this email directly or view it on GitHubhttps://github.com/wycats/rake-pipeline-web-filters/pull/38#issuecomment-10649932.
rake-pipeline-i18n-filters released last week. https://rubygems.org/gems/rake-pipeline-i18n-filters
Came across a need for this in travis-ci. If you think it would be useful for the rest of the community please feel free to merge.
It takes yml files and parses them out into js using syntax appropriate for Ember.STRINGS (for using loc) or i18n.translations (for using i18n-js) based on a use_i18n_js option.