route_translator 14.1.2 → 14.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/route_translator/extensions.rb +3 -3
- data/lib/route_translator/translator/path/segment.rb +2 -2
- data/lib/route_translator/translator/path.rb +1 -1
- data/lib/route_translator/translator.rb +3 -3
- data/lib/route_translator/version.rb +1 -1
- data/lib/route_translator.rb +4 -4
- metadata +3 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 133d2558351805c54d4d96231a01b9b1c4e5137a42895e8c1d3b2eaff55d03c0
|
4
|
+
data.tar.gz: 648a700ae5378e5e11b94034ae5f43808519cf9f931f52d49c14596cca3c6337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3675a5b82eb29c7436d881718fff7cb82452266a40f7c6d6053dd7f912bab544fd4773c2e8c7ce20bfbd76643d72c5be4ab037e3990ddb84ab4b2c4d20d8cb8
|
7
|
+
data.tar.gz: 6cba258743408f08ad05e71d05693af3b29740675f093a047990df258904c539400229c7b74c1c5f4282b26a1eefde1cf4268f9b5b1515f3959ef1206467bd23
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@ RouteTranslator is a gem to allow you to manage the translations of your app rou
|
|
9
9
|
|
10
10
|
It started as a fork of the awesome [translate_routes](https://github.com/raul/translate_routes) plugin by [Raúl Murciano](https://github.com/raul).
|
11
11
|
|
12
|
-
Right now it works with Rails 6.1 and
|
12
|
+
Right now it works with Rails 6.1, 7.x, and 8.0
|
13
13
|
|
14
14
|
## Quick Start
|
15
15
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require_relative 'extensions/mapper'
|
4
|
+
require_relative 'extensions/route_set'
|
5
|
+
require_relative 'extensions/action_controller'
|
@@ -24,8 +24,8 @@ module RouteTranslator
|
|
24
24
|
handler = proc { |exception| exception }
|
25
25
|
opts = { locale: locale, scope: scope }
|
26
26
|
|
27
|
-
if I18n.t(str, **opts
|
28
|
-
I18n.t! str, **opts
|
27
|
+
if I18n.t(str, **opts, exception_handler: handler).is_a?(I18n::MissingTranslation)
|
28
|
+
I18n.t! str, **opts, **fallback_options(str, locale)
|
29
29
|
else
|
30
30
|
I18n.t str, **opts
|
31
31
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require_relative 'translator/route_helpers'
|
4
|
+
require_relative 'translator/path'
|
5
|
+
require_relative 'route'
|
6
6
|
|
7
7
|
module RouteTranslator
|
8
8
|
module Translator
|
data/lib/route_translator.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'active_support'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
require_relative 'route_translator/extensions'
|
6
|
+
require_relative 'route_translator/translator'
|
7
|
+
require_relative 'route_translator/host'
|
8
|
+
require_relative 'route_translator/version'
|
9
9
|
|
10
10
|
module RouteTranslator
|
11
11
|
extend RouteTranslator::Host
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: route_translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.
|
4
|
+
version: 14.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geremia Taglialatela
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: actionpack
|
@@ -19,9 +19,6 @@ dependencies:
|
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '6.1'
|
22
|
-
- - "<"
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: '8.0'
|
25
22
|
type: :runtime
|
26
23
|
prerelease: false
|
27
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,9 +26,6 @@ dependencies:
|
|
29
26
|
- - ">="
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: '6.1'
|
32
|
-
- - "<"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '8.0'
|
35
29
|
- !ruby/object:Gem::Dependency
|
36
30
|
name: activesupport
|
37
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,9 +33,6 @@ dependencies:
|
|
39
33
|
- - ">="
|
40
34
|
- !ruby/object:Gem::Version
|
41
35
|
version: '6.1'
|
42
|
-
- - "<"
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '8.0'
|
45
36
|
type: :runtime
|
46
37
|
prerelease: false
|
47
38
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,9 +40,6 @@ dependencies:
|
|
49
40
|
- - ">="
|
50
41
|
- !ruby/object:Gem::Version
|
51
42
|
version: '6.1'
|
52
|
-
- - "<"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '8.0'
|
55
43
|
description: Translates the Rails routes of your application into the languages defined
|
56
44
|
in your locale files
|
57
45
|
email:
|
@@ -102,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
90
|
- !ruby/object:Gem::Version
|
103
91
|
version: '0'
|
104
92
|
requirements: []
|
105
|
-
rubygems_version: 3.5.
|
93
|
+
rubygems_version: 3.5.18
|
106
94
|
signing_key:
|
107
95
|
specification_version: 4
|
108
96
|
summary: Translate your Rails routes in a simple manner
|