fastlane-plugin-plural_converter 0.1.1 → 0.2.0

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: cf3a74e631803021a39eb5ef7f4f2c77a41da9f2698b5c3e2cd2b36d56119357
4
- data.tar.gz: c6e714a9742d205e944474a94462b0eea92d7fe4ff17aef5bacadf99452ff37f
3
+ metadata.gz: f7c6f4ef22a48ff8a1aeb9214893dc7cb0e9761830d92a898599abb1dbe00cf3
4
+ data.tar.gz: 7bb21cf22ab6c903fbecdd482aed494ffcb530a2208bc4f9c32c1db0a2579f89
5
5
  SHA512:
6
- metadata.gz: b2aaf3f359ef4872276410c4bbaa619ced4d540e54ee0144fab8ea5f6fda0524cbd2ab89a5eba6e9f26d142f63ddc8fdb95bf2d5eaaadce83d891b0beac28099
7
- data.tar.gz: 70cd59c0d6d56da7b2bdf6bfc819e4bc3d2899da2ebdfc2ad07c948b9fe47810c406e3bc40b80d631fbc8ce7ca3c2a1ff2eb10b7df5b198827af6967850748f2
6
+ metadata.gz: 667eac9d34a64b6027305d324afcd52bda128d5b1614fa34453cfc9f6d67e1ac7a90964b61c703c3f3260c644a6d9e4e920ee7add4e0cb0fcf9373601f76766a
7
+ data.tar.gz: cc70fd4d265559a27f9a3621a3dd610e06600deb99bf9aa9a466e849950e11d40154a68bd03c0c051838eaf1b5aa5a70da3a32f609c8da5626335bdadce07170
@@ -8,6 +8,7 @@ module Fastlane
8
8
  if params[:plist_path] && params[:xml_path]
9
9
  plist_path = params[:plist_path]
10
10
  xml_path = params[:xml_path]
11
+ key_prefix = params[:exclude_key_prefix]
11
12
 
12
13
  if File.exist?(xml_path)
13
14
  # Create and open empty file.
@@ -20,6 +21,12 @@ module Fastlane
20
21
  doc.elements.each('resources/plurals') do |plural|
21
22
  key = plural.attributes['name']
22
23
 
24
+ # Don't process key with prefix
25
+ if key_prefix.to_s.length > 0 and key.start_with?(key_prefix.to_s)
26
+ UI.verbose("Skipping key: #{key}")
27
+ next
28
+ end
29
+
23
30
  format_key = key + '_value'
24
31
  dict = { 'NSStringLocalizedFormatKey' => "%#\@#{format_key}@" }
25
32
  items_dict = { 'NSStringFormatSpecTypeKey' => 'NSStringPluralRuleType', 'NSStringFormatValueTypeKey' => 'd' }
@@ -69,6 +76,11 @@ module Fastlane
69
76
  env_name: "PLURAL_CONVERTER_XML_PATH",
70
77
  description: "File path for the Android XML source file",
71
78
  optional: false,
79
+ type: String),
80
+ FastlaneCore::ConfigItem.new(key: :exclude_key_prefix,
81
+ env_name: "PLURAL_CONVERTER_EXCLUDE_PREFIX",
82
+ description: "Prefix used to avoid converting keys",
83
+ optional: true,
72
84
  type: String)
73
85
  ]
74
86
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module PluralConverter
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-plural_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Deldicque
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2020-01-21 00:00:00.000000000 Z
10
+ date: 2025-02-10 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: pry
@@ -150,7 +149,6 @@ dependencies:
150
149
  - - ">="
151
150
  - !ruby/object:Gem::Version
152
151
  version: '0'
153
- description:
154
152
  email: bixcorp@gmail.com
155
153
  executables: []
156
154
  extensions: []
@@ -166,7 +164,6 @@ homepage: https://github.com/bixcorp/fastlane-plugin-plural_converter
166
164
  licenses:
167
165
  - MIT
168
166
  metadata: {}
169
- post_install_message:
170
167
  rdoc_options: []
171
168
  require_paths:
172
169
  - lib
@@ -181,8 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
178
  - !ruby/object:Gem::Version
182
179
  version: '0'
183
180
  requirements: []
184
- rubygems_version: 3.0.3
185
- signing_key:
181
+ rubygems_version: 3.6.2
186
182
  specification_version: 4
187
183
  summary: Convert Android plural XML resource file to iOS stringsdict file.
188
184
  test_files: []