fastlane-plugin-google_sheet_localize 0.1.51 → 0.1.52
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: 5ea42ee15d69f1ce5642d240fc69e752a4df45ff8534a3eb6955444efaa7f4f5
|
4
|
+
data.tar.gz: 80c038a3a483ed00dfd06493f285cec855cbc08331a67d4e7cda56950b0f7a5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e3a4e3689d6503a434c003cd131453107e7373e0bab708804aea0c7d806929a97de2bf5bf9a6f969febd38d125257ea86e399b5bff17513c199a26bfe8e5e4e
|
7
|
+
data.tar.gz: 456392ad5dfb062cb610c11d860101e0839f43b67e21b70376ad749393ebc23a8ef0bbc16cab14fc60a53b8f4b400f1a4afaf39a71cd10d7dd8f5e541b82bd8a
|
@@ -175,12 +175,35 @@ module Fastlane
|
|
175
175
|
end
|
176
176
|
|
177
177
|
if platform == "android"
|
178
|
-
|
179
|
-
|
178
|
+
languageDir = language['language']
|
179
|
+
|
180
|
+
if languageDir == "en"
|
181
|
+
languageDir = "values"
|
182
|
+
else
|
183
|
+
languageDir = "values-#{languageDir}"
|
184
|
+
end
|
185
|
+
|
186
|
+
FileUtils.mkdir_p "#{destinationPath}/#{languageDir}"
|
187
|
+
File.open("#{destinationPath}/#{languageDir}/strings.xml", "w") do |f|
|
180
188
|
f.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
|
181
189
|
f.write("<resources>\n")
|
182
190
|
language["items"].each { |item|
|
183
|
-
|
191
|
+
|
192
|
+
comment = item['comment']
|
193
|
+
identifier = item['identifierAndroid']
|
194
|
+
text = item['text']
|
195
|
+
|
196
|
+
if !identifier.to_s.empty? && identifier != "NR"
|
197
|
+
line = ""
|
198
|
+
|
199
|
+
if !comment.to_s.empty?
|
200
|
+
line = line + "\t<!--#{comment}-->\n"
|
201
|
+
end
|
202
|
+
|
203
|
+
line = line + "\t<string name=\"#{identifier}\"><![CDATA[#{text}]]></string>\n"
|
204
|
+
|
205
|
+
f.write(line)
|
206
|
+
end
|
184
207
|
}
|
185
208
|
f.write("</resources>\n")
|
186
209
|
end
|
@@ -245,7 +268,7 @@ module Fastlane
|
|
245
268
|
end
|
246
269
|
|
247
270
|
def self.mapInvalidPlaceholder(text)
|
248
|
-
filtered = text.gsub('%s', '%@')
|
271
|
+
filtered = text.gsub('%s', '%@').gsub('"', '\"')
|
249
272
|
return filtered
|
250
273
|
end
|
251
274
|
|