ad_localize 4.0.5 → 4.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +12 -11
- data/CHANGELOG.md +123 -56
- data/Gemfile.lock +58 -38
- data/README.md +30 -24
- data/ad_localize.gemspec +3 -3
- data/lib/ad_localize/entities/key.rb +6 -1
- data/lib/ad_localize/entities/translation.rb +8 -0
- data/lib/ad_localize/interactors/export_g_spreadsheet.rb +5 -1
- data/lib/ad_localize/interactors/export_wording.rb +9 -5
- data/lib/ad_localize/interactors/platforms/export_android_locale_wording.rb +4 -0
- data/lib/ad_localize/interactors/platforms/export_csv_locale_wording.rb +25 -0
- data/lib/ad_localize/interactors/platforms/export_ios_locale_wording.rb +4 -0
- data/lib/ad_localize/interactors/platforms/export_json_locale_wording.rb +4 -0
- data/lib/ad_localize/interactors/platforms/export_platform_factory.rb +6 -0
- data/lib/ad_localize/interactors/platforms/export_properties_locale_wording.rb +4 -0
- data/lib/ad_localize/interactors/platforms/export_yaml_locale_wording.rb +4 -0
- data/lib/ad_localize/mappers/csv_path_to_wording.rb +5 -8
- data/lib/ad_localize/mappers/locale_wording_to_hash.rb +8 -0
- data/lib/ad_localize/mappers/value_range_to_wording.rb +6 -8
- data/lib/ad_localize/repositories/g_sheets_repository.rb +1 -1
- data/lib/ad_localize/requests/export_request.rb +15 -2
- data/lib/ad_localize/serializers/json_serializer.rb +1 -1
- data/lib/ad_localize/validators/key_validator.rb +31 -0
- data/lib/ad_localize/version.rb +1 -1
- data/lib/ad_localize.rb +2 -1
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e17293e2000accb75875be47bacc58bf7193039c4f0f2a407c5787fbcde38d6
|
4
|
+
data.tar.gz: e0b68dcc055d3e303878496953411b96926f774fbd28805ec9684d4022a54c2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81296d0f5bb5bbe41d1fedddf36814a0ee695919bf8f00f527ecdf02a830e6f1ccb5c3a4c4542c47345d552cac0d229f4dbb41797e1bdd66d89dbd7d6b812d1
|
7
|
+
data.tar.gz: 7a963846243a0fd6026bb3f9e604ea946937cace3f6d66d8e22a4a698d0aa3c2f4fe1b98a60620f1d21cbd179f75e153e216b2736827b7c5b8409b9ef25e94a8
|
data/.github/workflows/ruby.yml
CHANGED
@@ -4,17 +4,18 @@ on: [push, pull_request]
|
|
4
4
|
|
5
5
|
jobs:
|
6
6
|
build:
|
7
|
-
|
8
7
|
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: ['2.6.6', '2.7.3', '3.0.1']
|
9
11
|
|
10
12
|
steps:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
bundle exec rake
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
17
|
+
- name: Build and test with Rake
|
18
|
+
run: |
|
19
|
+
gem install bundler
|
20
|
+
bundle install --jobs 4 --retry 3
|
21
|
+
bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,135 +1,202 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
2
3
|
All notable changes to this project will be documented in this file.
|
3
4
|
|
4
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
7
|
|
8
|
+
## [4.0.9] - 2021-09-05
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- Fix error warning when spreadsheet is empty. Fix [#58](https://github.com/applidium/ad_localize/issues/58) in PR [#69](https://github.com/applidium/ad_localize/pull/69)
|
13
|
+
- Add warning messages when input is corrupted. Fix [#59](https://github.com/applidium/ad_localize/issues/59) in PR [#69](https://github.com/applidium/ad_localize/pull/69)
|
14
|
+
- Fix performance issue and add warning messages. Fix [#61](https://github.com/applidium/ad_localize/issues/61) in PR [#69](https://github.com/applidium/ad_localize/pull/69)
|
15
|
+
- Update deprecated `google-api-client` gem. Fix [#63](https://github.com/applidium/ad_localize/issues/63) in PR [#70](https://github.com/applidium/ad_localize/pull/70)
|
16
|
+
|
17
|
+
## [4.0.8] - 2021-05-25
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- Add `NFCReaderUsageDescription` to InfoPlist keys for iOS
|
22
|
+
|
23
|
+
## [4.0.7] - 2021-05-18
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
- Support Ruby 3.x
|
28
|
+
|
29
|
+
## [4.0.6] - 2020-01-25
|
30
|
+
|
31
|
+
### Fixed
|
32
|
+
|
33
|
+
- Fix google spreadsheet sheet id comparison with sheet_ids option value
|
34
|
+
|
7
35
|
## [4.0.5] - 2020-11-12
|
36
|
+
|
8
37
|
### Fixed
|
9
|
-
|
10
|
-
|
38
|
+
|
39
|
+
- Fix csv file type check (also add compatibility with macOS Big Sur)
|
40
|
+
|
11
41
|
## [4.0.4] - 2020-11-09
|
42
|
+
|
12
43
|
### Fixed
|
13
|
-
|
14
|
-
|
15
|
-
|
44
|
+
|
45
|
+
- Fix android special character escaping [#56](https://github.com/applidium/ad_localize/issues/56)
|
46
|
+
- Fix platform filter on export [#55](https://github.com/applidium/ad_localize/issues/55)
|
47
|
+
|
16
48
|
### Changed
|
17
|
-
|
49
|
+
|
50
|
+
- Use default terminal color for debug log
|
18
51
|
|
19
52
|
## [4.0.3] - 2020-10-27
|
53
|
+
|
20
54
|
### Fixed
|
21
|
-
|
22
|
-
|
55
|
+
|
56
|
+
- Fix CSV detection and remove dependency to MimeType gem
|
57
|
+
- Fix drive key detection in options
|
23
58
|
|
24
59
|
## [4.0.2] - 2020-10-26
|
60
|
+
|
25
61
|
### Fixed
|
26
|
-
|
62
|
+
|
63
|
+
- Use percent HTML char for escaping '%' on android. [#49](https://github.com/applidium/ad_localize/pull/49) by [flolom](https://github.com/flolom)
|
27
64
|
|
28
65
|
## [4.0.1] - 2020-10-19
|
66
|
+
|
29
67
|
### Fixed
|
30
|
-
|
68
|
+
|
69
|
+
- delete downloaded files even when any of them is a CSV file
|
31
70
|
|
32
71
|
## [4.0.0] - 2020-10-19
|
72
|
+
|
33
73
|
### Breaking change
|
34
|
-
|
35
|
-
|
36
|
-
|
74
|
+
|
75
|
+
- Precedence to csv files. Only CSV files will be exported if both csv file and google spreadsheet are provided
|
76
|
+
- In case of multiple CSVs or sheet ids, you should be aware that all sources will be merged. By default the merge policy to keep the first wording translation for each key
|
77
|
+
- New architecture. Separate export process responsibilities in dedicated classes. Fixes [#48](https://github.com/applidium/ad_localize/issues/48), [#20](https://github.com/applidium/ad_localize/issues/20)
|
37
78
|
|
38
79
|
### Changed
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
80
|
+
|
81
|
+
- it is now possible to provide an output path path that does not exist
|
82
|
+
- if a service account configuration is provided, there won't be any files downloaded
|
83
|
+
- it is now possible to provide a sheet id list
|
84
|
+
- `ActiveSupport::TestCase` is now the base class of test classes
|
85
|
+
- Only global constants are in the constant class
|
86
|
+
- Replaced the Runner class file by a cli class
|
87
|
+
- tests for ad_localize class are restricted to the minimum
|
88
|
+
- No more file generated when there are no data to export
|
89
|
+
- Less verbose logs. Now, they only describe the different steps of the export process
|
90
|
+
- do not add `InfoPlist` translations to android `strings.xml`
|
49
91
|
|
50
92
|
### Added
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
93
|
+
|
94
|
+
- -e, -export_all_sheets option export all sheets from a spreadsheet by [@sjcqs](https://github.com/sjcqs)
|
95
|
+
- -m, --merge-option to select the merge policy (`keep` or `replace`) by [@sjcqs](https://github.com/sjcqs)
|
96
|
+
- it is now possible to select which locales you want to export
|
97
|
+
- key class is tested
|
98
|
+
- option handler is tested
|
99
|
+
- execute_export_request is tested (only csv)
|
100
|
+
- export request is tested
|
101
|
+
- dedicated folder for fixture files
|
102
|
+
- add ability to use AdLocalize in a Ruby program
|
103
|
+
- add documentation for JSON and YAML support. Fixes [#23](https://github.com/applidium/ad_localize/issues/23)
|
61
104
|
|
62
105
|
### Fixed
|
63
|
-
|
64
|
-
|
106
|
+
|
107
|
+
- comments will now be added to iOS and Android plural files
|
108
|
+
- do not remove existing files in export output folder. Fixes [#40](https://github.com/applidium/ad_localize/issues/40)
|
65
109
|
|
66
110
|
### Removed
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
111
|
+
|
112
|
+
- no more option -a option to indicate that a service account configuration will be provided. If set, the environment variable `GCLOUD_CLIENT_SECRET` content will be used
|
113
|
+
- no more substitution of empty wording with by "Missing Translation" when using the option -d
|
114
|
+
- no more Makefile, the Rakefile is sufficient. Use `bundle exec rake -T` to display the available commands
|
115
|
+
- no more check for ordered interpolation variables in translations
|
71
116
|
|
72
117
|
## [3.6.0] - 2020-06-23
|
118
|
+
|
73
119
|
### Added
|
74
|
-
|
75
|
-
|
120
|
+
|
121
|
+
- add documentation for service account usage by [@sjcqs](https://github.com/sjcqs)
|
122
|
+
- add compatibility with activesupport 6 by [@Hugo-Hache](https://github.com/Hugo-Hache)
|
76
123
|
|
77
124
|
### Changed
|
78
125
|
|
79
126
|
### Fixed
|
80
127
|
|
81
128
|
## [3.5.0] - 2020-05-12
|
129
|
+
|
82
130
|
### Added
|
83
|
-
|
84
|
-
|
131
|
+
|
132
|
+
- add support for private spreadsheet using google service acccount by [@sjcqs](https://github.com/sjcqs). Fixes [#31](https://github.com/applidium/ad_localize/issues/31)
|
133
|
+
- add makefile for easier testing by [@felginep](https://github.com/felginep)
|
85
134
|
|
86
135
|
### Changed
|
87
|
-
|
88
|
-
|
89
|
-
|
136
|
+
|
137
|
+
- improve error message to have useful information in case of google spreadsheet use by [@felginep](https://github.com/felginep). Fixes [#27](https://github.com/applidium/ad_localize/issues/27)
|
138
|
+
- platform folder is no longer generated when there is only one platform selected. The files are directly generated in the output path. By [@felginep](https://github.com/felginep). Fixes [#29](https://github.com/applidium/ad_localize/issues/29)
|
139
|
+
- raise error when google spreadsheet key is invalid by [@felginep](https://github.com/felginep)
|
90
140
|
|
91
141
|
### Fixed
|
92
|
-
|
93
|
-
|
142
|
+
|
143
|
+
- auto escape strings in Localizable.strings by [@felginep](https://github.com/felginep). Fixes [#26](https://github.com/applidium/ad_localize/issues/26)
|
144
|
+
- trim keys to prevent user error by [@felginep](https://github.com/felginep). Fixes [#16](https://github.com/applidium/ad_localize/issues/16)
|
94
145
|
|
95
146
|
## [3.4.0] - 2019-02-10
|
147
|
+
|
96
148
|
### Added
|
97
|
-
|
149
|
+
|
150
|
+
- Rails folks, [@epaillous](https://github.com/epaillous) has improved the YAML support. You can now have multi-level wording.
|
98
151
|
|
99
152
|
## [3.3.0] - 2019-02-10
|
153
|
+
|
100
154
|
### Added
|
101
|
-
|
155
|
+
|
156
|
+
- improve React support using keys with dots to generate nested JSON files by [@epaillous](https://github.com/epaillous)
|
102
157
|
|
103
158
|
## [3.2.0] - 2019-12-10
|
159
|
+
|
104
160
|
### Added
|
105
|
-
|
106
|
-
|
161
|
+
|
162
|
+
- Add tests to compare reference exports by [@felginep](https://github.com/felginep)
|
163
|
+
- [iOS only] Handle [adaptive strings](https://developer.apple.com/documentation/foundation/nsstring/1413104-variantfittingpresentationwidth) by [@felginep](https://github.com/felginep)
|
107
164
|
|
108
165
|
### Changed
|
109
|
-
|
110
|
-
|
166
|
+
|
167
|
+
- Fix issue with Info.plist format by [@felginep](https://github.com/felginep)
|
168
|
+
- Do not export plurals for android when there are no values by [@felginep](https://github.com/felginep)
|
111
169
|
|
112
170
|
## [3.1.0] - 2019-09-30
|
171
|
+
|
113
172
|
### Added
|
114
|
-
|
173
|
+
|
174
|
+
- [iOS only] Info.plist generation support by [@felginep](https://github.com/felginep)
|
115
175
|
|
116
176
|
### Changed
|
117
|
-
|
177
|
+
|
178
|
+
- No more warning log for empty lines by [@felginep](https://github.com/felginep)
|
118
179
|
|
119
180
|
## [3.0.0] - 2019-02-19
|
181
|
+
|
120
182
|
TODO
|
121
183
|
|
122
184
|
## [2.1.0] - 2016-12-22
|
185
|
+
|
123
186
|
TODO
|
124
187
|
|
125
188
|
## [2.0.0] - 2016-07-05
|
189
|
+
|
126
190
|
TODO
|
127
191
|
|
128
192
|
## [1.1.0] - 2016-04-27
|
193
|
+
|
129
194
|
TODO
|
130
195
|
|
131
196
|
## [1.0.0] - 2016-04-25
|
197
|
+
|
132
198
|
TODO
|
133
199
|
|
134
200
|
## [0.1.0] - 2016-04-25
|
201
|
+
|
135
202
|
TODO
|
data/Gemfile.lock
CHANGED
@@ -1,59 +1,76 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ad_localize (4.0.
|
5
|
-
activesupport (>=
|
4
|
+
ad_localize (4.0.9)
|
5
|
+
activesupport (>= 6.1.3.2, < 7.0)
|
6
6
|
colorize (~> 0.8)
|
7
|
-
google-
|
7
|
+
google-apis-sheets_v4 (~> 0.9)
|
8
8
|
googleauth (~> 0.12)
|
9
9
|
nokogiri (~> 1.10)
|
10
10
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (6.
|
14
|
+
activesupport (6.1.4.1)
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
-
i18n (>=
|
17
|
-
minitest (
|
18
|
-
tzinfo (~>
|
19
|
-
zeitwerk (~> 2.
|
20
|
-
addressable (2.
|
16
|
+
i18n (>= 1.6, < 2)
|
17
|
+
minitest (>= 5.1)
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
zeitwerk (~> 2.3)
|
20
|
+
addressable (2.8.0)
|
21
21
|
public_suffix (>= 2.0.2, < 5.0)
|
22
22
|
ansi (1.5.0)
|
23
23
|
builder (3.2.4)
|
24
24
|
byebug (11.1.3)
|
25
25
|
colorize (0.8.1)
|
26
|
-
concurrent-ruby (1.1.
|
26
|
+
concurrent-ruby (1.1.9)
|
27
27
|
declarative (0.0.20)
|
28
|
-
declarative-option (0.1.0)
|
29
28
|
diffy (3.3.0)
|
30
|
-
faraday (1.1
|
29
|
+
faraday (1.7.1)
|
30
|
+
faraday-em_http (~> 1.0)
|
31
|
+
faraday-em_synchrony (~> 1.0)
|
32
|
+
faraday-excon (~> 1.1)
|
33
|
+
faraday-httpclient (~> 1.0.1)
|
34
|
+
faraday-net_http (~> 1.0)
|
35
|
+
faraday-net_http_persistent (~> 1.1)
|
36
|
+
faraday-patron (~> 1.0)
|
37
|
+
faraday-rack (~> 1.0)
|
31
38
|
multipart-post (>= 1.2, < 3)
|
32
|
-
ruby2_keywords
|
33
|
-
|
39
|
+
ruby2_keywords (>= 0.0.4)
|
40
|
+
faraday-em_http (1.0.0)
|
41
|
+
faraday-em_synchrony (1.0.0)
|
42
|
+
faraday-excon (1.1.0)
|
43
|
+
faraday-httpclient (1.0.1)
|
44
|
+
faraday-net_http (1.0.1)
|
45
|
+
faraday-net_http_persistent (1.2.0)
|
46
|
+
faraday-patron (1.0.0)
|
47
|
+
faraday-rack (1.0.0)
|
48
|
+
google-apis-core (0.4.1)
|
34
49
|
addressable (~> 2.5, >= 2.5.1)
|
35
|
-
googleauth (
|
36
|
-
httpclient (>= 2.8.1, < 3.
|
50
|
+
googleauth (>= 0.16.2, < 2.a)
|
51
|
+
httpclient (>= 2.8.1, < 3.a)
|
37
52
|
mini_mime (~> 1.0)
|
38
53
|
representable (~> 3.0)
|
39
|
-
retriable (>= 2.0, < 4.
|
54
|
+
retriable (>= 2.0, < 4.a)
|
40
55
|
rexml
|
41
|
-
|
42
|
-
|
56
|
+
webrick
|
57
|
+
google-apis-sheets_v4 (0.9.0)
|
58
|
+
google-apis-core (>= 0.4, < 2.a)
|
59
|
+
googleauth (0.17.1)
|
43
60
|
faraday (>= 0.17.3, < 2.0)
|
44
61
|
jwt (>= 1.4, < 3.0)
|
45
62
|
memoist (~> 0.16)
|
46
63
|
multi_json (~> 1.11)
|
47
64
|
os (>= 0.9, < 2.0)
|
48
|
-
signet (~> 0.
|
65
|
+
signet (~> 0.15)
|
49
66
|
httpclient (2.8.3)
|
50
|
-
i18n (1.8.
|
67
|
+
i18n (1.8.10)
|
51
68
|
concurrent-ruby (~> 1.0)
|
52
|
-
jwt (2.2.
|
69
|
+
jwt (2.2.3)
|
53
70
|
memoist (0.16.2)
|
54
|
-
mini_mime (1.
|
55
|
-
mini_portile2 (2.
|
56
|
-
minitest (5.14.
|
71
|
+
mini_mime (1.1.1)
|
72
|
+
mini_portile2 (2.6.1)
|
73
|
+
minitest (5.14.4)
|
57
74
|
minitest-reporters (1.4.2)
|
58
75
|
ansi
|
59
76
|
builder
|
@@ -61,29 +78,32 @@ GEM
|
|
61
78
|
ruby-progressbar
|
62
79
|
multi_json (1.15.0)
|
63
80
|
multipart-post (2.1.1)
|
64
|
-
nokogiri (1.
|
65
|
-
mini_portile2 (~> 2.
|
81
|
+
nokogiri (1.12.4)
|
82
|
+
mini_portile2 (~> 2.6.1)
|
83
|
+
racc (~> 1.4)
|
66
84
|
os (1.1.1)
|
67
85
|
public_suffix (4.0.6)
|
86
|
+
racc (1.5.2)
|
68
87
|
rake (12.3.3)
|
69
|
-
representable (3.
|
88
|
+
representable (3.1.1)
|
70
89
|
declarative (< 0.1.0)
|
71
|
-
|
90
|
+
trailblazer-option (>= 0.1.1, < 0.2.0)
|
72
91
|
uber (< 0.2.0)
|
73
92
|
retriable (3.1.2)
|
74
|
-
rexml (3.2.
|
93
|
+
rexml (3.2.5)
|
75
94
|
ruby-progressbar (1.10.1)
|
76
|
-
ruby2_keywords (0.0.
|
77
|
-
signet (0.
|
78
|
-
addressable (~> 2.
|
95
|
+
ruby2_keywords (0.0.5)
|
96
|
+
signet (0.16.0)
|
97
|
+
addressable (~> 2.8)
|
79
98
|
faraday (>= 0.17.3, < 2.0)
|
80
99
|
jwt (>= 1.5, < 3.0)
|
81
100
|
multi_json (~> 1.10)
|
82
|
-
|
83
|
-
tzinfo (
|
84
|
-
|
101
|
+
trailblazer-option (0.1.1)
|
102
|
+
tzinfo (2.0.4)
|
103
|
+
concurrent-ruby (~> 1.0)
|
85
104
|
uber (0.1.0)
|
86
|
-
|
105
|
+
webrick (1.7.0)
|
106
|
+
zeitwerk (2.4.2)
|
87
107
|
|
88
108
|
PLATFORMS
|
89
109
|
ruby
|
@@ -98,4 +118,4 @@ DEPENDENCIES
|
|
98
118
|
rake (~> 12.3)
|
99
119
|
|
100
120
|
BUNDLED WITH
|
101
|
-
2.
|
121
|
+
2.2.26
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
The purpose of this gem is to automatically generate wording files from a CSV input (CSV file or Google Spreadsheet).
|
4
4
|
It supports iOS, Android, JSON, YAML and Java Properties.
|
5
|
-
It is a useful tool when working on a mobile application or a SPA.
|
5
|
+
It is a useful tool when working on a mobile application or a SPA.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -31,7 +31,7 @@ $ gem install ad_localize
|
|
31
31
|
$ ad_localize -h
|
32
32
|
```
|
33
33
|
|
34
|
-
* Export wording from a google spreadsheet, default tab. The spreadsheet key and sheet_id are available in the spreadsheet url. For example `https://docs.google.com/spreadsheets/d/<your-spreadsheet-drive-key>/edit#gid=<sheet-id>`.
|
34
|
+
* Export wording from a public google spreadsheet, default tab. The spreadsheet key and sheet_id are available in the spreadsheet url. For example `https://docs.google.com/spreadsheets/d/<your-spreadsheet-drive-key>/edit#gid=<sheet-id>`.
|
35
35
|
```
|
36
36
|
$ ad_localize -k <your-spreadsheet-drive-key>
|
37
37
|
```
|
@@ -41,7 +41,12 @@ $ ad_localize -k <your-spreadsheet-drive-key>
|
|
41
41
|
$ ad_localize -k <your-spreadsheet-drive-key> -s <comma-separated-sheet-id-list>
|
42
42
|
```
|
43
43
|
|
44
|
-
* Export wording from
|
44
|
+
* Export wording from a private google spreadsheet. It requires a [Google Cloud Service Account](#using-a-google-cloud-service-account).
|
45
|
+
```
|
46
|
+
$ GCLOUD_CLIENT_SECRET=$(cat <path-to-client-secret.json>) ad_localize -k <your-spreadsheet-drive-key>
|
47
|
+
```
|
48
|
+
|
49
|
+
* Export wording from all sheets in a google spreadsheet. It requires a [Google Cloud Service Account](#using-a-google-cloud-service-account).
|
45
50
|
```
|
46
51
|
$ GCLOUD_CLIENT_SECRET=$(cat <path-to-client-secret.json>) ad_localize -k <your-spreadsheet-drive-key> -e
|
47
52
|
```
|
@@ -71,7 +76,7 @@ If you want more examples, please open a documentation issue.
|
|
71
76
|
require 'ad_localize'
|
72
77
|
# create optional google spreasheet options
|
73
78
|
g_spreadsheet_options = AdLocalize::Requests::GSpreadsheetOptions.new(spreadsheet_id: 'some_id', sheet_ids: ['first', 'second'], service_account_config: ENV['GCLOUD_CLIENT_SECRET'])
|
74
|
-
# create export request
|
79
|
+
# create export request
|
75
80
|
export_request = AdLocalize::Requests::ExportRequest.new(g_spreadsheet_options: g_spreadsheet_options, verbose: true)
|
76
81
|
# execute request
|
77
82
|
AdLocalize::Interactors::ExecuteExportRequest.new.call(export_request: export_request)
|
@@ -81,20 +86,20 @@ If you want more examples, please open a documentation issue.
|
|
81
86
|
### Share to anyone with the link
|
82
87
|
|
83
88
|
If you do not have high security concerns, the simplest way to access a google spreadsheet is to allow **anyone** with the link to **view** it and enable the `Viewers and commenters can see the option to download, print, and copy` option in the spreadsheet sharing settings.
|
84
|
-
|
89
|
+
|
85
90
|
### Use a Google Cloud Service Account
|
86
91
|
|
87
|
-
To use a private google spreasheet you need to use a Google Cloud Service Account. Here are the steps to follow :
|
88
|
-
1. Create a GCloud Service Account:
|
89
|
-
- Go to [Google Cloud Console](https://console.cloud.google.com/)
|
90
|
-
- Either create a new project or use an existing one (when using Firebase, a GCloud project is created)
|
91
|
-
- Go to *IAM & Admin / Service Account* and create a new service account.
|
92
|
-
- Store the created `client-secret.json` (in a password manager for example)
|
93
|
-
2. Enable Google Spreadsheet API for the project
|
94
|
-
- Go to *API / Library* and enable the **Google Spreadsheet API** there.
|
95
|
-
3. Add the service account to a spreadsheet.
|
92
|
+
To use a private google spreasheet you need to use a Google Cloud Service Account. Here are the steps to follow :
|
93
|
+
1. Create a GCloud Service Account:
|
94
|
+
- Go to [Google Cloud Console](https://console.cloud.google.com/)
|
95
|
+
- Either create a new project or use an existing one (when using Firebase, a GCloud project is created)
|
96
|
+
- Go to *IAM & Admin / Service Account* and create a new service account.
|
97
|
+
- Store the created `client-secret.json` (in a password manager for example)
|
98
|
+
2. Enable Google Spreadsheet API for the project
|
99
|
+
- Go to *API / Library* and enable the **Google Spreadsheet API** there.
|
100
|
+
3. Add the service account to a spreadsheet.
|
96
101
|
- In *IAM & Admin / Service Account*, the service account's email is listed. Invite it to the spreadsheet to export.
|
97
|
-
|
102
|
+
|
98
103
|
```
|
99
104
|
$ GCLOUD_CLIENT_SECRET=$(cat <path-to-client-secrets>) ad_localize -k # one way
|
100
105
|
$ GCLOUD_CLIENT_SECRET=$(cat <path-to-client-secrets>) ad_localize -k <your-spreadsheet-drive-key> -s <comma-separated-sheet-id-list> # another way
|
@@ -119,11 +124,11 @@ $ ad_localize -k <your-spreadsheet-drive-key> -s <comma-separated-sheet-id-list>
|
|
119
124
|
- Keys should contain only letter, number, underscore and dot : [a-z0-9_.]+.
|
120
125
|
- Format specifiers must be numeroted if there are more than one in a translation string (eg: `"%1$@ %2$@'s report"`).
|
121
126
|
|
122
|
-
### Comments
|
127
|
+
### Comments
|
123
128
|
|
124
129
|
_Only for Android and iOS_
|
125
130
|
|
126
|
-
To add comments for iOS or Android, simply add a comment column using the naming convention `comment <locale>`.
|
131
|
+
To add comments for iOS or Android, simply add a comment column using the naming convention `comment <locale>`.
|
127
132
|
Comments are available in `strings.xml`, `Localizable.strings`, `Localizable.stringsdict`, `InfoPlist.strings`. Here is an example for `InfoPlist.strings` :
|
128
133
|
|
129
134
|
| key | en | comment en |
|
@@ -172,21 +177,22 @@ _Only for iOS._
|
|
172
177
|
|
173
178
|
Every key that matches the following formats will be added to the `InfoPlist.strings` file instead of `Localizable.strings`:
|
174
179
|
* `NS...UsageDescription`
|
180
|
+
* `NFCReaderUsageDescription`
|
175
181
|
* `CF...Name`
|
176
182
|
|
177
183
|
### Nested wording
|
178
184
|
|
179
185
|
_Only for YAML and JSON_
|
180
186
|
|
181
|
-
For these two platforms it is common to have nested wording files, either to handle plural or to group wording by sections. To handle this behavior in a simple way you should use dots in the key to separate the different levels. For example :
|
182
|
-
|
187
|
+
For these two platforms it is common to have nested wording files, either to handle plural or to group wording by sections. To handle this behavior in a simple way you should use dots in the key to separate the different levels. For example :
|
188
|
+
|
183
189
|
| key | fr |
|
184
190
|
| --- | --- |
|
185
191
|
| login.password | mot de passe |
|
186
192
|
| login.email | email |
|
187
193
|
|
188
194
|
```json
|
189
|
-
{"login":{"password":"mot de passe","email":"email"}}
|
195
|
+
{"login":{"password":"mot de passe","email":"email"}}
|
190
196
|
```
|
191
197
|
|
192
198
|
```yaml
|
@@ -194,14 +200,14 @@ fr:
|
|
194
200
|
login:
|
195
201
|
password: "mot de passe"
|
196
202
|
email: "email"
|
197
|
-
```
|
203
|
+
```
|
198
204
|
|
199
205
|
|
200
206
|
## Output
|
201
207
|
|
202
|
-
The default output folder name is `exports`.
|
203
|
-
If your export is for multiple platforms there will be an intermediate folder for each platform, otherwise the wording files (and folders) will directly be generated in the export folder.
|
204
|
-
Any existing file will be overriden.
|
208
|
+
The default output folder name is `exports`.
|
209
|
+
If your export is for multiple platforms there will be an intermediate folder for each platform, otherwise the wording files (and folders) will directly be generated in the export folder.
|
210
|
+
Any existing file will be overriden.
|
205
211
|
You can see examples of generated files in `test/fixtures/export_references/`
|
206
212
|
|
207
213
|
Here an export tree example for all supported platforms in `fr` and `en`:
|
data/ad_localize.gemspec
CHANGED
@@ -46,11 +46,11 @@ Gem::Specification.new do |spec|
|
|
46
46
|
spec.add_development_dependency 'minitest-reporters', '~> 1.3'
|
47
47
|
spec.add_development_dependency 'diffy', '~> 3.3'
|
48
48
|
|
49
|
-
spec.add_dependency 'activesupport', '>=
|
49
|
+
spec.add_dependency 'activesupport', '>= 6.1.3.2', '< 7.0'
|
50
50
|
spec.add_dependency 'nokogiri', '~> 1.10'
|
51
51
|
spec.add_dependency 'colorize', '~> 0.8'
|
52
|
-
spec.add_dependency 'google-api-client', '~> 0.34'
|
53
52
|
spec.add_dependency 'googleauth', '~> 0.12'
|
53
|
+
spec.add_dependency 'google-apis-sheets_v4', '~> 0.9'
|
54
54
|
|
55
|
-
spec.required_ruby_version = '
|
55
|
+
spec.required_ruby_version = '>= 2.3'
|
56
56
|
end
|
@@ -4,7 +4,7 @@ module AdLocalize
|
|
4
4
|
PLURAL_KEY_REGEXP = /\#\#\{([A-Za-z]+)\}/.freeze
|
5
5
|
ADAPTIVE_KEY_REGEXP = /\#\#\{(\d+)\}/.freeze
|
6
6
|
# see https://developer.apple.com/documentation/bundleresources/information_property_list
|
7
|
-
INFO_PLIST_KEY_REGEXP = /(NS.+UsageDescription)|(CF.+Name)/.freeze
|
7
|
+
INFO_PLIST_KEY_REGEXP = /(NS.+UsageDescription)|(CF.+Name)|NFCReaderUsageDescription/.freeze
|
8
8
|
|
9
9
|
def initialize(label:)
|
10
10
|
@label = label
|
@@ -46,6 +46,11 @@ module AdLocalize
|
|
46
46
|
raw_label == key.raw_label
|
47
47
|
end
|
48
48
|
|
49
|
+
def ==(o)
|
50
|
+
o.class == self.class &&
|
51
|
+
o.raw_label == raw_label
|
52
|
+
end
|
53
|
+
|
49
54
|
private
|
50
55
|
|
51
56
|
def compute_label
|
@@ -33,8 +33,12 @@ module AdLocalize
|
|
33
33
|
export_request.csv_paths = downloaded_files.map(&:path)
|
34
34
|
if export_request.has_csv_files?
|
35
35
|
ExportCSVFiles.new.call(export_request: export_request)
|
36
|
+
elsif export_request.has_empty_files?
|
37
|
+
# When downloading an empty spreadsheet, the content type of the downloaded file is "inode/x-empty"
|
38
|
+
LOGGER.warn("Your spreadsheet is empty. Add content and retry.")
|
36
39
|
else
|
37
|
-
|
40
|
+
# When shared configuration is misconfigured, the content type of the downloaded file is "text/html"
|
41
|
+
LOGGER.error("Invalid export request. Check the spreadsheet share configuration")
|
38
42
|
end
|
39
43
|
downloaded_files.select { |downloaded_file| File.exist?(downloaded_file.path) }.each do |downloaded_file|
|
40
44
|
downloaded_file.close
|
@@ -7,12 +7,16 @@ module AdLocalize
|
|
7
7
|
|
8
8
|
def call(export_request:, wording:)
|
9
9
|
LOGGER.debug("Starting export wording")
|
10
|
-
locales = export_request.locales.size.zero? ? wording.locales : wording.locales & export_request.locales
|
11
10
|
export_request.platforms.each do |platform|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
platform_dir = compute_platform_dir(export_request: export_request, platform: platform)
|
12
|
+
export_platform = @export_platform_factory.build(platform: platform)
|
13
|
+
if export_platform.should_export_locale_by_locale?
|
14
|
+
locales = export_request.locales.size.zero? ? wording.locales : wording.locales & export_request.locales
|
15
|
+
locales.each do |locale|
|
16
|
+
export_platform.call(wording: wording, locale: locale, platform_dir: platform_dir)
|
17
|
+
end
|
18
|
+
else
|
19
|
+
export_platform.call(export_request: export_request, platform_dir: platform_dir)
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module AdLocalize
|
2
|
+
module Interactors
|
3
|
+
module Platforms
|
4
|
+
class ExportCSVLocaleWording
|
5
|
+
def initialize
|
6
|
+
@file_system_repository = Repositories::FileSystemRepository.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def call(export_request:, platform_dir:)
|
10
|
+
LOGGER.debug("Starting export CSV wording")
|
11
|
+
@file_system_repository.create_directory(path: platform_dir)
|
12
|
+
export_request.csv_paths.each_with_index do |csv_path, i|
|
13
|
+
file = File.basename("localization_#{i}.csv")
|
14
|
+
FileUtils.cp(csv_path, platform_dir.join(file.to_s))
|
15
|
+
end
|
16
|
+
LOGGER.debug("CSV wording export done !")
|
17
|
+
end
|
18
|
+
|
19
|
+
def should_export_locale_by_locale?
|
20
|
+
false
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -14,6 +14,8 @@ module AdLocalize
|
|
14
14
|
ios_builder
|
15
15
|
when 'properties'
|
16
16
|
properties_builder
|
17
|
+
when 'csv'
|
18
|
+
csv_builder
|
17
19
|
else
|
18
20
|
raise ArgumentError.new('Unknown platform for builder factory')
|
19
21
|
end
|
@@ -38,6 +40,10 @@ module AdLocalize
|
|
38
40
|
def properties_builder
|
39
41
|
@properties_builder ||= ExportPropertiesLocaleWording.new
|
40
42
|
end
|
43
|
+
|
44
|
+
def csv_builder
|
45
|
+
@csv_builder ||= ExportCSVLocaleWording.new
|
46
|
+
end
|
41
47
|
end
|
42
48
|
end
|
43
49
|
end
|
@@ -5,19 +5,16 @@ module AdLocalize
|
|
5
5
|
@headers = CSV.foreach(csv_path).first
|
6
6
|
return unless valid?(csv_path: csv_path)
|
7
7
|
translations = []
|
8
|
+
validator = Validators::KeyValidator.new
|
8
9
|
|
9
10
|
CSV.foreach(csv_path, headers: true, skip_blanks: true) do |row|
|
10
11
|
row_translations = map_row(row: row, locales: locales)
|
11
12
|
next if row_translations.blank?
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
key.same_as?(key: translation.key) || existing_plural_key
|
18
|
-
end
|
19
|
-
end
|
20
|
-
translations.concat(new_translations)
|
14
|
+
current_key = row_translations.first.key
|
15
|
+
next if validator.has_warnings?(current_key)
|
16
|
+
|
17
|
+
translations.concat(row_translations)
|
21
18
|
end
|
22
19
|
|
23
20
|
locale_wordings = translations.group_by(&:locale).map do |locale, group|
|
@@ -10,6 +10,14 @@ module AdLocalize
|
|
10
10
|
hash[translation.key.label] = {} unless hash.key? translation.key.label
|
11
11
|
hash[translation.key.label][translation.key.plural_key] = translation.value
|
12
12
|
else
|
13
|
+
unless hash.is_a?(Hash)
|
14
|
+
LOGGER.warn "Corrupted input. Trying to insert a value for key '#{translation.key.label}' but a value already exists for '#{inner_keys[0..index-1].join(".")}'. Skipping."
|
15
|
+
break # skip this corrupted key
|
16
|
+
end
|
17
|
+
previous_value = hash[inner_key.to_s]
|
18
|
+
if !previous_value.blank? && previous_value.is_a?(Hash)
|
19
|
+
LOGGER.warn "Corrupted input. Trying to insert a value for key '#{translation.key.label}' but values already exist for keys '#{translation.key.label}.*'. Previous values will be lost."
|
20
|
+
end
|
13
21
|
hash[inner_key.to_s] = translation.value
|
14
22
|
end
|
15
23
|
else
|
@@ -17,18 +17,16 @@ module AdLocalize
|
|
17
17
|
|
18
18
|
def map_rows(values:)
|
19
19
|
translations = []
|
20
|
+
validator = Validators::KeyValidator.new
|
21
|
+
|
20
22
|
values[1..-1].each do |row|
|
21
23
|
row_translations = map_row(row: row)
|
22
24
|
next if row_translations.blank?
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
key.same_as?(key: translation.key) || existing_plural_key
|
29
|
-
end
|
30
|
-
end
|
31
|
-
translations.concat(new_translations)
|
26
|
+
current_key = row_translations.first.key
|
27
|
+
next if validator.has_warnings?(current_key)
|
28
|
+
|
29
|
+
translations.concat(row_translations)
|
32
30
|
end
|
33
31
|
translations
|
34
32
|
end
|
@@ -19,7 +19,7 @@ module AdLocalize
|
|
19
19
|
spreadsheet.sheets[0..0].map { |sheet| get_sheet_values(spreadsheet_id: g_spreadsheet_options.spreadsheet_id, sheet: sheet) }
|
20
20
|
else
|
21
21
|
spreadsheet.sheets.select do |sheet|
|
22
|
-
g_spreadsheet_options.sheet_ids.include?(sheet.properties.sheet_id)
|
22
|
+
g_spreadsheet_options.sheet_ids.include?(sheet.properties.sheet_id.to_s)
|
23
23
|
end.map do |sheet|
|
24
24
|
get_sheet_values(spreadsheet_id: g_spreadsheet_options.spreadsheet_id, sheet: sheet)
|
25
25
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module AdLocalize
|
2
2
|
module Requests
|
3
3
|
class ExportRequest
|
4
|
-
SUPPORTED_PLATFORMS = %w(ios android yml json properties).freeze
|
4
|
+
SUPPORTED_PLATFORMS = %w(ios android yml json properties csv).freeze
|
5
5
|
DEFAULT_EXPORT_FOLDER = 'exports'.freeze
|
6
6
|
CSV_CONTENT_TYPES = %w(text/csv text/plain application/csv).freeze
|
7
|
+
EMPTY_CONTENT_TYPE = 'inode/x-empty'.freeze
|
7
8
|
|
8
9
|
def initialize(**args)
|
9
10
|
@locales = Array(args[:locales].presence)
|
@@ -34,6 +35,10 @@ module AdLocalize
|
|
34
35
|
!@csv_paths.blank? && @csv_paths.all? { |csv_path| File.exist?(csv_path) && is_csv?(path: csv_path) }
|
35
36
|
end
|
36
37
|
|
38
|
+
def has_empty_files?
|
39
|
+
!@csv_paths.blank? && @csv_paths.all? { |csv_path| File.exist?(csv_path) && is_empty?(path: csv_path) }
|
40
|
+
end
|
41
|
+
|
37
42
|
def has_g_spreadsheet_options?
|
38
43
|
@g_spreadsheet_options.present?
|
39
44
|
end
|
@@ -61,7 +66,15 @@ module AdLocalize
|
|
61
66
|
end
|
62
67
|
|
63
68
|
def is_csv?(path:)
|
64
|
-
CSV_CONTENT_TYPES.include?(
|
69
|
+
CSV_CONTENT_TYPES.include? content_type(path: path)
|
70
|
+
end
|
71
|
+
|
72
|
+
def is_empty?(path:)
|
73
|
+
content_type(path: path) == EMPTY_CONTENT_TYPE
|
74
|
+
end
|
75
|
+
|
76
|
+
def content_type(path:)
|
77
|
+
`file --brief --mime-type "#{path}"`.strip
|
65
78
|
end
|
66
79
|
|
67
80
|
def valid_g_spreadsheet_options?
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module AdLocalize
|
2
|
+
module Validators
|
3
|
+
class KeyValidator
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@existing_key_for_label = {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def has_warnings?(current_key)
|
10
|
+
current_label = current_key.label
|
11
|
+
existing_key = @existing_key_for_label[current_label]
|
12
|
+
|
13
|
+
has_warnings = false
|
14
|
+
|
15
|
+
unless existing_key.nil?
|
16
|
+
existing_plural_key = existing_key.label == current_key.label && existing_key.plural? && current_key.singular?
|
17
|
+
existing_singular_key = existing_key.label == current_key.label && existing_key.singular? && current_key.plural?
|
18
|
+
is_same_key = existing_key.same_as?(key: current_key)
|
19
|
+
LOGGER.warn "A plural value already exist for key '#{current_label}'. Remove duplicates." if existing_plural_key
|
20
|
+
LOGGER.warn "A singular value already exist for key '#{current_label}'. Remove duplicates." if existing_singular_key
|
21
|
+
LOGGER.warn "Some values already exist for key '#{current_label}'. Remove duplicates." if is_same_key
|
22
|
+
has_warnings = is_same_key || existing_plural_key || existing_singular_key
|
23
|
+
end
|
24
|
+
|
25
|
+
@existing_key_for_label[current_label] = current_key
|
26
|
+
|
27
|
+
has_warnings
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/ad_localize/version.rb
CHANGED
data/lib/ad_localize.rb
CHANGED
@@ -53,6 +53,7 @@ require 'ad_localize/interactors/platforms/export_ios_locale_wording'
|
|
53
53
|
require 'ad_localize/interactors/platforms/export_json_locale_wording'
|
54
54
|
require 'ad_localize/interactors/platforms/export_yaml_locale_wording'
|
55
55
|
require 'ad_localize/interactors/platforms/export_properties_locale_wording'
|
56
|
+
require 'ad_localize/interactors/platforms/export_csv_locale_wording'
|
56
57
|
require 'ad_localize/interactors/platforms/export_platform_factory'
|
57
58
|
|
58
59
|
require 'ad_localize/serializers/with_template'
|
@@ -64,7 +65,7 @@ require 'ad_localize/serializers/properties_serializer'
|
|
64
65
|
require 'ad_localize/serializers/json_serializer'
|
65
66
|
require 'ad_localize/serializers/yaml_serializer'
|
66
67
|
|
67
|
-
|
68
|
+
require 'ad_localize/validators/key_validator'
|
68
69
|
|
69
70
|
module AdLocalize
|
70
71
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ad_localize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edouard Siegel
|
@@ -118,7 +118,7 @@ dependencies:
|
|
118
118
|
requirements:
|
119
119
|
- - ">="
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version:
|
121
|
+
version: 6.1.3.2
|
122
122
|
- - "<"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '7.0'
|
@@ -128,7 +128,7 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 6.1.3.2
|
132
132
|
- - "<"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '7.0'
|
@@ -161,33 +161,33 @@ dependencies:
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0.8'
|
163
163
|
- !ruby/object:Gem::Dependency
|
164
|
-
name:
|
164
|
+
name: googleauth
|
165
165
|
requirement: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
167
|
- - "~>"
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version: '0.
|
169
|
+
version: '0.12'
|
170
170
|
type: :runtime
|
171
171
|
prerelease: false
|
172
172
|
version_requirements: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
174
|
- - "~>"
|
175
175
|
- !ruby/object:Gem::Version
|
176
|
-
version: '0.
|
176
|
+
version: '0.12'
|
177
177
|
- !ruby/object:Gem::Dependency
|
178
|
-
name:
|
178
|
+
name: google-apis-sheets_v4
|
179
179
|
requirement: !ruby/object:Gem::Requirement
|
180
180
|
requirements:
|
181
181
|
- - "~>"
|
182
182
|
- !ruby/object:Gem::Version
|
183
|
-
version: '0.
|
183
|
+
version: '0.9'
|
184
184
|
type: :runtime
|
185
185
|
prerelease: false
|
186
186
|
version_requirements: !ruby/object:Gem::Requirement
|
187
187
|
requirements:
|
188
188
|
- - "~>"
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version: '0.
|
190
|
+
version: '0.9'
|
191
191
|
description: |-
|
192
192
|
AdLocalize produces localization files from platform agnostic wording.
|
193
193
|
Supported wording format : CSV. Supported export format: iOS, Android, JSON and YAML
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- lib/ad_localize/interactors/export_wording.rb
|
230
230
|
- lib/ad_localize/interactors/merge_wordings.rb
|
231
231
|
- lib/ad_localize/interactors/platforms/export_android_locale_wording.rb
|
232
|
+
- lib/ad_localize/interactors/platforms/export_csv_locale_wording.rb
|
232
233
|
- lib/ad_localize/interactors/platforms/export_ios_locale_wording.rb
|
233
234
|
- lib/ad_localize/interactors/platforms/export_json_locale_wording.rb
|
234
235
|
- lib/ad_localize/interactors/platforms/export_platform_factory.rb
|
@@ -261,6 +262,7 @@ files:
|
|
261
262
|
- lib/ad_localize/templates/ios/Localizable.strings.erb
|
262
263
|
- lib/ad_localize/templates/ios/Localizable.stringsdict.erb
|
263
264
|
- lib/ad_localize/templates/properties/template.properties.erb
|
265
|
+
- lib/ad_localize/validators/key_validator.rb
|
264
266
|
- lib/ad_localize/version.rb
|
265
267
|
- lib/ad_localize/view_models/translation_group_view_model.rb
|
266
268
|
- lib/ad_localize/view_models/translation_view_model.rb
|
@@ -274,7 +276,7 @@ require_paths:
|
|
274
276
|
- lib
|
275
277
|
required_ruby_version: !ruby/object:Gem::Requirement
|
276
278
|
requirements:
|
277
|
-
- - "
|
279
|
+
- - ">="
|
278
280
|
- !ruby/object:Gem::Version
|
279
281
|
version: '2.3'
|
280
282
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -283,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
285
|
- !ruby/object:Gem::Version
|
284
286
|
version: '0'
|
285
287
|
requirements: []
|
286
|
-
rubygems_version: 3.
|
288
|
+
rubygems_version: 3.2.26
|
287
289
|
signing_key:
|
288
290
|
specification_version: 4
|
289
291
|
summary: AdLocalize helps with mobile and web applications wording
|