Enabled i18n-js fallbacks

This commit is contained in:
Randy Morgan 2012-11-23 13:53:07 +09:00
parent 2bc30495b5
commit f176a2a77f
6 changed files with 20 additions and 9 deletions

View File

@ -1,6 +1,7 @@
$: << 'lib' $: << 'lib'
require 'rake-pipeline-web-filters' require 'rake-pipeline-web-filters'
require 'rake-pipeline-i18n-filters'
require 'travis/assets' require 'travis/assets'
require 'compass' require 'compass'
@ -14,9 +15,9 @@ assets.update_version
output 'assets/scripts/config' output 'assets/scripts/config'
input 'locales' do input 'locales' do
match '**/*.yml' do match '**/*.yml' do
ember_i18n :use_i18n_js => true i18n_js { 'locales.js' }
end end
concat 'locales.js' #concat 'locales.js'
end end
output 'public/scripts' output 'public/scripts'

View File

@ -9,7 +9,8 @@ gem 'sinatra'
group :assets do group :assets do
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline' gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
gem 'rake-pipeline-web-filters', github: 'randym/rake-pipeline-web-filters' gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'
gem 'rake-pipeline-i18n-filters', path: '~/rake-pipeline-i18n-filters'
gem 'coffee-script' gem 'coffee-script'
gem 'compass' gem 'compass'
gem 'tilt' gem 'tilt'

View File

@ -8,13 +8,20 @@ GIT
thor thor
GIT GIT
remote: git://github.com/randym/rake-pipeline-web-filters.git remote: git://github.com/wycats/rake-pipeline-web-filters.git
revision: 3cfd2df8c2edabb1bbd039394587460a22fae1af revision: 1a6dc173776b188836aa2ce2ac35b61c7f7daafe
specs: specs:
rake-pipeline-web-filters (0.6.0) rake-pipeline-web-filters (0.6.0)
rack rack
rake-pipeline (~> 0.6) rake-pipeline (~> 0.6)
PATH
remote: ~/rake-pipeline-i18n-filters
specs:
rake-pipeline-i18n-filters (0.0.1)
rack
rake-pipeline (~> 0.6)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
@ -117,6 +124,7 @@ DEPENDENCIES
rack-ssl (~> 1.3) rack-ssl (~> 1.3)
rake (~> 0.9.2) rake (~> 0.9.2)
rake-pipeline! rake-pipeline!
rake-pipeline-i18n-filters!
rake-pipeline-web-filters! rake-pipeline-web-filters!
rb-fsevent (~> 0.9.1) rb-fsevent (~> 0.9.1)
rerun rerun

File diff suppressed because one or more lines are too long

View File

@ -47,7 +47,6 @@ if window.history.state == undefined
setLocale: (locale) -> setLocale: (locale) ->
return unless locale return unless locale
I18n.locale = locale I18n.locale = locale
localStorage.setItem('travis.locale', locale) localStorage.setItem('travis.locale', locale)
@ -57,6 +56,7 @@ if window.history.state == undefined
run: (attrs) -> run: (attrs) ->
location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!' location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!'
I18n.fallbacks = true
@setLocale localStorage.getItem('travis.locale') || 'en' @setLocale localStorage.getItem('travis.locale') || 'en'
Ember.run.next this, -> Ember.run.next this, ->

View File

@ -147,6 +147,6 @@ en:
total_builds: Total Builds total_builds: Total Builds
total_projects: Total Projects/Repositories total_projects: Total Projects/Repositories
user: user:
failure: failure:
signed_out: signed_out:
workers: Workers workers: Workers