extract_i18n 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/verify.yml +6 -0
- data/README.md +3 -1
- data/lib/extract_i18n/slimkeyfy/slim_transformer.rb +6 -2
- data/lib/extract_i18n/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d5459b5c55363dfd1893ecafd4d3eb0bea7db570a54da421782a36750dfc50c
|
|
4
|
+
data.tar.gz: a9a335109c2ad690a9234f95e7bfe5a24fff8f5a5eb7d642031d3a402773a223
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 756c430da5da81bf5e1a1211c43b1039cd17863e46f64b239d5eaf42c57fe45bc98dfc5f63a4974310a7ed77fa26efb1441d5aa2f036df655ea836589626d598
|
|
7
|
+
data.tar.gz: 98b61188778616f1cb643310e3dfd1d76f7cfc6e4b7d5b4b41b10296d26aa438034639133d4cedc5c43f2faacae69bed46fa94e33692519bbd5c22f720c06463
|
|
@@ -20,4 +20,10 @@ jobs:
|
|
|
20
20
|
bundle install --jobs 4 --retry 3
|
|
21
21
|
- name: Run tests
|
|
22
22
|
run: bundle exec rspec
|
|
23
|
+
- name: Build and publish gem
|
|
24
|
+
uses: jstastny/publish-gem-to-github@master
|
|
25
|
+
with:
|
|
26
|
+
continue-on-error: true
|
|
27
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
+
owner: pludoni
|
|
23
29
|
|
data/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/extract_i18n)
|
|
4
4
|
|
|
5
|
+
[Read my blog post if you'd like more about the development of ExtractI18n](https://www.stefanwienert.de/blog/2020/07/26/internationalize-medium-rails-app-with-tooling/).
|
|
6
|
+
|
|
5
7
|
CLI helper program to automatically extract bare text strings into Rails I18n interactively.
|
|
6
8
|
|
|
7
9
|
Useful when adding i18n to a medium/large Rails app.
|
|
@@ -37,7 +39,7 @@ DO USE A SOURCE-CODE-MANAGEMENT-SYSTEM (Git). There is no guarantee that program
|
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
```
|
|
40
|
-
extract-i18n --
|
|
42
|
+
extract-i18n --help
|
|
41
43
|
|
|
42
44
|
extract-i18n --locale de --yaml config/locales/unsorted.de.yml app/views/user
|
|
43
45
|
```
|
|
@@ -85,7 +85,7 @@ module ExtractI18n
|
|
|
85
85
|
after = m_data[3]
|
|
86
86
|
interpolate_arguments, translation = extract_arguments(translation)
|
|
87
87
|
change = ExtractI18n::SourceChange.new(
|
|
88
|
-
source_line: final_line,
|
|
88
|
+
source_line: @word.indentation + final_line,
|
|
89
89
|
i18n_string: translation,
|
|
90
90
|
i18n_key: "#{@file_key}.#{ExtractI18n.key(translation)}",
|
|
91
91
|
remove: m_data[2],
|
|
@@ -96,7 +96,11 @@ module ExtractI18n
|
|
|
96
96
|
return parse_html_arguments(final_line, &block)
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
|
-
final_line
|
|
99
|
+
if final_line == line
|
|
100
|
+
@word.indentation + final_line
|
|
101
|
+
else
|
|
102
|
+
final_line
|
|
103
|
+
end
|
|
100
104
|
end
|
|
101
105
|
|
|
102
106
|
def link_tos(line)
|
data/lib/extract_i18n/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: extract_i18n
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefan Wienert
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-10-
|
|
11
|
+
date: 2020-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|