cocoapods-aqara-localzedLoader 0.1.14 → 0.1.15

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: 5948996583d83aa8a72956d07acff0109ab3d72967c56fb7ced1824fe98d14e8
4
- data.tar.gz: eeb047467d631e9aaf3816ff82176429ff753b6f6ac90b0c10ee7d07b52a16b5
3
+ metadata.gz: ee5cec583ea6486b9bc763ec3912c302c0b225343718451ca8f60e283bb9d611
4
+ data.tar.gz: 759da241c72963c6fb91df5682e896b0c359b33ef66591ee3c23ca6709ef91af
5
5
  SHA512:
6
- metadata.gz: 4ff0b6b2062358e45fb3d3c804f1aff3bfe0d2e2b5abf4ee8a0c302ec5921057fd83fa30651b913cab235594d26735409fd8ce88cdc0ca6c13039c47cbf0129a
7
- data.tar.gz: c70258231afbf89737ee7c6accddea47b62c655d548be43f2f9f6bb9b6e3b04d5c20097043f6ea8f59fa089d0f1320b10ecd568eb833ae5e1679d2f87c2d88cd
6
+ metadata.gz: 8c08a4b2fdf2382037e86cc0ed9d684b9e3e83cab109b4b8c2bc210bef498d8023296f47006d1103fc9708e548ebbb9c2bd144eb80b54ff0ea7540a6edbebfe0
7
+ data.tar.gz: 9bbdfda02feeb90f7f88dc9fb37205bfb4b1f2008be1ed4d86f1c36d2849572ff98563a00a07ef784939d3c870f4f1665b524d0a26c2b60785a100b3670ab33f
@@ -1,3 +1,3 @@
1
1
  module Localzedloader
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -10,6 +10,10 @@ class BundleGenerater
10
10
  "crowdin_life.yml" => "85",
11
11
  "crowdin.yml" => "71"
12
12
  }.freeze
13
+ PROJECT_APP_DIRS = {
14
+ "85" => "AqaraLife",
15
+ "71" => "AqaraHome"
16
+ }.freeze
13
17
 
14
18
 
15
19
  # INFO_PLIST_ARRAY = [NSAppleMusicUsageDescription","NSLocalNetworkUsageDescription"]
@@ -57,11 +61,16 @@ class BundleGenerater
57
61
 
58
62
  @@download_Count = 1
59
63
 
64
+ def self.app_dir_name(project_id)
65
+ PROJECT_APP_DIRS.fetch(project_id, "AqaraHome")
66
+ end
67
+
60
68
  def self.resolve_crowdin_project(project_path)
61
69
  CROWDIN_PROJECTS.each do |config_name, project_id|
70
+ app_dir = self.app_dir_name(project_id)
62
71
  [
63
72
  "#{project_path}/#{config_name}",
64
- "#{project_path}/AqaraHome/Common/#{config_name}"
73
+ "#{project_path}/#{app_dir}/Common/#{config_name}"
65
74
  ].each do |config_path|
66
75
  next unless File.exist?(config_path)
67
76
 
@@ -103,6 +112,7 @@ class BundleGenerater
103
112
 
104
113
  crowdin_info = self.resolve_crowdin_project(project_path)
105
114
  crowdin = crowdin_info[:enabled]
115
+ app_dir = self.app_dir_name(crowdin_info[:project_id])
106
116
 
107
117
  f_path = "#{project_path}/download.xlsx"
108
118
  if crowdin
@@ -221,7 +231,7 @@ class BundleGenerater
221
231
  #拷贝到代码仓库里
222
232
  #查找bundle路径
223
233
  bundPath = ""
224
- info_plist_path = "./AqaraHome/Resource"
234
+ info_plist_path = "./#{app_dir}/Resource"
225
235
  require 'find'
226
236
  Find.find("./") do |filePath|
227
237
  if filePath.end_with?("LMFramework.bundle")
@@ -238,7 +248,7 @@ class BundleGenerater
238
248
  file_til.getLangList.each do |lang|
239
249
  path = "./#{lang}.lproj/Localizable.strings"
240
250
  dest = bundPath + "/#{lang}.lproj"
241
- dest2 = "./AqaraHome/Resource/#{lang}.lproj"
251
+ dest2 = "./#{app_dir}/Resource/#{lang}.lproj"
242
252
  FileUtils.mkdir_p dest
243
253
  FileUtils.cp(path,dest2)
244
254
  FileUtils.mv("#{path}",dest,force:true)
@@ -247,7 +257,7 @@ class BundleGenerater
247
257
  # puts "path::::::#{info_plist_file}"
248
258
  if File.exist? info_plist_file
249
259
  copy_info_plist = true
250
- dest = "./AqaraHome/Resource/#{lang}.lproj"
260
+ dest = "./#{app_dir}/Resource/#{lang}.lproj"
251
261
  FileUtils.mkdir_p dest
252
262
  FileUtils.mv("#{info_plist_file}",dest,force:true)
253
263
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-aqara-localzedLoader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhaoxifan