i18n-backend-side_by_side 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +35 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +0 -2
- data/README.md +1 -1
- data/VERSION +1 -1
- data/i18n-backend-side_by_side.gemspec +3 -2
- data/lib/i18n/backend/side_by_side.rb +4 -6
- metadata +24 -10
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60dd5bb5c547d84a8925bf748d4861748be81b26f9b9e024fc4528460e789da5
|
4
|
+
data.tar.gz: 345003a886a81cc04b89f3ac1e231ac8686063ffe4c3d808d30d30db81b6b5c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 006af3c6adae8d1cb959078f0f176b3a4a6b2a6f15c04e09f2cb9a5d48366ab9cdffc9d6fbdba153160d0078a9a05523125fe14d48300fcfee8171bbb5f93561
|
7
|
+
data.tar.gz: '083505d4a5c15e0ada2d4c49fabef8a579a8df7915a9c603966d3a24efec05f873b961336e2285470a33a90c004e0c94017b97f9f47c58a253251066de5e14a4'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.7', '3.0']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
# uses: ruby/setup-ruby@v1
|
30
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
+
- name: Run tests
|
35
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# i18n-backend-side\_by\_side
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Tests Status](https://github.com/electric-feel/i18n-backend-side_by_side/workflows/Ruby/badge.svg)](https://github.com/electric-feel/i18n-backend-side_by_side/actions?query=workflow%3ARuby)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/i18n-backend-side_by_side.svg)](https://rubygems.org/gems/i18n-backend-side_by_side)
|
5
5
|
|
6
6
|
**Tired of jumping between language files when translating keys? Stop jumping
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
@@ -16,9 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
|
-
spec.required_ruby_version = '>= 2.
|
19
|
+
spec.required_ruby_version = '>= 2.7.0'
|
20
20
|
|
21
21
|
spec.add_development_dependency 'rake'
|
22
22
|
spec.add_development_dependency 'minitest'
|
23
|
-
spec.add_dependency 'i18n', '>= 1.
|
23
|
+
spec.add_dependency 'i18n', '>= 1.10.0'
|
24
|
+
spec.add_dependency 'activesupport', '>= 6.0.0'
|
24
25
|
end
|
@@ -1,10 +1,8 @@
|
|
1
1
|
require 'i18n'
|
2
|
-
require '
|
2
|
+
require 'active_support/core_ext/hash/keys'
|
3
3
|
|
4
4
|
module I18n
|
5
5
|
module Backend
|
6
|
-
using HashRefinements
|
7
|
-
|
8
6
|
class SideBySide < Simple
|
9
7
|
VERSION = File.read(File.expand_path('../../../../VERSION', __FILE__))
|
10
8
|
LOCALE_PREFIX = '_'
|
@@ -14,13 +12,13 @@ module I18n
|
|
14
12
|
def load_file(filename)
|
15
13
|
type = File.extname(filename).tr('.', '').downcase
|
16
14
|
raise UnknownFileType.new(type, filename) unless respond_to?(:"load_#{type}", true)
|
17
|
-
data = send(:"load_#{type}", filename)
|
15
|
+
data = send(:"load_#{type}", filename).first
|
18
16
|
unless data.is_a?(Hash)
|
19
17
|
raise InvalidLocaleData.new(filename, 'expects it to return a hash, but does not')
|
20
18
|
end
|
21
19
|
|
22
|
-
if data.first.first == LOCALE_PREFIX
|
23
|
-
_process([], data[LOCALE_PREFIX]
|
20
|
+
if data.first.first.to_s == LOCALE_PREFIX
|
21
|
+
_process([], data.deep_symbolize_keys[LOCALE_PREFIX.to_sym])
|
24
22
|
else
|
25
23
|
data.each { |locale, d| store_translations(locale, d || {}) }
|
26
24
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-backend-side_by_side
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philipe Fatio
|
8
8
|
- Pratik Mukerji
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -45,14 +45,28 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.
|
48
|
+
version: 1.10.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
55
|
+
version: 1.10.0
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: activesupport
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 6.0.0
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 6.0.0
|
56
70
|
description: Tired of jumping between language files when translating keys? Stop jumping
|
57
71
|
and have all the languages side by side.
|
58
72
|
email:
|
@@ -62,8 +76,8 @@ executables: []
|
|
62
76
|
extensions: []
|
63
77
|
extra_rdoc_files: []
|
64
78
|
files:
|
79
|
+
- ".github/workflows/ruby.yml"
|
65
80
|
- ".gitignore"
|
66
|
-
- ".travis.yml"
|
67
81
|
- CHANGELOG.md
|
68
82
|
- Gemfile
|
69
83
|
- LICENSE.txt
|
@@ -80,7 +94,7 @@ homepage: https://github.com/electric-feel/i18n-backend-side_by_side
|
|
80
94
|
licenses:
|
81
95
|
- MIT
|
82
96
|
metadata: {}
|
83
|
-
post_install_message:
|
97
|
+
post_install_message:
|
84
98
|
rdoc_options: []
|
85
99
|
require_paths:
|
86
100
|
- lib
|
@@ -88,15 +102,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
102
|
requirements:
|
89
103
|
- - ">="
|
90
104
|
- !ruby/object:Gem::Version
|
91
|
-
version: 2.
|
105
|
+
version: 2.7.0
|
92
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
requirements: []
|
98
|
-
rubygems_version: 3.1.
|
99
|
-
signing_key:
|
112
|
+
rubygems_version: 3.1.4
|
113
|
+
signing_key:
|
100
114
|
specification_version: 4
|
101
115
|
summary: Tired of jumping between language files when translating keys? Stop jumping
|
102
116
|
and have all the languages side by side.
|