spree_change_locale 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/app/helpers/locale_helper.rb +1 -1
- data/lib/spree_change_locale.rb +1 -0
- data/spec/dummy/log/test.log +22 -0
- data/spree_change_locale.gemspec +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -10,7 +10,7 @@ module LocaleHelper
|
|
10
10
|
locale == current_locale
|
11
11
|
end
|
12
12
|
def link_to_locale(locale, name = nil, *args)
|
13
|
-
link_to
|
13
|
+
link_to(name || locale_name(locale), "/#{locale}#{request && request.path}", *args) if locale_enabled?(locale)
|
14
14
|
end
|
15
15
|
def locale_name(locale)
|
16
16
|
I18n.t(:this_file_language, :locale => locale) if locale_enabled?(locale)
|
data/lib/spree_change_locale.rb
CHANGED
data/spec/dummy/log/test.log
CHANGED
@@ -1452,3 +1452,25 @@ Completed 302 Found in 2ms
|
|
1452
1452
|
Parameters: {"locale"=>"ru"}
|
1453
1453
|
Redirected to http://test.host/
|
1454
1454
|
Completed 302 Found in 1ms
|
1455
|
+
[1m[36mMailMethod Load (0.8ms)[0m [1mSELECT "mail_methods".* FROM "mail_methods" WHERE "mail_methods"."environment" = 'test' LIMIT 1[0m
|
1456
|
+
[1m[35mProperty Load (15.7ms)[0m SELECT "properties".* FROM "properties" WHERE "properties"."name" = 'brand' LIMIT 1
|
1457
|
+
[1m[36mAppConfiguration Load (14.9ms)[0m [1mSELECT "configurations".* FROM "configurations" WHERE "configurations"."type" IN ('AppConfiguration') AND "configurations"."name" = 'Default configuration' LIMIT 1[0m
|
1458
|
+
Processing by LocaleController#set as HTML
|
1459
|
+
Parameters: {"locale"=>"es"}
|
1460
|
+
Redirected to http://test.host/
|
1461
|
+
Completed 302 Found in 2ms
|
1462
|
+
Processing by LocaleController#set as HTML
|
1463
|
+
Parameters: {"locale"=>"ru"}
|
1464
|
+
Redirected to http://test.host/
|
1465
|
+
Completed 302 Found in 93ms
|
1466
|
+
[1m[36mMailMethod Load (0.2ms)[0m [1mSELECT "mail_methods".* FROM "mail_methods" WHERE "mail_methods"."environment" = 'test' LIMIT 1[0m
|
1467
|
+
[1m[35mProperty Load (0.1ms)[0m SELECT "properties".* FROM "properties" WHERE "properties"."name" = 'brand' LIMIT 1
|
1468
|
+
[1m[36mAppConfiguration Load (0.3ms)[0m [1mSELECT "configurations".* FROM "configurations" WHERE "configurations"."type" IN ('AppConfiguration') AND "configurations"."name" = 'Default configuration' LIMIT 1[0m
|
1469
|
+
Processing by LocaleController#set as HTML
|
1470
|
+
Parameters: {"locale"=>"es"}
|
1471
|
+
Redirected to http://test.host/
|
1472
|
+
Completed 302 Found in 3ms
|
1473
|
+
Processing by LocaleController#set as HTML
|
1474
|
+
Parameters: {"locale"=>"ru"}
|
1475
|
+
Redirected to http://test.host/
|
1476
|
+
Completed 302 Found in 85ms
|
data/spree_change_locale.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_change_locale'
|
5
|
-
s.version = '0.5.
|
5
|
+
s.version = '0.5.2'
|
6
6
|
s.summary = 'Easy locale change for Spree'
|
7
7
|
s.description = 'Easy locale change for Spree'
|
8
8
|
s.required_ruby_version = '>= 1.8.7'
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: spree_change_locale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- humancopy
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-22 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: spree_core
|