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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee5cec583ea6486b9bc763ec3912c302c0b225343718451ca8f60e283bb9d611
|
|
4
|
+
data.tar.gz: 759da241c72963c6fb91df5682e896b0c359b33ef66591ee3c23ca6709ef91af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c08a4b2fdf2382037e86cc0ed9d684b9e3e83cab109b4b8c2bc210bef498d8023296f47006d1103fc9708e548ebbb9c2bd144eb80b54ff0ea7540a6edbebfe0
|
|
7
|
+
data.tar.gz: 9bbdfda02feeb90f7f88dc9fb37205bfb4b1f2008be1ed4d86f1c36d2849572ff98563a00a07ef784939d3c870f4f1665b524d0a26c2b60785a100b3670ab33f
|
|
@@ -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}/
|
|
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 = "
|
|
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 = "
|
|
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 = "
|
|
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
|