missing_translation 0.1.0 → 0.2.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: c635cce1eb98a5bd1f740a60b7311e85cd2ec15532add15927a7012167f0ed40
4
- data.tar.gz: c0c7c35e2f50c131d1a49461351a983daf2b700a96843918916f17a340d5c7d5
3
+ metadata.gz: 5935fba9f02fe6b32f835ce25ce5bd32ff8d477ccfa292ffa77ffac437568cb3
4
+ data.tar.gz: eedafc5365f8cf312326cf9afaeb05d5d28a1eb10c92fe780472a1b0004859f3
5
5
  SHA512:
6
- metadata.gz: 1d50f60a5a94a4899b11d48b578ae9796835f1785894da4c969798cecea213da022bdc44d7bf44872f58fa31b4661bdcf29cb56ddb21b9ebe56c1b90f6adc565
7
- data.tar.gz: 29c527801c6a65cd9be76afe5f47d83090b9bcf1e45a37d9ad94ec29a1ca1d3efd55e3aa8581b9018035b25aa9747a1f5356123984dc567227eb39b514109689
6
+ metadata.gz: 10a5418ce724f2a5fbf289eee0056a1916fbdf1db0f2a81952525c05484fa6d70dd8a45c5c3cb5f1bd453c2001917341544d589e0f207c061ad16e426afcf2bc
7
+ data.tar.gz: 59fb636dfce9eeb21a1b105100b8dac67874119651952aae124eb61afe4b486137f7e450f79b6f3834fa44bd90fc918b515c7a195c9d87967522d3d4bb4a6207
@@ -29,9 +29,6 @@ module MissingTranslation
29
29
  api = MissingTranslationApi.new(configuration.config[:key])
30
30
  file_pathnames.each do |pathname|
31
31
  file = MissingTranslation::TranslationFile.new(pathname)
32
- p file.language
33
- p file.group
34
- p file.to_json
35
32
  api.upload(file.language, file.group, file.to_json, "yaml")
36
33
  end
37
34
  end
@@ -17,8 +17,11 @@ module MissingTranslation
17
17
 
18
18
  def to_json
19
19
  return nil unless @content
20
-
21
- @content.to_hash
20
+
21
+ hash_content = @content.to_hash
22
+ return hash_content[language] if hash_content.has_key?(language)
23
+
24
+ hash_content
22
25
  end
23
26
 
24
27
  def group
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MissingTranslation
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
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.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Clercin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor