fastlane-plugin-simple_loco 2.0.0 → 2.1.0
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: 844ab3c4b812ce21bf7c1c5e976274df9f3c686732ddf400b583fbe0dd966a0d
|
4
|
+
data.tar.gz: c874a42be6f84cbf2139ebcfb55ea417d830b3b98cf8a750c57195486dd6ec7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a1e0d7f8dd205b5ee694b71d3b763bcaea3564510939f56d6cac539069d0c7527322e8446d08470c8387f67d7730b2c9465068a9e66dfb6089d7050c57d2ef
|
7
|
+
data.tar.gz: 350c895be615aacba9457fbec678465ad5b11ebfa93672bea8c76ff19347cf9c2e42b3a1426b350c9450b6e2fdd13969a6cea38c62fcf487f01b6d0e134ece86
|
data/README.md
CHANGED
@@ -14,9 +14,10 @@ fastlane add_plugin simple_loco
|
|
14
14
|
|
15
15
|
A simple implementation for exporting translations from [Loco](https://localise.biz/).
|
16
16
|
|
17
|
-
This plugin is heavily inspired by https://github.com/JohnPaulConcierge/fastlane-plugin-loco
|
17
|
+
This plugin is heavily inspired by <https://github.com/JohnPaulConcierge/fastlane-plugin-loco>, but some functionality has been removed and added. This plugin acts primarily as a wrapper implementation around the export single locale API call of Loco (see <https://localise.biz/api/docs/export/exportlocale> for full details).
|
18
18
|
|
19
19
|
There is advanced support for the following platforms:
|
20
|
+
|
20
21
|
- Android
|
21
22
|
- iOS
|
22
23
|
- Xamarin (with resx resource files)
|
@@ -24,21 +25,24 @@ There is advanced support for the following platforms:
|
|
24
25
|
|
25
26
|
For the platforms above, an extra adapter is available to create the correct folder and files needed to use the translations.
|
26
27
|
|
27
|
-
For other platforms, a default implementation is provided (translation files will be saved like \<provided folder\>/\<provided file name\>.\<locale\>.\<extension\>)
|
28
|
+
For other platforms, a default implementation is provided (translation files will be saved like \<provided folder\>/\<provided file name\>.\<locale\>.\<extension\>).
|
29
|
+
If a custom file name is provided, then the name of the file for the default locale won't contain the locale.
|
30
|
+
If no custom file name is provided, then the locale will be used instead.
|
28
31
|
|
29
32
|
This plugin contains a single action `simple_loco`.
|
30
33
|
|
31
34
|
This action uses a configuration file to generate the correct API call.
|
32
35
|
|
33
36
|
The config file specifies the following properties:
|
37
|
+
|
34
38
|
- locales: List of locales to fetch
|
35
39
|
- directory: Directory to move translation files to
|
36
40
|
- platform: Platform for the translations: choice between:
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
- Android
|
42
|
+
- iOS
|
43
|
+
- Xamarin
|
44
|
+
- Flutter
|
45
|
+
- Custom
|
42
46
|
- key: Key of the Loco project
|
43
47
|
- Optional parameters:
|
44
48
|
- format
|
@@ -55,10 +59,11 @@ The config file specifies the following properties:
|
|
55
59
|
- no_comments
|
56
60
|
- no_folding
|
57
61
|
|
58
|
-
For an explanation of the optional parameters, please see the official API reference: https://localise.biz/api/docs/export/exportlocale
|
62
|
+
For an explanation of the optional parameters, please see the official API reference: <https://localise.biz/api/docs/export/exportlocale>
|
59
63
|
|
60
64
|
Example of a JSON config file:
|
61
|
-
|
65
|
+
|
66
|
+
``` JSON
|
62
67
|
{
|
63
68
|
"locales" : [
|
64
69
|
"en",
|
@@ -69,14 +74,15 @@ Example of a JSON config file:
|
|
69
74
|
"directory" : "src/main/res",
|
70
75
|
"platform" : "android",
|
71
76
|
"key" : "<Your key here>",
|
72
|
-
"
|
77
|
+
"fallback" : "en",
|
73
78
|
"order": "id",
|
74
79
|
"filter": ["android"]
|
75
80
|
}
|
76
81
|
```
|
77
82
|
|
78
83
|
Or in YAML:
|
79
|
-
|
84
|
+
|
85
|
+
``` YAML
|
80
86
|
locales:
|
81
87
|
- en
|
82
88
|
- fr
|
@@ -95,12 +101,13 @@ custom_file_name: strings
|
|
95
101
|
|
96
102
|
To run both the tests, and code style validation, run
|
97
103
|
|
98
|
-
```
|
104
|
+
``` bash
|
99
105
|
rake
|
100
106
|
```
|
101
107
|
|
102
108
|
To automatically fix many of the styling issues, use
|
103
|
-
|
109
|
+
|
110
|
+
``` bash
|
104
111
|
rubocop -a
|
105
112
|
```
|
106
113
|
|
@@ -382,7 +382,9 @@ module Fastlane
|
|
382
382
|
used_extension = ".#{used_extension}"
|
383
383
|
end
|
384
384
|
|
385
|
-
if
|
385
|
+
if default_file_name.nil? || default_file_name.empty?
|
386
|
+
path = File.join(directory, locale + used_extension)
|
387
|
+
elsif is_default
|
386
388
|
path = File.join(directory, default_file_name + used_extension)
|
387
389
|
else
|
388
390
|
path = File.join(directory, default_file_name + ".#{locale}" + used_extension)
|
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.1.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: 2021-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|