localyzed 0.0.2.4 → 0.0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ class ActionController::Base
23
23
  def redirect_to_localized_path_if
24
24
  @translatable = true # used to display or hide the languages menu
25
25
  # Rails.env != test to make controller specs pass if locale is defined but path is not well written
26
- if ( !request.xhr? && ( ( !request.path.match(/\/(en|fr)(\/|$)/) && Rails.env != 'test' ) || params[:locale] != I18n.locale.to_s) && request.method == 'GET')
26
+ if ( !request.xhr? && ( ( !request.path.match(/(.*|)\/(en|fr)(\/|$)/) && Rails.env != 'test' ) || params[:locale] != I18n.locale.to_s) && request.method == 'GET')
27
27
  flash.keep
28
28
  redirect_to(url_for(params.merge(:locale => I18n.locale.to_s, :from_l => (params[:locale] if params[:locale]))), :status => :moved_permanently)
29
29
  end
@@ -3,7 +3,7 @@ class Localyzed::Railtie < Rails::Railtie
3
3
  initializer "localized2.configure" do |app|
4
4
  app.class.configure do
5
5
  config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
6
- r301 %r{(.*|)\/(en|fr)($|\?[^\\]*)}, '$1/$2/$3' # redirect '/en' to '/en/'
6
+ # r301 %r{(.*|)\/(en|fr)($|\?[^\\]*)}, '$1/$2/$3' # redirect '/en' to '/en/'
7
7
  end
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Localyzed
2
- VERSION = "0.0.2.4"
2
+ VERSION = "0.0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localyzed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.4
4
+ version: 0.0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -32,7 +32,7 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ~>
35
+ - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
37
  version: 1.2.1
38
38
  type: :runtime
@@ -40,7 +40,7 @@ dependencies:
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ~>
43
+ - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: 1.2.1
46
46
  - !ruby/object:Gem::Dependency
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 1.8.23
147
+ rubygems_version: 1.8.24
148
148
  signing_key:
149
149
  specification_version: 3
150
150
  summary: Simple helper for routes internationalization.