fastlane-plugin-google_sheet_localize 0.1.71 → 0.1.80

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: 6d39216784efa647478e422659a77e6e3d1dcf1d7fcf4fc2560e541dd1f0f9d2
4
- data.tar.gz: 144b97afe4c6afb624283bd5657893523b9b89e44d6a0f84ee7ffc2a8c29acd8
3
+ metadata.gz: 61295867eef4935018be1f7b7fe6a02185e79b10aa30588763895ff1a08cb90a
4
+ data.tar.gz: 3f2d1fcd1300cb4bc04f910ecd8bf5ee58b73a6c20efab49bdbc2ecd6f9519fb
5
5
  SHA512:
6
- metadata.gz: 7f31d65df1f0423fcc421c3d7738a303c25a7a22a02fb2fd118639d3b5f4a146321645470b36acdc4d5d54f05641cd2277b5576ca2de2968fa3b94033dc7688c
7
- data.tar.gz: e11de4088833461f54e01ccb2ba0c406ef364865baa8715c961b569875b81331b151905783ff3b631d4133386aad5f62d51d58f6e89424ded8dd961d4cfbea4b
6
+ metadata.gz: d5f3532e09b92e20633f9bb4a84828a0461157d9f3d4ca1a3e82d20cb64c2f256193c1049145128f2d9b09f2d9344ddb2e1b44ef0435227ce0d3437ec52a72a8
7
+ data.tar.gz: 0513146bb8677c96e9f327e14bfb705c8b8dee43a43e5eeb01141a657f052c17f83f99740acd021c4fafccd3c9d5a4d4f903da92c4e77a001ff99c5c003ee334
@@ -240,7 +240,24 @@ module Fastlane
240
240
 
241
241
  text = text.gsub(/\\?'/, "\\\\'")
242
242
 
243
- line = line + "\t<string name=\"#{identifier}\"><![CDATA[#{text}]]></string>\n"
243
+ if text.include? "|"
244
+
245
+ line = line + "\t<plurals name=\"#{identifier}\">\n"
246
+
247
+ plural = ""
248
+
249
+ text.dup.split("|").each_with_index { |word, wordIndex|
250
+ if wordIndex % 2 == 0
251
+ plural = plural + "<![CDATA[\"#{word}\"]]></item>\n"
252
+ line = line + plural
253
+ else
254
+ plural = "\t\t<item quantity=\"#{word}\">"
255
+ end
256
+ }
257
+ line = line + "\t</plurals>\n"
258
+ else
259
+ line = line + "\t<string name=\"#{identifier}\"><![CDATA[#{text}]]></string>\n"
260
+ end
244
261
 
245
262
  f.write(line)
246
263
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GoogleSheetLocalize
3
- VERSION = "0.1.71"
3
+ VERSION = "0.1.80"
4
4
  end
5
5
  end
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.71
4
+ version: 0.1.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Hahn