ios_polyglot_cli 2.8.0 → 2.8.1

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: 05bc2ec0c852881bc76b3db04ffc02c092b419310f75f9794f6599186dd3a27b
4
- data.tar.gz: 50b0bf737825bd918fb00d95cd08044cc0b54abfe47f3a1e36ac1ecc2e449cb2
3
+ metadata.gz: 3374881eeb767e53761655ffe1d720b48ee2a7f3b3e323e0b732c9809583c027
4
+ data.tar.gz: e283c2b7386f09bd40ccb435d0194d5703ccb624b20fac030fdb8b7fc5795582
5
5
  SHA512:
6
- metadata.gz: d00874d440dd388c9476744d0d24c8908beab14eb6df7a7ddd3f361159b950ff6c448a1c79abf0c975281eae3c66057199e874706bdf60a9542f6462e90c6aa3
7
- data.tar.gz: 2d5f9bb9917435720af5ca2014ab36882071bc301c672bc76f5fec69d2edad5cc152312ba18f53aea52c7606ed9d7a34c693154544c882fd42d80682dbd1daeb
6
+ metadata.gz: 0247f84e318ac505a3fa6c596d0177f7e8ba7f37336e041480b12c58f6abb73315bd2afe1a5a44609fc7bd08adf5a121cd642b66e47fcaa8757534e4bc7b8f55
7
+ data.tar.gz: 8a80dd1854c325bde438874ee825b8fe9052b0fcc68e8066ee522bd2a58040e911f21d1d1a8f3a7150e87fb2933bf35ff5dce719290af924d983db3826b8b3a7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ios_polyglot_cli (2.8.0)
4
+ ios_polyglot_cli (2.8.1)
5
5
  activesupport
6
6
  commander
7
7
  json_api_client
@@ -14,6 +14,10 @@ module PolyglotIos
14
14
  clean_variable_name(name)
15
15
  end
16
16
 
17
+ def [](key)
18
+ @attributes[key.to_s]
19
+ end
20
+
17
21
  end
18
22
  end
19
23
  end
@@ -18,12 +18,17 @@ module PolyglotIos
18
18
  prompt.say("Fetching translations...")
19
19
  if generate_translations(project_configs, programming_language, skip_writing_language_struct)
20
20
  success("Translations successfully generated!")
21
+ else
22
+ prompt.say("Some of the projects had issues, please check the logs.")
21
23
  end
22
24
  end
23
25
 
24
26
  private
25
27
 
26
28
  def generate_translations(projects, programming_language, skip_writing_language_struct)
29
+
30
+ returnValue = true
31
+
27
32
  projects.each do |project|
28
33
  project_id = project[:id]
29
34
  project_fetched = pull_project(project_id)
@@ -34,19 +39,23 @@ module PolyglotIos
34
39
 
35
40
  translations = {}
36
41
 
42
+ prompt.say("Generate translations for project: #{project_fetched[0][:name]}")
43
+
37
44
  if !documentation_language.nil?
38
45
  language = find_documentation_language(documentation_language, languages)
39
46
  if language.nil?
40
- prompt.say("ABORTED with reason: DocumentationLanguage must be correctly defined in the project configuration")
41
- return {}
47
+ prompt.say("ABORTED with reason: DocumentationLanguage must be correctly defined in the project configuration, skipping project: #{project_fetched[0][:name]}")
48
+ returnValue = false
49
+ next
42
50
  end
43
51
 
44
52
  prompt.say("Found DocumentationLanguage: #{language[:name]}, documenting...")
45
53
  translations = extract_translations_for_language(translation_keys, language)
46
54
 
47
55
  if translations.empty?
48
- prompt.say("No translations found for DocumentationLanguage: #{language[:name]}, ABORTING!!!")
49
- return false
56
+ prompt.say("No translations found for DocumentationLanguage: #{language[:name]}, skipping project: #{project_fetched[0][:name]}")
57
+ returnValue = false
58
+ next
50
59
  end
51
60
  else
52
61
  language = find_default_language(default_language, languages)
@@ -66,8 +75,10 @@ module PolyglotIos
66
75
  end
67
76
 
68
77
  write_translation_sources(translation_keys, project[:sourceFilesPath], programming_language, translations)
69
- return true
70
78
  end
79
+
80
+ return returnValue
81
+
71
82
  end
72
83
 
73
84
  def extract_translations_for_language(translation_keys, language)
@@ -104,7 +115,7 @@ module PolyglotIos
104
115
  def find_default_language(default_language, languages)
105
116
  #find default language
106
117
  prompt.say("Find default_language with id: = #{default_language}")
107
- language = languages.find { |language| language[:id] == default_language }
118
+ language = languages.find { |language| language[:id].to_i == default_language }
108
119
  if language.nil?
109
120
  prompt.say('Default language not found using first language')
110
121
  # use first language
@@ -1,3 +1,3 @@
1
1
  module PolyglotIos
2
- VERSION = '2.8.0'
2
+ VERSION = '2.8.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ios_polyglot_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filip Gulan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-17 00:00:00.000000000 Z
11
+ date: 2025-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler