fastlane-plugin-google_sheet_localize 0.1.53 → 0.1.54
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0a7c8b39bcba4562285f0e04b78d18985d058b02fa3190906827ca08a05034
|
4
|
+
data.tar.gz: f542192380763fd64fdc22f4a7ec5e6f72e62aa396789814db2025824ab84cb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 414d513e932c344facd9321d59985ad186d101ced91709294694be4a5189b1c660493b04d3be7a81172c247bad8652705201d6ccc2dd60c3284506bdbf703721
|
7
|
+
data.tar.gz: fe0f35acc913ef7f3e3adb4848173d689a855cf51238d240ca45ec8ce52a902ce6ec832db448ee0d8f364bca8f5d537fba143611f80a20a729536e7709947040
|
@@ -13,39 +13,39 @@ module Fastlane
|
|
13
13
|
tabs = params[:tabs]
|
14
14
|
platform = params[:platform]
|
15
15
|
path = params[:localization_path]
|
16
|
+
language_titles = params[:language_titles]
|
16
17
|
|
17
18
|
spreadsheet = session.spreadsheet_by_url(spreadsheet_id)
|
18
|
-
|
19
|
-
# Get the first worksheet
|
20
19
|
worksheet = spreadsheet.worksheets.first
|
21
20
|
|
22
|
-
languages = self.numberOfLanguages(worksheet)
|
23
|
-
|
24
21
|
result = []
|
25
22
|
|
26
|
-
for i in
|
23
|
+
for i in 0..worksheet.max_cols
|
24
|
+
|
27
25
|
title = worksheet.rows[0][i]
|
28
26
|
|
29
|
-
|
30
|
-
'language' => title,
|
31
|
-
'items' => []
|
32
|
-
}
|
27
|
+
if language_titles.include?(title)
|
33
28
|
|
34
|
-
|
29
|
+
language = {
|
30
|
+
'language' => title,
|
31
|
+
'items' => []
|
32
|
+
}
|
35
33
|
|
36
|
-
|
37
|
-
filterdWorksheets = spreadsheet.worksheets
|
38
|
-
else
|
39
|
-
filterdWorksheets = spreadsheet.worksheets.select { |item| tabs.include?(item.title) }
|
40
|
-
end
|
34
|
+
filterdWorksheets = []
|
41
35
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
36
|
+
if tabs.count == 0
|
37
|
+
filterdWorksheets = spreadsheet.worksheets
|
38
|
+
else
|
39
|
+
filterdWorksheets = spreadsheet.worksheets.select { |item| tabs.include?(item.title) }
|
40
|
+
end
|
46
41
|
|
47
|
-
|
42
|
+
filterdWorksheets.each { |worksheet|
|
43
|
+
contentRows = worksheet.rows.drop(1)
|
44
|
+
language['items'].concat(self.generateJSONObject(contentRows, i))
|
45
|
+
}
|
48
46
|
|
47
|
+
result.push(language)
|
48
|
+
end
|
49
49
|
end
|
50
50
|
self.createFiles(result, platform, path)
|
51
51
|
end
|
@@ -269,11 +269,6 @@ module Fastlane
|
|
269
269
|
return filtered
|
270
270
|
end
|
271
271
|
|
272
|
-
def self.numberOfLanguages(worksheet)
|
273
|
-
i = worksheet.num_cols
|
274
|
-
return i - 3
|
275
|
-
end
|
276
|
-
|
277
272
|
def self.description
|
278
273
|
"Creates .strings files for iOS and strings.xml files for Android"
|
279
274
|
end
|
@@ -314,6 +309,11 @@ module Fastlane
|
|
314
309
|
description: "Array of all Google Sheet Tabs",
|
315
310
|
optional: false,
|
316
311
|
type: Array),
|
312
|
+
FastlaneCore::ConfigItem.new(key: :language_titles,
|
313
|
+
env_name: "LANGUAGE_TITLES",
|
314
|
+
description: "Alle language titles",
|
315
|
+
optional: false,
|
316
|
+
type: Array),
|
317
317
|
FastlaneCore::ConfigItem.new(key: :localization_path,
|
318
318
|
env_name: "LOCALIZATION_PATH",
|
319
319
|
description: "Output path",
|