fastlane-plugin-google_sheet_localize 0.1.65 → 0.1.66
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: 5ce3f8bbf0ad1e96decca4d373fe7e3b218716d72e02d7d2fb02ac1c1f666efd
|
4
|
+
data.tar.gz: 0ecb546fd36c4f898210400be042305f0321f553e479f6460817056688508f85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02233a92fa1025e80dfb58faa30a18c6a64703d0fe9f0b38b55565bb7db3fa0db0b92bc1fbbb70a139295aca66b081b3569c19f63f76a027da93cd9b68f9704b
|
7
|
+
data.tar.gz: e03e1b0d270ef3e02a8bb5bc3ac720908634c813131b8f8575e14bbf4d4da403c9ef67a7446d0c73a2384be0dcb1fc07bbc91a65fa5a797fd4979f54e4af3718
|
@@ -15,6 +15,7 @@ module Fastlane
|
|
15
15
|
path = params[:localization_path]
|
16
16
|
language_titles = params[:language_titles]
|
17
17
|
default_language = params[:default_language]
|
18
|
+
base_language = params[:base_language]
|
18
19
|
|
19
20
|
spreadsheet = session.spreadsheet_by_url(spreadsheet_id)
|
20
21
|
worksheet = spreadsheet.worksheets.first
|
@@ -48,7 +49,7 @@ module Fastlane
|
|
48
49
|
result.push(language)
|
49
50
|
end
|
50
51
|
end
|
51
|
-
self.createFiles(result, platform, path, default_language)
|
52
|
+
self.createFiles(result, platform, path, default_language, base_language)
|
52
53
|
end
|
53
54
|
|
54
55
|
def self.generateJSONObject(contentRows, index)
|
@@ -89,8 +90,8 @@ module Fastlane
|
|
89
90
|
}
|
90
91
|
end
|
91
92
|
|
92
|
-
def self.createFiles(languages, platform, destinationPath, defaultLanguage)
|
93
|
-
self.createFilesForLanguages(languages, platform, destinationPath, defaultLanguage)
|
93
|
+
def self.createFiles(languages, platform, destinationPath, defaultLanguage, base_language)
|
94
|
+
self.createFilesForLanguages(languages, platform, destinationPath, defaultLanguage, base_language)
|
94
95
|
|
95
96
|
if platform == "ios"
|
96
97
|
|
@@ -137,7 +138,7 @@ module Fastlane
|
|
137
138
|
end
|
138
139
|
end
|
139
140
|
|
140
|
-
def self.createFilesForLanguages(languages, platform, destinationPath, defaultLanguage)
|
141
|
+
def self.createFilesForLanguages(languages, platform, destinationPath, defaultLanguage, base_language)
|
141
142
|
|
142
143
|
languages.each { |language|
|
143
144
|
|
@@ -146,8 +147,15 @@ module Fastlane
|
|
146
147
|
filteredItems = self.filterUnusedRows(language["items"],'identifierIos')
|
147
148
|
|
148
149
|
filename = "Localizable.strings"
|
149
|
-
|
150
|
-
|
150
|
+
|
151
|
+
languageName = language['language']
|
152
|
+
|
153
|
+
if languageName == base_language
|
154
|
+
languageName = "Base"
|
155
|
+
end
|
156
|
+
|
157
|
+
filepath = "#{destinationPath}/#{languageName}.lproj/#{filename}"
|
158
|
+
FileUtils.mkdir_p "#{destinationPath}/#{languageName}.lproj"
|
151
159
|
File.open(filepath, "w") do |f|
|
152
160
|
filteredItems.each_with_index { |item, index|
|
153
161
|
|
@@ -342,6 +350,11 @@ module Fastlane
|
|
342
350
|
description: "Default Language",
|
343
351
|
optional: false,
|
344
352
|
type: String),
|
353
|
+
FastlaneCore::ConfigItem.new(key: :base_language,
|
354
|
+
env_name: "BASE_LANGUAGE",
|
355
|
+
description: "Base language for Xcode projects",
|
356
|
+
optional: true,
|
357
|
+
type: String),
|
345
358
|
FastlaneCore::ConfigItem.new(key: :localization_path,
|
346
359
|
env_name: "LOCALIZATION_PATH",
|
347
360
|
description: "Output path",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-google_sheet_localize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.66
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Hahn
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
type: :
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|