isomorfeus-i18n 23.7.0.rc4 → 23.8.0.rc1
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: 3fc859e0ef9cf40ca1fc9be7d3565f0dce8eba928dd406be016b60f57e19b6d1
|
4
|
+
data.tar.gz: 0dfec769c96bda4cef73a36c1d69b74daa8d51c39203e54dd5e8c817aaa336f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cf84d1bda54b380f9fa169681e43c3296bca67c1b8e7a88ba01354d5603739a2dffdecf4f02d133eea73fc51cacd43e1a5938ade4de7734724c0ec5be0bcacc
|
7
|
+
data.tar.gz: b6bb33c82687efec2a0cca7bc7e0031872ca22785531d0109636a68991198677dd0c303e3d8d24bfd932757e76eafecb45a3c3a176b8011b96f2ce440fb1d297
|
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.rc1
|
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-07
|
11
|
+
date: 2023-08-07 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.rc1
|
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.rc1
|
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.rc1
|
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.rc1
|
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.rc1
|
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.rc1
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rake
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|