cocoapods-aqara-localzedLoader 0.1.2 → 0.1.4

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: 1e70f56c6a4c111a829cb2445874289ff54644cac2f5dcec7e978e17e4d19daa
4
- data.tar.gz: dd0ee04d07d5bcb9f305845d2080497500495102c5f30418f33aac665c07c2b1
3
+ metadata.gz: 18cc712b8e18caa725ef0771d2e82fa3629199f25bfbcde33835947a834fc9dc
4
+ data.tar.gz: ebace3674c9c3a272ce51bc286db4c38959afae2df73bb67665552205c24ecb1
5
5
  SHA512:
6
- metadata.gz: 0a7433407491b6527d5cd2b5e63f21f2b45dbc444f43993b5644b1a885c9d7435dc5e378b6d2613df2cf57503b281938c66b34866e6b29a1b8bdba58b27a0468
7
- data.tar.gz: 3ebe77422d8f4b5c44c715f72a12017ebe2bafae2a99a1a495fc1b95e4cf29359e3edb4e816b38157e5c8496465dc1a5623ff2c136e500fad6ad5b818666b6cf
6
+ metadata.gz: d4dc5c9bffdd2945ab6b890a2431a84caf285274297f746cf04bc2e36005e12146b8048b560e293d975ba4f2620731653d2a05d865d76a01aa0d95899fcf3215
7
+ data.tar.gz: 72bd2f0f1219a603109e789229014df977b608585ecbb6e9dafc3f5538e9aa8ada8f86b578666e0652df877573517709c5675ca46b6d6b48886663245da6eac3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-aqara-localzedLoader (0.0.9)
4
+ cocoapods-aqara-localzedLoader (0.1.4)
5
5
  claide (>= 1.0.2, < 2.0)
6
6
  colored2
7
7
  fileutils
@@ -18,18 +18,27 @@ class File_util
18
18
  workbook = RubyXL::Parser.parse filename
19
19
  worksheet = workbook[0]
20
20
 
21
- # if crowdin
22
- # last_col_index = worksheet[0].cells.size # 当前最后一列索引+1
23
- #
24
- # # 遍历 B 列(索引 1)所有行
25
- # worksheet.each_with_index do |row, row_index|
26
- # b_value = row && row[1] ? row[1].value : nil
27
- # worksheet.add_cell(row_index, last_col_index, b_value)
28
- # end
29
- #
30
- # worksheet[0].cells[last_col_index] = worksheet.add_cell(0, last_col_index, 'zh-CN')
31
- # workbook.write(filename)
32
- # end
21
+ if crowdin
22
+ first_row = worksheet[0]
23
+ zh_cn_col = first_row.cells.index { |c| c && c.value == 'zh-CN' }
24
+
25
+ if zh_cn_col
26
+ worksheet.each do |row|
27
+ row&.cells&.delete_at(zh_cn_col)
28
+ end
29
+ end
30
+
31
+ last_col_index = worksheet[0].cells.size # 当前最后一列索引+1
32
+
33
+ # 遍历 B 列(索引 1)所有行
34
+ worksheet.each_with_index do |row, row_index|
35
+ b_value = row && row[1] ? row[1].value : nil
36
+ worksheet.add_cell(row_index, last_col_index, b_value)
37
+ end
38
+
39
+ worksheet[0].cells[last_col_index] = worksheet.add_cell(0, last_col_index, 'zh-CN')
40
+ workbook.write(filename)
41
+ end
33
42
 
34
43
  row1 = worksheet[0]
35
44
  @key_hash = getkeyHash(row1)
@@ -1,3 +1,3 @@
1
1
  module Localzedloader
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -79,7 +79,7 @@ class BundleGenerater
79
79
 
80
80
  f_path = "#{project_path}/download.xlsx"
81
81
  if crowdin
82
- f_path = "#{project_path}/APP/Aqara_Home_App.xlsx"
82
+ f_path = "#{project_path}/APP/APP.xlsx"
83
83
  end
84
84
 
85
85
  puts f_path
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-aqara-localzedLoader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhaoxifan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-27 00:00:00.000000000 Z
11
+ date: 2025-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler