cocoapods-localzedLoader 0.1.7 → 0.2.0
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: 6ad0d7282a9174ab511426a98b265573e976355cf155352027781a9a15726ec4
|
|
4
|
+
data.tar.gz: 78c4d779fffb4b35ee48350d4538171384982351edd1f40e09d8e864aa384d48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae961dc62b9f9c019270867bb69dae020ab395cbe568e7b01fba7b8474252a9c337a2ffbdea59384fb61d078f4caf00a4740f7c1f86145438504ecad89e6f25e
|
|
7
|
+
data.tar.gz: 5dd20aaf94317fe771f41567e69c71ab57e111bd59284da49cb546ae628d15ceedce78e704de0a284416be9aeb02f6a719005b334afe2b081770d0fb58278fc6
|
|
@@ -19,7 +19,7 @@ module Pod
|
|
|
19
19
|
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
|
20
20
|
# in the `plugins.json` file, once your plugin is released.
|
|
21
21
|
#
|
|
22
|
-
class
|
|
22
|
+
class Download < Command
|
|
23
23
|
self.summary = 'langDownnloader for user'
|
|
24
24
|
|
|
25
25
|
self.description = <<-DESC
|
|
@@ -30,9 +30,14 @@ module Pod
|
|
|
30
30
|
|
|
31
31
|
def initialize(argv)
|
|
32
32
|
super
|
|
33
|
+
# puts "初始化:#{argv}"
|
|
33
34
|
project_directory = argv.option('project-directory')
|
|
35
|
+
puts project_directory
|
|
34
36
|
project_directory = Dir.pwd if project_directory.nil?
|
|
37
|
+
puts project_directory
|
|
35
38
|
@project_directory = Pathname.new(project_directory).expand_path
|
|
39
|
+
puts project_directory
|
|
40
|
+
|
|
36
41
|
end
|
|
37
42
|
def self.options
|
|
38
43
|
[
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module
|
|
2
|
-
VERSION = "0.
|
|
1
|
+
module Localizedloader
|
|
2
|
+
VERSION = "0.2.0"
|
|
3
3
|
end
|
|
@@ -28,6 +28,9 @@ class BundleGenerater
|
|
|
28
28
|
dir = File.dirname localized_file
|
|
29
29
|
FileUtils.rm_rf localized_file
|
|
30
30
|
FileUtils.mkdir_p dir
|
|
31
|
+
new_file = File.new(localized_file, "w")
|
|
32
|
+
new_file.close
|
|
33
|
+
|
|
31
34
|
end
|
|
32
35
|
|
|
33
36
|
#生成资源文件
|
|
@@ -45,8 +48,11 @@ class BundleGenerater
|
|
|
45
48
|
end
|
|
46
49
|
str = %Q|"#{key}" = "#{value}";\n|
|
|
47
50
|
localized_file = "./#{lang}.lproj/Localizable.strings"
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
|
|
52
|
+
if File.exist?(localized_file)
|
|
53
|
+
File.open(localized_file, "a") do |io|
|
|
54
|
+
io.write str
|
|
55
|
+
end
|
|
50
56
|
end
|
|
51
57
|
|
|
52
58
|
#如果是infoplist里的key,就写入指定的文件
|
|
@@ -106,7 +112,9 @@ class BundleGenerater
|
|
|
106
112
|
file_til.getLangList.each do |lang|
|
|
107
113
|
path = "./#{lang}.lproj/Localizable.strings"
|
|
108
114
|
dest = bundPath + "/#{lang}.lproj"
|
|
115
|
+
dest2 = "./AqaraHome/Resource/#{lang}.lproj"
|
|
109
116
|
FileUtils.mkdir_p dest
|
|
117
|
+
FileUtils.cp(path,dest2)
|
|
110
118
|
FileUtils.mv("#{path}",dest,force:true)
|
|
111
119
|
|
|
112
120
|
info_plist_file = "./#{lang}.lproj/InfoPlist.strings"
|
data/lib/cocoapods_plugin.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'cocoapods-localzedLoader/command'
|
|
|
2
2
|
require_relative 'cocoapods-localzedLoader/ios_bundle_generate'
|
|
3
3
|
module Pod
|
|
4
4
|
Pod::HooksManager.register('cocoapods-localzedLoader', :pre_install) do |context|
|
|
5
|
-
args = ['
|
|
5
|
+
args = ['download', "--project-directory=#{Config.instance.installation_root}"]
|
|
6
6
|
Pod::Command.run(args)
|
|
7
7
|
end
|
|
8
8
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocoapods-localzedLoader
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jeremylu
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|
|
@@ -60,7 +60,7 @@ homepage: https://github.com/EXAMPLE/cocoapods-localzedLoader
|
|
|
60
60
|
licenses:
|
|
61
61
|
- MIT
|
|
62
62
|
metadata: {}
|
|
63
|
-
post_install_message:
|
|
63
|
+
post_install_message:
|
|
64
64
|
rdoc_options: []
|
|
65
65
|
require_paths:
|
|
66
66
|
- lib
|
|
@@ -75,8 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
75
75
|
- !ruby/object:Gem::Version
|
|
76
76
|
version: '0'
|
|
77
77
|
requirements: []
|
|
78
|
-
rubygems_version: 3.
|
|
79
|
-
signing_key:
|
|
78
|
+
rubygems_version: 3.4.6
|
|
79
|
+
signing_key:
|
|
80
80
|
specification_version: 4
|
|
81
81
|
summary: A longer description of cocoapods-localzedLoader.
|
|
82
82
|
test_files: []
|