i18n-backend-side_by_side 1.2.0 → 1.3.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 +11 -12
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/i18n/backend/side_by_side.rb +7 -1
- data/test/locales/novel.yml +1 -0
- data/test/test.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a7f5433094b30b366c592d1073bc92dd7b6e6d42545c7b3c5d33a2fbaac6f18
|
4
|
+
data.tar.gz: 6f1e071a3dda21deee16653b2e006085ea57ea6d2498fde0f41fa4acde4cc401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8a6e4ea084637478ca26f05fec5d15cb765fc8f0646e8f97e9dc92f85cd57ef2eadabb72b120370da44a01c41b489191ad5db97188093ed10a08bbf7da25abd
|
7
|
+
data.tar.gz: 697d59776e3f6cf1a526c0f4c81f3b13ba20ac55fd8a38d97c778997cdfa9c629343bd601d14c9da87b77b00ba4ec872018ed2c51977bfa40a51a22053877367
|
data/.github/workflows/ruby.yml
CHANGED
@@ -17,19 +17,18 @@ jobs:
|
|
17
17
|
test:
|
18
18
|
|
19
19
|
runs-on: ubuntu-latest
|
20
|
+
|
20
21
|
strategy:
|
21
22
|
matrix:
|
22
|
-
ruby-version: ['2.
|
23
|
+
ruby-version: ['3.2', '3.1', '3.0', '2.7']
|
23
24
|
|
24
25
|
steps:
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
- name: Run tests
|
35
|
-
run: bundle exec rake
|
26
|
+
- uses: actions/checkout@v3
|
27
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
28
|
+
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby-version }}
|
31
|
+
- name: Install dependencies
|
32
|
+
run: bundle install
|
33
|
+
- name: Run tests
|
34
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
@@ -27,7 +27,13 @@ module I18n
|
|
27
27
|
private
|
28
28
|
|
29
29
|
def _process(path, hash)
|
30
|
-
if
|
30
|
+
if !hash.is_a?(Hash)
|
31
|
+
### TRANSLATION KEY WITHOUT SPECIFIED LANGUAGE - WILL BE APPLIED TO ALL LANGUAGES
|
32
|
+
value = hash
|
33
|
+
translations.keys.each do |locale|
|
34
|
+
_store([locale] + path, value)
|
35
|
+
end
|
36
|
+
elsif _contains_locales?(hash)
|
31
37
|
hash.each do |locale, value|
|
32
38
|
_store([_strip_locale_prefix(locale)] + path, value)
|
33
39
|
end
|
data/test/locales/novel.yml
CHANGED
data/test/test.rb
CHANGED
@@ -32,4 +32,9 @@ class Test < Minitest::Test
|
|
32
32
|
assert_raises { I18n.t('foo.only_en.some_key', locale: :de, raise: true) }
|
33
33
|
assert_raises { I18n.t('foo.only_en', locale: :de, raise: true) }
|
34
34
|
end
|
35
|
+
|
36
|
+
def test_without_language
|
37
|
+
assert_equal('Without Language', I18n.t('foo.without_language', language: :en))
|
38
|
+
assert_equal('Without Language', I18n.t('foo.without_language', language: :de))
|
39
|
+
end
|
35
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philipe Fatio
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
112
|
+
rubygems_version: 3.3.10
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Tired of jumping between language files when translating keys? Stop jumping
|