missing_translation 0.3.0 → 0.4.1

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: a0d7abeda779628c842a69fbddd073eaa39e2fc2b3a82f51c96679d20deedbd0
4
+ data.tar.gz: 0deb15104834f00d0bc5e84679ae862a1dcc554b8975ab3d350d9459321cc541
5
5
  SHA512:
6
- metadata.gz: d208bce285cfab32f9435c2305fae703ce8afff13d7382166b197c28b299f6d2600ff0d2c504ae5d506aee8278e0f6d41bd5d74094e214baa4e01c01cf398975
7
- data.tar.gz: 1b441d38d2d51ae804999bf24b19f825bd9fd3b53badd2a11ad601c3dd5591c467f40e967c818919634773929099eefb6cf04db523b14ff7352d64b8684d370a
6
+ metadata.gz: 144e61987c30565c1e902fcb06c1de9012bc31894608676999f3681ded6f427599cba102b6b861a664aac237767adbf42ff776b2a775304eeb528483889fb58d
7
+ data.tar.gz: acdea8167618117706a904f4c123e47908e5e679828d70889781faa29b26768d155d64f3f7541a74a9611084357650b08addaec9c77d68aa0ce96aad07dfd903
data/Gemfile.lock CHANGED
@@ -1,27 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- missing_translation (0.1.0)
4
+ missing_translation (0.4.1)
5
5
  httparty (~> 0.18)
6
- net-sftp (~> 3.0.0)
7
6
  thor (~> 1.1)
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
11
  ast (2.4.2)
12
+ csv (3.3.0)
13
13
  diff-lcs (1.5.0)
14
- httparty (0.20.0)
15
- mime-types (~> 3.0)
14
+ httparty (0.22.0)
15
+ csv
16
+ mini_mime (>= 1.0.0)
16
17
  multi_xml (>= 0.5.2)
17
18
  json (2.6.2)
18
- mime-types (3.4.1)
19
- mime-types-data (~> 3.2015)
20
- mime-types-data (3.2022.0105)
19
+ mini_mime (1.1.5)
21
20
  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
21
  parallel (1.22.1)
26
22
  parser (3.1.2.1)
27
23
  ast (~> 2.4.1)
@@ -55,7 +51,7 @@ GEM
55
51
  rubocop-ast (1.22.0)
56
52
  parser (>= 3.1.1.0)
57
53
  ruby-progressbar (1.11.0)
58
- thor (1.2.1)
54
+ thor (1.3.1)
59
55
  unicode-display_width (2.3.0)
60
56
 
61
57
  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.1"
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require 'httparty'
2
+ require 'json'
2
3
 
3
4
  class MissingTranslationApi
4
5
  include HTTParty
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.1
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: 2024-07-03 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: []