i18n-docs 0.1.1 → 0.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/ci.yml +2 -1
- data/README.md +2 -3
- data/i18n-docs.gemspec +1 -1
- data/lib/i18n_docs/translations.rb +1 -1
- data/lib/i18n_docs/version.rb +1 -1
- data/test/unit/translation_file_export_test.rb +4 -4
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9bf49c715739e6218ce990139920e000e53bd9cac79aa6aec99a811c310b1fc
|
4
|
+
data.tar.gz: e44c7e876c0a6e9ea5cd24a2393034f77a15c533f17fe6192eead665e034c8e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 213b8d4e4715e5c760d062f1a5d76888848593d92d091e1669c1eac2a7a09732eac553721d7a314b0b5f0a8c63512ed40f9ed18d6597e9a8242cdc4d19a0a972
|
7
|
+
data.tar.gz: b3b44a903be1f4342e427bdc47dbc9e9808a597ae5fa1bcd45fc143cd31e76ffd68ed30864daf49f376bad1589972baed7771f6f6b3e2af1047ae3657b48e139
|
data/.github/workflows/ci.yml
CHANGED
data/README.md
CHANGED
data/i18n-docs.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency('rake')
|
22
22
|
|
23
23
|
s.add_development_dependency('mocha', '~> 0.13.3')
|
24
|
-
s.add_development_dependency('test-unit', '~> 3.
|
24
|
+
s.add_development_dependency('test-unit', '~> 3.5.5')
|
25
25
|
s.add_development_dependency('simplecov', '~> 0.16.1')
|
26
26
|
s.add_development_dependency('rubocop', '~> 0.48.0')
|
27
27
|
end
|
@@ -59,7 +59,7 @@ module I18nDocs
|
|
59
59
|
|
60
60
|
def download(url, destination_file)
|
61
61
|
puts "Download '#{url}' to '#{destination_file}'"
|
62
|
-
doc_data = open(url).read.force_encoding('UTF-8')
|
62
|
+
doc_data = URI.open(url).read.force_encoding('UTF-8')
|
63
63
|
if (subs = @settings['substitutions'])
|
64
64
|
subs.each do |sub|
|
65
65
|
doc_data.gsub! sub['from'], sub['to']
|
data/lib/i18n_docs/version.rb
CHANGED
@@ -28,14 +28,14 @@ module UnitTests
|
|
28
28
|
assert File.exist?(@output_file), 'Expected to have a CSV file written'
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
31
|
+
def test_load_language
|
32
32
|
translations = @exporter.load_language('de')
|
33
33
|
|
34
34
|
assert translations, 'Expected to return a hash with translations'
|
35
35
|
assert_equal translations['header']['search'], 'Finden'
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
38
|
+
def test_flatten_translations_hash
|
39
39
|
translation_hash = { 'a' => {
|
40
40
|
'I' => '1',
|
41
41
|
'II' => '2',
|
@@ -52,7 +52,7 @@ module UnitTests
|
|
52
52
|
assert_equal '4', flat['b']
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
55
|
+
def test_load_translations
|
56
56
|
assert_empty @exporter.translations
|
57
57
|
@exporter.load_translations
|
58
58
|
|
@@ -63,7 +63,7 @@ module UnitTests
|
|
63
63
|
assert_equal '(c) local.ch', @exporter.translations['de']['copyright']
|
64
64
|
end
|
65
65
|
|
66
|
-
def
|
66
|
+
def test_write_to_csv
|
67
67
|
@exporter.translations = { 'de' => { 'numbers.one' => 'eins' },
|
68
68
|
'en' => { 'numbers.one' => 'one' } }
|
69
69
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Kunz
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
- Robin Wunderlin
|
12
12
|
- Esteban Pastorino
|
13
13
|
- Krzysztof Sakwerda
|
14
|
-
autorequire:
|
14
|
+
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
date: 2013-05-10 00:00:00.000000000 Z
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 3.
|
53
|
+
version: 3.5.5
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 3.
|
60
|
+
version: 3.5.5
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: simplecov
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,7 +124,7 @@ files:
|
|
124
124
|
homepage: https://github.com/local-ch/i18n-docs
|
125
125
|
licenses: []
|
126
126
|
metadata: {}
|
127
|
-
post_install_message:
|
127
|
+
post_install_message:
|
128
128
|
rdoc_options: []
|
129
129
|
require_paths:
|
130
130
|
- lib
|
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
143
|
-
signing_key:
|
142
|
+
rubygems_version: 3.4.12
|
143
|
+
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Maintain translations in Google Docs and export them to your Rails project.
|
146
146
|
test_files: []
|