cocoapods-aomi-bin 0.1.2 → 0.1.3

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: ff454de568d2c55f94a01c7c5309403ce55484b1e249f93dff8e5f4d2444ba89
4
- data.tar.gz: b8d6e9bca5a8be1808ba78bfc4a9cb4fba8c0cd5dd7599a4c9f6aabbcfa02170
3
+ metadata.gz: 761d8708d5a6a58529721f57a03176cc6b304a299d73786da206eb2a891b55d6
4
+ data.tar.gz: b74e89002309aa292a591e0a37af7cc2f02bb0064ee517d12cd86cfc03e17936
5
5
  SHA512:
6
- metadata.gz: 5903c78b3823f165bd11a85cf6e31ba6563222a572f01b69b0c1233df4f846410eca99f054668a18368d03fa0fb0b0e35a19db59c8f2c673992bbe7ae63caab3
7
- data.tar.gz: 586dac7e96c3d2ccf29d089134e5c8140da29086d87e52e54196bdf1c73121a1ac89aba955b0ec3f5feb14e5e441bb0da797b29418190d3525bc3d07dc9c4beb
6
+ metadata.gz: 9a7eddbb8207315d61bda960964b0c051903f8d54c851959383a073a32786b2738a1b0eaf3e2c52ccf56db59fb6869f118b77ea4296ad0b71529f69966f8036f
7
+ data.tar.gz: d7e57971be1d7f009f5699c43ebd72a9191949cc30c051e3776592d72f5ec831bc0cb568933c4991bb746832079b36db1dcb15ad3f5212b3ab617d0e316136dc
@@ -33,16 +33,15 @@ module Pod
33
33
  @modify_file_type = argv.option('modify-file-type', 'm,h')
34
34
  @modify_format_string = argv.option('modify-format-string', 'NSLocalizedString(%s, @"")')
35
35
  @key_map = {}
36
- @cn_key_map = {}
37
36
  super
38
37
  end
39
38
 
40
39
  def run
41
40
  read_csv_file
42
41
  if @key_map.keys.length.positive?
43
- write_en_strings
44
- write_zh_cn_strings
45
- write_zh_hk_strings
42
+ # write_en_strings
43
+ # write_zh_cn_strings
44
+ # write_zh_hk_strings
46
45
  handle_modify_source if @modify_source_flag
47
46
  else
48
47
  UI.puts "获取中英文映射文件失败, 检查参数--csv-file=xx是否正常\n".red
@@ -110,7 +109,10 @@ module Pod
110
109
 
111
110
  def find_key_by_cn_val(val)
112
111
  cn_key = val[2, val.length - 3]
113
- @cn_key_map[cn_key]
112
+ index = @key_map.values.find_index do |obj|
113
+ /^#{cn_key}$/ =~ obj[:zh]
114
+ end
115
+ @key_map.values[index][:key] if index
114
116
  end
115
117
 
116
118
  def read_csv_file
@@ -118,10 +120,7 @@ module Pod
118
120
  Dir.glob(path).each do |p|
119
121
  CSV.foreach(p) do |row|
120
122
  key = row[@key_col]
121
- unless key =~ /[\u4e00-\u9fa5]/
122
- @key_map[key] = { zh: row[@cn_col], en: row[@en_col] }
123
- @cn_key_map[row[@cn_col]] = key
124
- end
123
+ @key_map[key] = { key: key, zh: row[@cn_col], en: row[@en_col] } unless key =~ /[\u4e00-\u9fa5]/
125
124
  end
126
125
  end
127
126
  end
@@ -1,5 +1,5 @@
1
1
  module CBin
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
4
4
 
5
5
  module Pod
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-aomi-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian