Skip to content

Commit

Permalink
Added Site Setting to change locale.
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Feb 28, 2013
1 parent e37c7f1 commit 628927a
Show file tree
Hide file tree
Showing 23 changed files with 640 additions and 97 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gem 'fastimage'
gem 'fog', require: false
gem 'has_ip_address'
gem 'hiredis'
gem 'i18n-js'

# note: for image_optim to correctly work you need
# sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush
gem 'image_optim'
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ GEM
hiredis (0.4.5)
httpauth (0.2.0)
i18n (0.6.1)
i18n-js (2.1.2)
i18n
image_optim (0.7.2)
fspath (~> 2.0.3)
image_size (~> 1.1)
Expand Down Expand Up @@ -479,7 +477,6 @@ DEPENDENCIES
guard-spork
has_ip_address
hiredis
i18n-js
image_optim
jasminerice
jquery-rails
Expand Down
5 changes: 0 additions & 5 deletions app/assets/javascripts/application.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

// The rest of the externals
//= require_tree ./external
//= require i18n

// The following needs to go right after including i18n, because other scripts
// below require correctly set locale already
//= require init_locale

//= require ./discourse/helpers/i18n_helpers
//= require ./discourse
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/init_locale.js

This file was deleted.

3 changes: 2 additions & 1 deletion app/assets/javascripts/locales/en.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
//= depend_on 'client.en.yml'
<%= JsLocaleHelper.output_locale(:en); %>
//= require locales/i18n
<%= JsLocaleHelper.output_locale(:en) %>
3 changes: 2 additions & 1 deletion app/assets/javascripts/locales/fr.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
//= depend_on 'client.fr.yml'
<%= JsLocaleHelper.output_locale(:fr); %>
//= require locales/i18n
<%= JsLocaleHelper.output_locale(:fr) %>
Loading

0 comments on commit 628927a

Please sign in to comment.