refinerycms-i18n 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +27 -9
- data/Gemfile +17 -7
- data/Rakefile +2 -0
- data/app/assets/images/refinery/icons/flags/ko.png +0 -0
- data/app/assets/images/refinery/icons/flags/{ua.png → uk.png} +0 -0
- data/lib/generators/refinery/i18n_generator.rb +2 -1
- data/lib/generators/refinery/templates/config/initializers/refinery/i18n.rb.erb +0 -2
- data/lib/refinery/i18n-filter.rb +4 -4
- data/lib/refinery/i18n.rb +10 -6
- data/lib/refinery/i18n/configuration.rb +10 -2
- data/lib/refinery/i18n/engine.rb +20 -18
- data/refinerycms-i18n.gemspec +8 -6
- data/script/rails +5 -0
- data/spec/{requests → features}/dashboard_locale_picker_spec.rb +2 -2
- data/spec/spec_helper.rb +20 -46
- data/spec/support/refinery/i18n/set_defaults.rb +17 -0
- metadata +25 -97
- data/config/locales/ar.yml +0 -124
- data/config/locales/bg.yml +0 -280
- data/config/locales/bn-IN.yml +0 -183
- data/config/locales/bs.yml +0 -117
- data/config/locales/ca.yml +0 -170
- data/config/locales/cs.rb +0 -168
- data/config/locales/cy.yml +0 -181
- data/config/locales/da.yml +0 -195
- data/config/locales/de-AT.yml +0 -154
- data/config/locales/de-CH.yml +0 -154
- data/config/locales/de.yml +0 -193
- data/config/locales/dsb.yml +0 -185
- data/config/locales/el.yml +0 -133
- data/config/locales/en-AU.yml +0 -180
- data/config/locales/en-GB.yml +0 -210
- data/config/locales/en-US.yml +0 -182
- data/config/locales/eo.yml +0 -182
- data/config/locales/es-AR.yml +0 -177
- data/config/locales/es-CO.yml +0 -179
- data/config/locales/es-MX.yml +0 -186
- data/config/locales/es-PE.yml +0 -124
- data/config/locales/es.yml +0 -285
- data/config/locales/et.yml +0 -187
- data/config/locales/eu.yml +0 -264
- data/config/locales/fa.yml +0 -143
- data/config/locales/fi.yml +0 -155
- data/config/locales/fr-CA.yml +0 -187
- data/config/locales/fr-CH.yml +0 -184
- data/config/locales/fr.yml +0 -182
- data/config/locales/fun/en-AU.rb +0 -105
- data/config/locales/fun/gibberish.rb +0 -109
- data/config/locales/fur.yml +0 -144
- data/config/locales/gl-ES.yml +0 -196
- data/config/locales/gsw-CH.yml +0 -182
- data/config/locales/he.yml +0 -106
- data/config/locales/hi-IN.yml +0 -181
- data/config/locales/hi.yml +0 -181
- data/config/locales/hr.yml +0 -119
- data/config/locales/hsb.yml +0 -193
- data/config/locales/hu.yml +0 -147
- data/config/locales/id.yml +0 -142
- data/config/locales/is.yml +0 -145
- data/config/locales/it.yml +0 -198
- data/config/locales/ja.yml +0 -191
- data/config/locales/ko.yml +0 -186
- data/config/locales/lo.yml +0 -204
- data/config/locales/lt.yml +0 -144
- data/config/locales/lv.yml +0 -181
- data/config/locales/mk.yml +0 -118
- data/config/locales/mn.yml +0 -159
- data/config/locales/nb.yml +0 -140
- data/config/locales/nl.yml +0 -186
- data/config/locales/nn.yml +0 -99
- data/config/locales/pl.yml +0 -193
- data/config/locales/pt-BR.yml +0 -208
- data/config/locales/pt-PT.yml +0 -190
- data/config/locales/rm.yml +0 -137
- data/config/locales/ro.yml +0 -155
- data/config/locales/ru.yml +0 -213
- data/config/locales/sk.yml +0 -195
- data/config/locales/sl.yml +0 -193
- data/config/locales/sr-Latn.yml +0 -119
- data/config/locales/sr.yml +0 -119
- data/config/locales/sv.yml +0 -244
- data/config/locales/sw.yml +0 -182
- data/config/locales/th.rb +0 -200
- data/config/locales/tr.yml +0 -142
- data/config/locales/uk.yml +0 -240
- data/config/locales/vi.yml +0 -201
- data/config/locales/zh-CN.yml +0 -210
- data/config/locales/zh-TW.yml +0 -210
- data/lib/gemspec.rb +0 -29
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9f3cc913b0e9ae54c7e114a610b2f7ba25c66ce7
|
4
|
+
data.tar.gz: a99c91f97d16ece099057864ccdfffe125da92f6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 38d9ace175d27ca988b29b2248994f1a986bd6f3a1f3aebf5001c39152bb1c27fcad762fd01bd6279d308ef7489453db7c88792cb7c339cfb2c09448038e2316
|
7
|
+
data.tar.gz: 3070b164f87a116dc689bd2fe9da46042885b0dc20cff7d6ba175df0817a2c9fcb79b98246c97c6aff9af1c55fa4a8345eb6d5faaed072bab8c0f79edc59c17f
|
data/.travis.yml
CHANGED
@@ -1,17 +1,35 @@
|
|
1
|
+
language: ruby
|
2
|
+
before_install:
|
3
|
+
- 'if [[ "$TRAVIS_RUBY_VERSION" =~ "jruby" ]] ; then gem update --system ; fi'
|
4
|
+
- gem install bundler
|
5
|
+
install:
|
6
|
+
- bundle install --without development
|
1
7
|
before_script:
|
8
|
+
- "sh -e /etc/init.d/xvfb start"
|
2
9
|
- "bundle exec rake refinery:testing:dummy_app > /dev/null"
|
3
|
-
script:
|
10
|
+
script:
|
11
|
+
- "DISPLAY=:99.0 bundle exec rspec spec"
|
4
12
|
notifications:
|
5
|
-
email:
|
6
|
-
|
7
|
-
|
13
|
+
email: true
|
14
|
+
irc:
|
15
|
+
use_notice: true
|
16
|
+
skip_join: true
|
17
|
+
channels:
|
18
|
+
- "irc.freenode.org#refinerycms"
|
19
|
+
campfire:
|
20
|
+
on_success: always
|
21
|
+
on_failure: always
|
22
|
+
rooms:
|
23
|
+
- secure: "JaX+Ckvdd2wqL2bD6t8PHvMDBHxWBlCrkBKPcDKxV0t0DOwzzzwxMryVqcRi\nPsmM/zvmWFATDyRmivhNOpu4lRg9RytSroxZ9nkmbLDqjCyEAZ6tv4yZXME/\nPaxPwmfwgS9g8TKjj3lSWS7rEpqqg0D5S0XIfIHrj6KB6LUmFHc="
|
8
24
|
env:
|
9
|
-
- DB=
|
25
|
+
- DB=postgresql
|
26
|
+
- DB=mysql
|
10
27
|
matrix:
|
11
28
|
allow_failures:
|
12
|
-
- rvm: rbx
|
29
|
+
- rvm: rbx-19mode
|
30
|
+
- rvm: jruby-19mode
|
13
31
|
rvm:
|
14
|
-
-
|
32
|
+
- 2.0.0
|
15
33
|
- 1.9.3
|
16
|
-
- rbx
|
17
|
-
- jruby
|
34
|
+
- rbx-19mode
|
35
|
+
- jruby-19mode
|
data/Gemfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
source '
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
git 'git://github.com/
|
5
|
+
git 'git://github.com/refinery/refinerycms.git', :branch => 'master' do
|
6
6
|
gem 'refinerycms'
|
7
7
|
|
8
8
|
group :development, :test do
|
@@ -13,9 +13,22 @@ end
|
|
13
13
|
group :development, :test do
|
14
14
|
require 'rbconfig'
|
15
15
|
|
16
|
-
|
16
|
+
# Database Configuration
|
17
|
+
unless ENV['TRAVIS']
|
18
|
+
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
19
|
+
gem 'sqlite3', :platform => :ruby
|
20
|
+
end
|
17
21
|
|
18
|
-
|
22
|
+
if !ENV['TRAVIS'] || ENV['DB'] == 'mysql'
|
23
|
+
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
24
|
+
gem 'jdbc-mysql', '= 5.1.13', :platform => :jruby
|
25
|
+
gem 'mysql2', :platform => :ruby
|
26
|
+
end
|
27
|
+
|
28
|
+
if !ENV['TRAVIS'] || ENV['DB'] == 'postgresql'
|
29
|
+
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
30
|
+
gem 'pg', :platform => :ruby
|
31
|
+
end
|
19
32
|
|
20
33
|
platforms :mswin, :mingw do
|
21
34
|
gem 'win32console'
|
@@ -24,9 +37,6 @@ group :development, :test do
|
|
24
37
|
end
|
25
38
|
|
26
39
|
platforms :ruby do
|
27
|
-
gem 'spork', '0.9.0.rc9'
|
28
|
-
gem 'guard-spork'
|
29
|
-
|
30
40
|
unless ENV['TRAVIS']
|
31
41
|
if RbConfig::CONFIG['target_os'] =~ /darwin/i
|
32
42
|
gem 'rb-fsevent', '>= 0.3.9'
|
data/Rakefile
CHANGED
Binary file
|
File without changes
|
@@ -3,7 +3,8 @@ module Refinery
|
|
3
3
|
source_root File.expand_path('../templates', __FILE__)
|
4
4
|
|
5
5
|
def generate_refinery_i18n_initializer
|
6
|
-
template "config/initializers/refinery/i18n.rb.erb",
|
6
|
+
template "config/initializers/refinery/i18n.rb.erb",
|
7
|
+
File.join(destination_root, "config", "initializers", "refinery", "i18n.rb")
|
7
8
|
end
|
8
9
|
|
9
10
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
Refinery::I18n.configure do |config|
|
4
|
-
# config.enabled = <%= Refinery::I18n.config.enabled.inspect %>
|
5
|
-
|
6
4
|
# config.default_locale = <%= Refinery::I18n.config.default_locale.inspect %>
|
7
5
|
|
8
6
|
# config.current_locale = <%= Refinery::I18n.config.current_locale.inspect %>
|
data/lib/refinery/i18n-filter.rb
CHANGED
@@ -2,7 +2,7 @@ module RoutingFilter
|
|
2
2
|
class RefineryLocales < Filter
|
3
3
|
|
4
4
|
def around_recognize(path, env, &block)
|
5
|
-
if ::Refinery::I18n.
|
5
|
+
if ::Refinery::I18n.url_filter_enabled?
|
6
6
|
if path =~ %r{^/(#{::Refinery::I18n.locales.keys.join('|')})(/|$)}
|
7
7
|
path.sub! %r(^/(([a-zA-Z\-_])*)(?=/|$)) do
|
8
8
|
::I18n.locale = $1
|
@@ -15,7 +15,7 @@ module RoutingFilter
|
|
15
15
|
end
|
16
16
|
|
17
17
|
yield.tap do |params|
|
18
|
-
params[:locale] = ::I18n.locale
|
18
|
+
params[:locale] = ::I18n.locale
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -24,9 +24,9 @@ module RoutingFilter
|
|
24
24
|
|
25
25
|
yield.tap do |result|
|
26
26
|
result = result.is_a?(Array) ? result.first : result
|
27
|
-
if ::Refinery::I18n.
|
27
|
+
if ::Refinery::I18n.url_filter_enabled? and
|
28
28
|
locale != ::Refinery::I18n.default_frontend_locale and
|
29
|
-
result !~ %r{^/(
|
29
|
+
result !~ %r{^/(#{Refinery::Core.backend_route}|wymiframe)}
|
30
30
|
result.sub!(%r(^(http.?://[^/]*)?(.*))) { "#{$1}/#{locale}#{$2}" }
|
31
31
|
end
|
32
32
|
end
|
data/lib/refinery/i18n.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Encoding: UTF-8 <-- required, please leave this in.
|
2
2
|
require 'refinerycms-core'
|
3
3
|
require 'routing-filter'
|
4
|
+
require 'rails-i18n'
|
4
5
|
|
5
6
|
module Refinery
|
6
7
|
autoload :I18nGenerator, 'generators/refinery/i18n_generator'
|
@@ -14,7 +15,8 @@ module Refinery
|
|
14
15
|
:en => 'English',
|
15
16
|
:fr => 'Français',
|
16
17
|
:nl => 'Nederlands',
|
17
|
-
:
|
18
|
+
:pt => 'Português',
|
19
|
+
:'pt-BR' => 'Português brasileiro',
|
18
20
|
:da => 'Dansk',
|
19
21
|
:nb => 'Norsk Bokmål',
|
20
22
|
:sl => 'Slovenian',
|
@@ -25,14 +27,16 @@ module Refinery
|
|
25
27
|
:ru => 'Русский',
|
26
28
|
:sv => 'Svenska',
|
27
29
|
:pl => 'Polski',
|
28
|
-
:'zh-CN' => '
|
29
|
-
:'zh-TW' => '
|
30
|
+
:'zh-CN' => '简体中文',
|
31
|
+
:'zh-TW' => '繁體中文',
|
30
32
|
:el => 'Ελληνικά',
|
31
33
|
:rs => 'Srpski',
|
32
34
|
:cs => 'Česky',
|
33
35
|
:sk => 'Slovenský',
|
34
36
|
:ja => '日本語',
|
35
|
-
:bg => 'Български'
|
37
|
+
:bg => 'Български',
|
38
|
+
:hu => 'Hungarian',
|
39
|
+
:uk => 'Українська'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -46,8 +50,8 @@ module Refinery
|
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
49
|
-
def
|
50
|
-
config.
|
53
|
+
def url_filter_enabled?
|
54
|
+
config.url_filter_enabled
|
51
55
|
end
|
52
56
|
|
53
57
|
def has_locale?(locale)
|
@@ -3,13 +3,21 @@ module Refinery
|
|
3
3
|
include ActiveSupport::Configurable
|
4
4
|
|
5
5
|
config_accessor :current_locale, :default_locale, :default_frontend_locale,
|
6
|
-
:
|
6
|
+
:fallbacks_enabled, :frontend_locales, :locales,
|
7
|
+
:url_filter_enabled
|
7
8
|
|
8
|
-
self.enabled = true
|
9
9
|
self.default_locale = :en
|
10
10
|
self.default_frontend_locale = self.default_locale
|
11
11
|
self.current_locale = self.default_locale
|
12
|
+
self.fallbacks_enabled = true
|
12
13
|
self.frontend_locales = [self.default_frontend_locale]
|
13
14
|
self.locales = self.built_in_locales
|
15
|
+
self.url_filter_enabled = true
|
16
|
+
|
17
|
+
def self.frontend_locales
|
18
|
+
config.frontend_locales.select do |locale|
|
19
|
+
config.locales.keys.include?(locale)
|
20
|
+
end
|
21
|
+
end
|
14
22
|
end
|
15
23
|
end
|
data/lib/refinery/i18n/engine.rb
CHANGED
@@ -7,32 +7,34 @@ module Refinery
|
|
7
7
|
end
|
8
8
|
|
9
9
|
initializer "configure fallbacks" do
|
10
|
-
|
11
|
-
|
12
|
-
::I18n::Backend::Simple
|
10
|
+
if ::Refinery::I18n.fallbacks_enabled
|
11
|
+
require "i18n/backend/fallbacks"
|
12
|
+
if defined?(::I18n::Backend::Simple) && defined?(::I18n::Backend::Fallbacks)
|
13
|
+
::I18n::Backend::Simple.send(:include, ::I18n::Backend::Fallbacks)
|
14
|
+
end
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
16
18
|
config.to_prepare do
|
17
19
|
::ApplicationController.module_eval do
|
18
|
-
def
|
19
|
-
::Refinery::I18n.enabled? ? { :locale => ::I18n.locale } : {}
|
20
|
+
def default_url_options_with_locale
|
21
|
+
locale_param=(::Refinery::I18n.config.enabled? && ::I18n.locale != ::Refinery::I18n.default_frontend_locale) ? { :locale => ::I18n.locale } : {}
|
22
|
+
default_url_options_without_locale.reverse_merge locale_param
|
20
23
|
end
|
24
|
+
alias_method_chain :default_url_options, :locale
|
21
25
|
|
22
26
|
def find_or_set_locale
|
23
|
-
|
24
|
-
::I18n.locale = ::Refinery::I18n.current_frontend_locale
|
27
|
+
::I18n.locale = ::Refinery::I18n.current_frontend_locale
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
Thread.current[:globalize_locale] = ::I18n.locale
|
29
|
+
if ::Refinery::I18n.has_locale?(locale = params[:locale].try(:to_sym))
|
30
|
+
::I18n.locale = locale
|
31
|
+
elsif locale.present? and locale != ::Refinery::I18n.default_frontend_locale
|
32
|
+
params[:locale] = ::I18n.locale = ::Refinery::I18n.default_frontend_locale
|
33
|
+
redirect_to(params, :notice => "The locale '#{locale}' is not supported.") and return
|
34
|
+
else
|
35
|
+
::I18n.locale = ::Refinery::I18n.default_frontend_locale
|
35
36
|
end
|
37
|
+
Thread.current[:globalize_locale] = ::I18n.locale
|
36
38
|
end
|
37
39
|
|
38
40
|
prepend_before_filter :find_or_set_locale
|
@@ -66,12 +68,12 @@ module Refinery
|
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
69
|
-
|
71
|
+
initializer "register refinery_i18n plugin" do
|
70
72
|
::Refinery::Plugin.register do |plugin|
|
71
73
|
plugin.name = "refinery_i18n"
|
72
|
-
plugin.version = %q{2.0.0}
|
73
74
|
plugin.hide_from_menu = true
|
74
75
|
plugin.always_allow_access = true
|
76
|
+
plugin.pathname = root
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
data/refinerycms-i18n.gemspec
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = %q{refinerycms-i18n}
|
3
|
-
s.version = %q{2.0
|
5
|
+
s.version = %q{2.1.0}
|
4
6
|
s.description = %q{i18n logic extracted from Refinery CMS, for Refinery CMS.}
|
5
|
-
s.date = %q{2012-08-03}
|
6
7
|
s.summary = %q{i18n logic for Refinery CMS.}
|
7
8
|
s.email = %q{info@refinerycms.com}
|
8
9
|
s.homepage = %q{http://refinerycms.com}
|
9
|
-
s.authors = ['Philip Arndt']
|
10
|
+
s.authors = ['Philip Arndt', 'Uģis Ozols']
|
10
11
|
s.require_paths = %w(lib)
|
11
|
-
|
12
|
-
s.add_dependency 'refinerycms-core', '~> 2.0.0'
|
13
|
-
s.add_dependency 'routing-filter', '>= 0.2.3'
|
12
|
+
s.license = %q{MIT}
|
14
13
|
|
15
14
|
s.files = `git ls-files`.split("\n")
|
16
15
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
16
|
+
|
17
|
+
s.add_dependency 'routing-filter', '~> 0.3.0'
|
18
|
+
s.add_dependency 'rails-i18n', '~> 0.7.3'
|
17
19
|
end
|
data/script/rails
ADDED
@@ -2,9 +2,9 @@
|
|
2
2
|
require "spec_helper"
|
3
3
|
|
4
4
|
describe "dashboard locale picker" do
|
5
|
-
|
5
|
+
refinery_login_with :refinery_user
|
6
6
|
|
7
|
-
it "changes language used in backend" do
|
7
|
+
it "changes language used in backend", :js => true do
|
8
8
|
visit refinery.admin_dashboard_path
|
9
9
|
|
10
10
|
page.should have_content("Switch to your website")
|
data/spec/spec_helper.rb
CHANGED
@@ -1,56 +1,30 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
# Configure Rails Environment
|
4
|
+
ENV["RAILS_ENV"] ||= 'test'
|
6
5
|
|
7
|
-
|
6
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
require 'rspec/rails'
|
9
|
+
require 'capybara/rspec'
|
10
|
+
require 'factory_girl_rails'
|
12
11
|
|
13
|
-
|
12
|
+
Rails.backtrace_cleaner.remove_silencers!
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
# set javascript driver for capybara
|
23
|
-
Capybara.javascript_driver = :selenium
|
24
|
-
end
|
25
|
-
|
26
|
-
def each_run
|
27
|
-
ActiveSupport::Dependencies.clear
|
28
|
-
|
29
|
-
FactoryGirl.reload
|
30
|
-
|
31
|
-
# Requires supporting files with custom matchers and macros, etc,
|
32
|
-
# in ./support/ and its subdirectories including factories.
|
33
|
-
([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p|
|
34
|
-
Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s]
|
35
|
-
}.flatten.sort.each do |support_file|
|
36
|
-
require support_file
|
37
|
-
end
|
14
|
+
RSpec.configure do |config|
|
15
|
+
config.mock_with :rspec
|
16
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
17
|
+
config.filter_run :focus => true
|
18
|
+
config.run_all_when_everything_filtered = true
|
38
19
|
end
|
39
20
|
|
40
|
-
#
|
41
|
-
|
42
|
-
Spork.prefork do
|
43
|
-
# Loading more in this block will cause your tests to run faster. However,
|
44
|
-
# if you change any configuration or code from libraries loaded here, you'll
|
45
|
-
# need to restart spork for it take effect.
|
46
|
-
setup_environment
|
47
|
-
end
|
21
|
+
# set javascript driver for capybara
|
22
|
+
Capybara.javascript_driver = :selenium
|
48
23
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
each_run
|
24
|
+
# Requires supporting files with custom matchers and macros, etc,
|
25
|
+
# in ./support/ and its subdirectories including factories.
|
26
|
+
([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p|
|
27
|
+
Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s]
|
28
|
+
}.flatten.sort.each do |support_file|
|
29
|
+
require support_file
|
56
30
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.before(:all) do
|
5
|
+
Refinery::I18n.configure do |config|
|
6
|
+
config.default_locale = :en
|
7
|
+
|
8
|
+
config.current_locale = :en
|
9
|
+
|
10
|
+
config.default_frontend_locale = :en
|
11
|
+
|
12
|
+
config.frontend_locales = [:en]
|
13
|
+
|
14
|
+
config.locales = {:en=>"English", :fr=>"Français", :nl=>"Nederlands", :"pt-BR"=>"Português", :da=>"Dansk", :nb=>"Norsk Bokmål", :sl=>"Slovenian", :es=>"Español", :it=>"Italiano", :de=>"Deutsch", :lv=>"Latviski", :ru=>"Русский", :sv=>"Svenska", :pl=>"Polski", :"zh-CN"=>"Simplified Chinese", :"zh-TW"=>"Traditional Chinese", :el=>"Ελληνικά", :rs=>"Srpski", :cs=>"Česky", :sk=>"Slovenský", :ja=>"日本語", :bg=>"Български"}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|