fastlane-plugin-simple_loco 2.0.0 → 2.1.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: 2d0b03ff11d3b9284852f029335b41b29e1812f8f056603cd6a288191992f778
4
- data.tar.gz: f30e75b6cb230097052838aec6990a1c547f3b38f09d2678d31f28d8a5d4a08d
3
+ metadata.gz: 844ab3c4b812ce21bf7c1c5e976274df9f3c686732ddf400b583fbe0dd966a0d
4
+ data.tar.gz: c874a42be6f84cbf2139ebcfb55ea417d830b3b98cf8a750c57195486dd6ec7d
5
5
  SHA512:
6
- metadata.gz: 3881301e1e63a7629d8a2895ad19e578eb1c80852e98cb2ab97af1c26753787e18f9570b9945b73d17714b26515a64ffbb92a5a8ed941d15b5a29083d8e63971
7
- data.tar.gz: 0cb0a2d45a955f4bf897c7b040bb8d261cfb7557a6703aca506d6c7f1d039f675e0b68752a5a0bbab5de909ead6457bc809ea683acf4f216239e7accc69ab86f
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, 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).
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
- - Android
38
- - iOS
39
- - Xamarin
40
- - Flutter
41
- - Custom
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
- "fallback_locale" : "en",
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 is_default
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)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module SimpleLoco
3
- VERSION = "2.0.0"
3
+ VERSION = "2.1.0"
4
4
  end
5
5
  end
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.0.0
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: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry