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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e8c03edd94a9dd0fd99ecb17c2f2140b9ba96894a3e36b29ae623b5a79cfec8
4
- data.tar.gz: 2c7bd0bae8c25e443d7f33c31dbdc5eb0832ad0d9bf2367a051555e16dcc8176
3
+ metadata.gz: 9d5459b5c55363dfd1893ecafd4d3eb0bea7db570a54da421782a36750dfc50c
4
+ data.tar.gz: a9a335109c2ad690a9234f95e7bfe5a24fff8f5a5eb7d642031d3a402773a223
5
5
  SHA512:
6
- metadata.gz: a3b44e7bdc8c7b4db6a8391c6cdfc2b82ec9bde4c0fc4cf4feffc982cbeb016dec5ee979799a77b7ed96029693cc059082161882b8e7443aceee50be8651e9fe
7
- data.tar.gz: 637756d6127ccb0a719e723a6d155206a5b87a485e3b91c2698bd8749ab24f73765df1fb66cf79ec3e1af253e3fe28c8333bf009ffce7db79ea58f535e1e13c1
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
  [![Gem Version](https://badge.fury.io/rb/extract_i18n.svg)](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 --helper
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)
@@ -1,3 +1,3 @@
1
1
  module ExtractI18n
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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-07 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri