missing_translation 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a13074eb2d7b2c22ace7a15de282c480769412b37eebb599d914ad1f963b4177
4
- data.tar.gz: 481a55cb94f2f837b9bb5aa32f2b3ea41b91e67bb7d5ba6d7d423cbd566a2a27
3
+ metadata.gz: f1a151aecd35d65f11f3bddfd9446dc2313cd4e5e9adbc1bff580f18ad0369f5
4
+ data.tar.gz: bc3e5294a08640a74d2c7db601e7cc81007b05e5e9ef7f97fc92afe82c7dc44a
5
5
  SHA512:
6
- metadata.gz: d208bce285cfab32f9435c2305fae703ce8afff13d7382166b197c28b299f6d2600ff0d2c504ae5d506aee8278e0f6d41bd5d74094e214baa4e01c01cf398975
7
- data.tar.gz: 1b441d38d2d51ae804999bf24b19f825bd9fd3b53badd2a11ad601c3dd5591c467f40e967c818919634773929099eefb6cf04db523b14ff7352d64b8684d370a
6
+ metadata.gz: ed75fa219082540942650895c32274aa05bead3250820f2363d9047f543b2875655654158fa4dc4e8cee8d6298edfea390593809e17132e9a556eb6075bfefd0
7
+ data.tar.gz: 758eab57f048daa7b974f596a8cb89f2c7e5b1bf6f8cb20107cbb88ba0f7b89afd44d932a28724cee4532ae6d721c12674be62195d3c69e5fbb4c8b5b2fce767
data/Gemfile.lock CHANGED
@@ -1,9 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- missing_translation (0.1.0)
4
+ missing_translation (0.4.0)
5
5
  httparty (~> 0.18)
6
- net-sftp (~> 3.0.0)
7
6
  thor (~> 1.1)
8
7
 
9
8
  GEM
@@ -11,17 +10,12 @@ GEM
11
10
  specs:
12
11
  ast (2.4.2)
13
12
  diff-lcs (1.5.0)
14
- httparty (0.20.0)
15
- mime-types (~> 3.0)
13
+ httparty (0.21.0)
14
+ mini_mime (>= 1.0.0)
16
15
  multi_xml (>= 0.5.2)
17
16
  json (2.6.2)
18
- mime-types (3.4.1)
19
- mime-types-data (~> 3.2015)
20
- mime-types-data (3.2022.0105)
17
+ mini_mime (1.1.5)
21
18
  multi_xml (0.6.0)
22
- net-sftp (3.0.0)
23
- net-ssh (>= 5.0.0, < 7.0.0)
24
- net-ssh (6.1.0)
25
19
  parallel (1.22.1)
26
20
  parser (3.1.2.1)
27
21
  ast (~> 2.4.1)
@@ -55,7 +49,7 @@ GEM
55
49
  rubocop-ast (1.22.0)
56
50
  parser (>= 3.1.1.0)
57
51
  ruby-progressbar (1.11.0)
58
- thor (1.2.1)
52
+ thor (1.2.2)
59
53
  unicode-display_width (2.3.0)
60
54
 
61
55
  PLATFORMS
data/README.md CHANGED
@@ -29,6 +29,11 @@ bundle exec missing_translation upload
29
29
  ```
30
30
  bundle exec missing_translation download
31
31
  ```
32
+
33
+ ### Sort yaml files
34
+ ```
35
+ bundle exec missing_translation sort
36
+ ```
32
37
  ## Development
33
38
 
34
39
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -14,7 +14,7 @@ module MissingTranslation
14
14
  File.open(FILE_NAME, 'w+') do |f|
15
15
  f.flock(File::LOCK_EX)
16
16
  f.rewind
17
- f.write({ key: nil }.to_yaml)
17
+ f.write({ key: nil, locale_prefix: true }.to_yaml)
18
18
  f.flush
19
19
  end
20
20
  end
@@ -4,7 +4,7 @@ require 'missing_translation/translation_file'
4
4
 
5
5
  module MissingTranslation
6
6
  class TranslationFile
7
- attr_accessor :pathname, :content, :group, :language, :translations
7
+ attr_accessor :pathname, :content, :group, :language, :translations, :locale_prefix
8
8
 
9
9
  def initialize(pathname = nil)
10
10
  return unless pathname
@@ -45,6 +45,7 @@ module MissingTranslation
45
45
  filename = [group, language, "yml"].compact.reject{|s| s.size <= 0}.join('.')
46
46
  filepath = "#{directory}/#{filename}"
47
47
  p "Writing file #{filepath}..."
48
+
48
49
  File.write(filepath, translations.to_yaml)
49
50
  MissingTranslation::Util.sort_file(filepath)
50
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MissingTranslation
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: missing_translation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Clercin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-13 00:00:00.000000000 Z
11
+ date: 2023-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -38,21 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.18'
41
- - !ruby/object:Gem::Dependency
42
- name: net-sftp
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 3.0.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 3.0.0
55
- description:
41
+ description:
56
42
  email:
57
43
  - kevin@9troisquarts.com
58
44
  executables:
@@ -86,7 +72,7 @@ metadata:
86
72
  homepage_uri: https://github.com/9troisquarts/missing_translation
87
73
  source_code_uri: https://github.com/9troisquarts/missing_translation
88
74
  changelog_uri: https://github.com/9troisquarts/missing_translation/CHANGELOG.md
89
- post_install_message:
75
+ post_install_message:
90
76
  rdoc_options: []
91
77
  require_paths:
92
78
  - lib
@@ -102,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
88
  version: '0'
103
89
  requirements: []
104
90
  rubygems_version: 3.3.7
105
- signing_key:
91
+ signing_key:
106
92
  specification_version: 4
107
93
  summary: Upload and download your I18n to missing translation
108
94
  test_files: []