Skip to content

Commit 9e37c1f

Browse files
committed
closes #135 hyper-i18n now working with latest i18n
1 parent afe2954 commit 9e37c1f

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

ruby/hyper-i18n/lib/hyper-i18n/i18n.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class I18n
3030
end
3131

3232
f.when_on_server do
33-
@server_data_cache[:t][attribute] = ::I18n.t(attribute, opts.with_indifferent_access)
33+
@server_data_cache[:t][attribute] = ::I18n.t(attribute, opts.symbolize_keys)
3434
end
3535
end
3636

@@ -60,7 +60,7 @@ class I18n
6060
@server_data_cache[:l][date_or_time.to_s] ||= {}
6161

6262
@server_data_cache[:l][date_or_time.to_s][format] =
63-
::I18n.l(date_or_time, opts.with_indifferent_access.merge(format: format))
63+
::I18n.l(date_or_time, opts.with_indifferent_access.merge(format: format).symbolize_keys)
6464
end
6565
end
6666

ruby/hyper-i18n/lib/hyper-i18n/operations/localize.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ def date_or_time
1313
end
1414

1515
def opts
16-
@opts ||= params.opts.with_indifferent_access.merge(format: formatted_format(params.format))
16+
@opts ||= params.opts.with_indifferent_access
17+
.merge(format: formatted_format(params.format))
18+
.symbolize_keys
1719
end
1820

1921
step do

ruby/hyper-i18n/lib/hyper-i18n/operations/translate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Translate < Hyperstack::ServerOp
66
param :translation, default: nil
77

88
def opts
9-
params.opts.with_indifferent_access
9+
params.opts.symbolize_keys
1010
end
1111

1212
step do

ruby/hyper-i18n/lib/hyperstack/internal/i18n.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class I18n
3030
end
3131

3232
f.when_on_server do
33-
@server_data_cache[:t][attribute] = ::I18n.t(attribute, opts.with_indifferent_access)
33+
@server_data_cache[:t][attribute] = ::I18n.t(attribute, opts.symbolize_keys)
3434
end
3535
end
3636

@@ -60,7 +60,7 @@ class I18n
6060
@server_data_cache[:l][date_or_time.to_s] ||= {}
6161

6262
@server_data_cache[:l][date_or_time.to_s][format] =
63-
::I18n.l(date_or_time, opts.with_indifferent_access.merge(format: format))
63+
::I18n.l(date_or_time, opts.with_indifferent_access.merge(format: format).symbolize_keys)
6464
end
6565
end
6666

ruby/hyper-i18n/lib/hyperstack/internal/i18n/localize.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def date_or_time
1515
end
1616

1717
def opts
18-
@opts ||= params.opts.with_indifferent_access.merge(format: formatted_format(params.format))
18+
@opts ||= params.opts.with_indifferent_access
19+
.merge(format: formatted_format(params.format))
20+
.symbolize_keys
1921
end
2022

2123
step do

ruby/hyper-i18n/lib/hyperstack/internal/i18n/translate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Translate < Hyperstack::ServerOp
88
param :translation, default: nil
99

1010
def opts
11-
params.opts.with_indifferent_access
11+
params.opts.symbolize_keys
1212
end
1313

1414
step do

0 commit comments

Comments
 (0)