isomorfeus-i18n 23.7.0.rc5 → 23.8.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/i18n/version.rb +1 -1
- data/lib/lucid_i18n_mixin.rb +11 -9
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6366a0d0a295ec7df7ce592c761155303292cde586bc65e38070c848d18d8e70
|
4
|
+
data.tar.gz: 5fbb829991d16b72c295c77c77b06593b65b1d7cbf4bcecf38a1b736646a372e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbe753ac452279d1e5b488f6270484ab34b6fb7600475c59fbfa7ea64241aa1b86652a6fa9cfbea10b8bba7e19494c8c8923a0a211435487809a49b85c58fe62
|
7
|
+
data.tar.gz: 7f56f69a838f4398ce54b1276c4e069a0ae31d805138a1ad8595bfd0e992654ad480ac50ee24b572fb3235e68aae294d44a964eb3d8941f15e7581928fc02b77
|
data/lib/lucid_i18n_mixin.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# backtick_javascript: true
|
2
|
+
|
1
3
|
module LucidI18nMixin
|
2
4
|
CONTEXT_SEPARATOR = "\004"
|
3
5
|
NAMESPACE_SEPARATOR = '|'
|
@@ -105,7 +107,7 @@ module LucidI18nMixin
|
|
105
107
|
# minimum_significant_digits or minimumSignificantDigits: A number from 1 to 21 (default is 21)
|
106
108
|
# style: "decimal"(default) "currency" "percent"
|
107
109
|
# use_grouping or useGrouping: true(default) false
|
108
|
-
`(object).toLocaleString(locale, #{options
|
110
|
+
`(object).toLocaleString(locale, Object.fromEntries(#{options}))`
|
109
111
|
elsif c_name == 'Date' || c_name == 'DateTime'
|
110
112
|
# options for date/time formating:
|
111
113
|
# format: "standard" "full"
|
@@ -128,28 +130,28 @@ module LucidI18nMixin
|
|
128
130
|
native_object = object.to_n
|
129
131
|
case format
|
130
132
|
when :standard
|
131
|
-
`native_object.toLocaleDateString(locale, #{options
|
133
|
+
`native_object.toLocaleDateString(locale, Object.fromEntries(#{options}))`
|
132
134
|
when :full
|
133
135
|
options[:dateStyle] = 'long'
|
134
|
-
`native_object.toLocaleDateString(locale, #{options
|
136
|
+
`native_object.toLocaleDateString(locale, Object.fromEntries(#{options}))`
|
135
137
|
when :custom
|
136
|
-
`native_object.toLocaleString(locale, #{options
|
138
|
+
`native_object.toLocaleString(locale, Object.fromEntries(#{options}))`
|
137
139
|
else
|
138
|
-
`native_object.toLocaleDateString(locale, #{options
|
140
|
+
`native_object.toLocaleDateString(locale, Object.fromEntries(#{options}))`
|
139
141
|
end
|
140
142
|
elsif c_name == 'Time'
|
141
143
|
native_object = object.to_n
|
142
144
|
case format
|
143
145
|
when :standard
|
144
|
-
`native_object.toLocaleString(locale, #{options
|
146
|
+
`native_object.toLocaleString(locale, Object.fromEntries(#{options}))`
|
145
147
|
when :full
|
146
148
|
options[:dateStyle] = 'long'
|
147
149
|
options[:timeStyle] = 'short'
|
148
|
-
`native_object.toLocaleString(locale, #{options
|
150
|
+
`native_object.toLocaleString(locale, Object.fromEntries(#{options}))`
|
149
151
|
when :custom
|
150
|
-
`native_object.toLocaleString(locale, #{options
|
152
|
+
`native_object.toLocaleString(locale, Object.fromEntries(#{options}))`
|
151
153
|
else
|
152
|
-
`native_object.toLocaleString(locale, #{options
|
154
|
+
`native_object.toLocaleString(locale, Object.fromEntries(#{options}))`
|
153
155
|
end
|
154
156
|
else
|
155
157
|
raise "Unknown object type #{object.class} given to #l!"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 23.
|
4
|
+
version: 23.8.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 1.
|
81
|
+
version: 1.8.0.alpha1
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 1.
|
88
|
+
version: 1.8.0.alpha1
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: opal-activesupport
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,28 +106,28 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 23.
|
109
|
+
version: 23.8.0.rc2
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 23.
|
116
|
+
version: 23.8.0.rc2
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: isomorfeus-transport
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 23.
|
123
|
+
version: 23.8.0.rc2
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 23.
|
130
|
+
version: 23.8.0.rc2
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: r18n-core
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,14 +148,14 @@ dependencies:
|
|
148
148
|
requirements:
|
149
149
|
- - '='
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 23.
|
151
|
+
version: 23.8.0.rc2
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - '='
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 23.
|
158
|
+
version: 23.8.0.rc2
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rake
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|