fastlane-plugin-simple_loco 2.1.1 → 2.3.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f80cc692304dcb89fd8adb3b1cc4a8605697d73cc265d1adfdbb03061c63c250
|
|
4
|
+
data.tar.gz: c2423f6a00b7999c4e5a321ebd6b8d492c250e8f3ebea347cc8143c67aff0fcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8bb21251d7499fb49b6eb9d211cca1d332e7507d18e0906fc52beb9034a7fdc196241ce16504ba148c825511758ac16f8bd97c14d9e1688823e7ce51d25360d3
|
|
7
|
+
data.tar.gz: 741c52245e96729e7e47c9e25674abdad0d90b4139553c24f7efc783134a847f8a54160b91aaf3e165b815136c45ac7e31a4ddd513ab57f87616ce84352c66a4
|
data/README.md
CHANGED
|
@@ -38,11 +38,11 @@ The config file specifies the following properties:
|
|
|
38
38
|
- locales: List of locales to fetch
|
|
39
39
|
- directory: Directory to move translation files to
|
|
40
40
|
- platform: Platform for the translations: choice between:
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
41
|
+
- android
|
|
42
|
+
- ios
|
|
43
|
+
- xamarin
|
|
44
|
+
- flutter
|
|
45
|
+
- custom
|
|
46
46
|
- key: Key of the Loco project
|
|
47
47
|
- Optional parameters:
|
|
48
48
|
- format
|
|
@@ -29,6 +29,7 @@ module Fastlane
|
|
|
29
29
|
breaks: "",
|
|
30
30
|
no_comments: "",
|
|
31
31
|
no_folding: "",
|
|
32
|
+
mapping: nil,
|
|
32
33
|
custom_extension: "",
|
|
33
34
|
custom_file_name: "")
|
|
34
35
|
|
|
@@ -68,11 +69,13 @@ module Fastlane
|
|
|
68
69
|
@breaks = breaks
|
|
69
70
|
@no_comments = no_comments
|
|
70
71
|
@no_folding = no_folding
|
|
72
|
+
@mapping = mapping
|
|
71
73
|
|
|
72
74
|
if platform == PLATFORM_ANDROID
|
|
73
75
|
@adapter = AndroidAdapter.new
|
|
74
76
|
elsif platform == PLATFORM_IOS
|
|
75
|
-
@adapter = CocoaAdapter.new
|
|
77
|
+
@adapter = CocoaAdapter.new(
|
|
78
|
+
format: format)
|
|
76
79
|
elsif platform == PLATFORM_FLUTTER
|
|
77
80
|
@adapter = FlutterAdapter.new
|
|
78
81
|
elsif platform == PLATFORM_XAMARIN
|
|
@@ -103,6 +106,7 @@ module Fastlane
|
|
|
103
106
|
attr_reader :breaks
|
|
104
107
|
attr_reader :no_comments
|
|
105
108
|
attr_reader :no_folding
|
|
109
|
+
attr_reader :mapping
|
|
106
110
|
|
|
107
111
|
def export_locales
|
|
108
112
|
|
|
@@ -214,8 +218,10 @@ module Fastlane
|
|
|
214
218
|
end
|
|
215
219
|
|
|
216
220
|
def locale_directory(locale, is_default)
|
|
221
|
+
mapped_locale = @mapping && @mapping[locale] || locale
|
|
222
|
+
|
|
217
223
|
return File.join(@directory,
|
|
218
|
-
|
|
224
|
+
@adapter.directory(mapped_locale, is_default))
|
|
219
225
|
end
|
|
220
226
|
|
|
221
227
|
# Static method used to read a config file
|
|
@@ -289,8 +295,18 @@ module Fastlane
|
|
|
289
295
|
end
|
|
290
296
|
|
|
291
297
|
class CocoaAdapter < BaseAdapter
|
|
298
|
+
def initialize(format:)
|
|
299
|
+
@format = format
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
attr_reader :format
|
|
303
|
+
|
|
292
304
|
def allowed_extensions
|
|
293
|
-
|
|
305
|
+
if @format == 'plist'
|
|
306
|
+
return ['.strings']
|
|
307
|
+
else
|
|
308
|
+
return ['.strings', '.stringsdict']
|
|
309
|
+
end
|
|
294
310
|
end
|
|
295
311
|
|
|
296
312
|
def directory(locale, is_default)
|
|
@@ -298,7 +314,11 @@ module Fastlane
|
|
|
298
314
|
end
|
|
299
315
|
|
|
300
316
|
def default_file_name
|
|
301
|
-
|
|
317
|
+
if @format == 'plist'
|
|
318
|
+
return 'InfoPlist'
|
|
319
|
+
else
|
|
320
|
+
return 'Localizable'
|
|
321
|
+
end
|
|
302
322
|
end
|
|
303
323
|
end
|
|
304
324
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-simple_loco
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yves Delcoigne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
167
167
|
- !ruby/object:Gem::Version
|
|
168
168
|
version: '0'
|
|
169
169
|
requirements: []
|
|
170
|
-
rubygems_version: 3.
|
|
170
|
+
rubygems_version: 3.4.10
|
|
171
171
|
signing_key:
|
|
172
172
|
specification_version: 4
|
|
173
173
|
summary: A simple implementation for exporting translations from Loco.
|