txgh 6.2.0 → 6.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/txgh/resource_downloader.rb +1 -1
- data/lib/txgh/tx_resource.rb +1 -1
- data/lib/txgh/version.rb +1 -1
- data/spec/tx_resource_spec.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 489ac4e3bc92e1b84207c831c966a268a948c76c
|
4
|
+
data.tar.gz: d131ab0a2d4280a5183719bec782e38220a7de20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c46275dd6f305e225dcacedeed5663dff4f0b045936af210e0b5c353a805bfb5cfd4d311df2b034958cc9b74ef9b9c8b523b3452607b91bfc44544b9a57ac37d
|
7
|
+
data.tar.gz: d105c4bcc2a8c5288ee5a229a7b0182b4790493466a6ebe21ce710db95c4a6538c373d783028c0f86c7eee90b71b1754fd033b93deddf171b1f88924babe4780
|
@@ -82,7 +82,7 @@ module Txgh
|
|
82
82
|
def download_each
|
83
83
|
each_resource do |resource|
|
84
84
|
each_language do |language_code|
|
85
|
-
file_name = resource.translation_path(
|
85
|
+
file_name = resource.translation_path(language_code)
|
86
86
|
yield resource, language_code, file_name
|
87
87
|
end
|
88
88
|
end
|
data/lib/txgh/tx_resource.rb
CHANGED
data/lib/txgh/version.rb
CHANGED
data/spec/tx_resource_spec.rb
CHANGED
@@ -6,7 +6,7 @@ describe TxResource do
|
|
6
6
|
let(:resource) do
|
7
7
|
TxResource.new(
|
8
8
|
'project_slug', 'resource_slug', 'type',
|
9
|
-
'source_lang', 'source_file', 'ko-KR:ko', 'translation_file'
|
9
|
+
'source_lang', 'source_file', 'ko-KR:ko', 'translation_file/<lang>.foo'
|
10
10
|
)
|
11
11
|
end
|
12
12
|
|
@@ -26,6 +26,16 @@ describe TxResource do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
describe '#translation_path' do
|
30
|
+
it 'interpolates the given locale' do
|
31
|
+
expect(resource.translation_path('de')).to eq('translation_file/de.foo')
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'interpolates using the converted locale if a mapping exists for it' do
|
35
|
+
expect(resource.translation_path('ko-KR')).to eq('translation_file/ko.foo')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
29
39
|
describe '#to_h' do
|
30
40
|
it 'converts the resource into a hash' do
|
31
41
|
expect(resource.to_h).to eq(
|
@@ -34,7 +44,7 @@ describe TxResource do
|
|
34
44
|
type: 'type',
|
35
45
|
source_lang: 'source_lang',
|
36
46
|
source_file: 'source_file',
|
37
|
-
translation_file: 'translation_file'
|
47
|
+
translation_file: 'translation_file/<lang>.foo'
|
38
48
|
)
|
39
49
|
end
|
40
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: txgh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Jackowski
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-11-
|
12
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: abroad
|