ad_localize 4.1.1 → 6.0.0
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 +6 -3
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +319 -0
- data/CHANGELOG.md +70 -15
- data/Gemfile +1 -0
- data/Gemfile.lock +63 -61
- data/README.md +37 -10
- data/Rakefile +1 -0
- data/ad_localize.gemspec +14 -13
- data/bin/console +1 -1
- data/exe/ad_localize +2 -1
- data/lib/ad_localize/ad_logger.rb +5 -10
- data/lib/ad_localize/cli.rb +10 -3
- data/lib/ad_localize/entities/key.rb +3 -76
- data/lib/ad_localize/entities/locale_wording.rb +32 -52
- data/lib/ad_localize/entities/platform.rb +13 -0
- data/lib/ad_localize/entities/simple_wording.rb +6 -0
- data/lib/ad_localize/entities/wording_type.rb +11 -0
- data/lib/ad_localize/interactors/base_generate_files.rb +37 -0
- data/lib/ad_localize/interactors/download_spreadsheets.rb +20 -0
- data/lib/ad_localize/interactors/export_wording.rb +27 -18
- data/lib/ad_localize/interactors/generate_info_plist.rb +24 -0
- data/lib/ad_localize/interactors/generate_ios_files.rb +12 -0
- data/lib/ad_localize/interactors/generate_json.rb +20 -0
- data/lib/ad_localize/interactors/generate_localizable_strings.rb +24 -0
- data/lib/ad_localize/interactors/generate_localizable_strings_dict.rb +24 -0
- data/lib/ad_localize/interactors/generate_properties.rb +20 -0
- data/lib/ad_localize/interactors/generate_strings.rb +25 -0
- data/lib/ad_localize/interactors/generate_yaml.rb +20 -0
- data/lib/ad_localize/interactors/merge_wordings.rb +49 -18
- data/lib/ad_localize/interactors/parse_csv_files.rb +22 -0
- data/lib/ad_localize/interactors/process_export_request.rb +21 -0
- data/lib/ad_localize/mappers/locale_wording_to_hash.rb +45 -24
- data/lib/ad_localize/mappers/options_to_export_request.rb +14 -21
- data/lib/ad_localize/option_handler.rb +50 -26
- data/lib/ad_localize/parsers/csv_parser.rb +84 -0
- data/lib/ad_localize/parsers/key_parser.rb +62 -0
- data/lib/ad_localize/repositories/drive_repository.rb +53 -0
- data/lib/ad_localize/repositories/file_system_repository.rb +2 -1
- data/lib/ad_localize/requests/export_request.rb +97 -53
- data/lib/ad_localize/sanitizers/ios_sanitizer.rb +12 -0
- data/lib/ad_localize/{mappers/android_translation_mapper.rb → sanitizers/ios_to_android_sanitizer.rb} +8 -8
- data/lib/ad_localize/sanitizers/pass_through_sanitizer.rb +10 -0
- data/lib/ad_localize/serializers/info_plist_serializer.rb +9 -11
- data/lib/ad_localize/serializers/json_serializer.rb +3 -5
- data/lib/ad_localize/serializers/localizable_strings_serializer.rb +9 -11
- data/lib/ad_localize/serializers/localizable_stringsdict_serializer.rb +12 -19
- data/lib/ad_localize/serializers/properties_serializer.rb +9 -11
- data/lib/ad_localize/serializers/strings_serializer.rb +12 -21
- data/lib/ad_localize/serializers/templated_serializer.rb +51 -0
- data/lib/ad_localize/serializers/yaml_serializer.rb +4 -6
- data/lib/ad_localize/templates/android/strings.xml.erb +6 -6
- data/lib/ad_localize/templates/ios/Localizable.stringsdict.erb +14 -14
- data/lib/ad_localize/version.rb +2 -1
- data/lib/ad_localize/view_models/compound_wording_view_model.rb +2 -0
- data/lib/ad_localize/view_models/simple_wording_view_model.rb +2 -0
- data/lib/ad_localize.rb +33 -34
- metadata +86 -69
- data/lib/ad_localize/constant.rb +0 -6
- data/lib/ad_localize/entities/translation.rb +0 -32
- data/lib/ad_localize/entities/wording.rb +0 -24
- data/lib/ad_localize/interactors/execute_export_request.rb +0 -43
- data/lib/ad_localize/interactors/export_csv_files.rb +0 -17
- data/lib/ad_localize/interactors/export_g_spreadsheet.rb +0 -59
- data/lib/ad_localize/interactors/platforms/export_android_locale_wording.rb +0 -43
- data/lib/ad_localize/interactors/platforms/export_csv_locale_wording.rb +0 -25
- data/lib/ad_localize/interactors/platforms/export_ios_locale_wording.rb +0 -66
- data/lib/ad_localize/interactors/platforms/export_json_locale_wording.rb +0 -27
- data/lib/ad_localize/interactors/platforms/export_platform_factory.rb +0 -50
- data/lib/ad_localize/interactors/platforms/export_properties_locale_wording.rb +0 -33
- data/lib/ad_localize/interactors/platforms/export_yaml_locale_wording.rb +0 -27
- data/lib/ad_localize/mappers/csv_path_to_wording.rb +0 -73
- data/lib/ad_localize/mappers/ios_translation_mapper.rb +0 -12
- data/lib/ad_localize/mappers/translation_group_mapper.rb +0 -14
- data/lib/ad_localize/mappers/translation_mapper.rb +0 -30
- data/lib/ad_localize/mappers/value_range_to_wording.rb +0 -67
- data/lib/ad_localize/repositories/g_sheets_repository.rb +0 -44
- data/lib/ad_localize/requests/g_spreadsheet_options.rb +0 -47
- data/lib/ad_localize/requests/merge_policy.rb +0 -28
- data/lib/ad_localize/serializers/with_template.rb +0 -19
- data/lib/ad_localize/validators/key_validator.rb +0 -31
- data/lib/ad_localize/view_models/translation_group_view_model.rb +0 -19
- data/lib/ad_localize/view_models/translation_view_model.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c1c393dd716aa7f1306df1a86b7e166194efebe24d94e6f5c61628d62026a60
|
4
|
+
data.tar.gz: 4e1d02d8e92919e656c1fdb77efb620e9f5c812b4c59da5d6682269917886b00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a041906d4a7f138fc762be1dc4b30ef2b91fcb8419ad4a28c90c24689deb5eb684877671721156ff63c3044788116252789cd14bddefd968731625bb6766cb5
|
7
|
+
data.tar.gz: f9e3cc3ad69de48aa334471443a554562a2f9a7a47364737bfd5af6755dc5040eba68249dd37e9c5ae4445e7afd0e6259e5d97181c9feb4d4443696f2344bf36
|
data/.github/workflows/ruby.yml
CHANGED
@@ -7,15 +7,18 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby: ['
|
10
|
+
ruby: ['3.0.6', '3.1.4', '3.2.0']
|
11
11
|
|
12
12
|
steps:
|
13
13
|
- uses: actions/checkout@v2
|
14
14
|
- uses: ruby/setup-ruby@v1
|
15
15
|
with:
|
16
16
|
ruby-version: ${{ matrix.ruby }}
|
17
|
-
- name: Build
|
17
|
+
- name: Build
|
18
18
|
run: |
|
19
19
|
gem install bundler
|
20
20
|
bundle install --jobs 4 --retry 3
|
21
|
-
|
21
|
+
- name: Run linter
|
22
|
+
run: bundle exec rubocop
|
23
|
+
- name: Run tests
|
24
|
+
run: bundle exec rake test
|
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,319 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2023-02-02 13:39:01 UTC using RuboCop version 1.43.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 4
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/OrderedDependencies:
|
14
|
+
Exclude:
|
15
|
+
- 'ad_localize.gemspec'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# Configuration parameters: Severity, Include.
|
19
|
+
# Include: **/*.gemspec
|
20
|
+
Gemspec/RequiredRubyVersion:
|
21
|
+
Exclude:
|
22
|
+
- 'ad_localize.gemspec'
|
23
|
+
|
24
|
+
# Offense count: 86
|
25
|
+
# This cop supports safe autocorrection (--autocorrect).
|
26
|
+
Layout/EmptyLineAfterMagicComment:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# Offense count: 1
|
30
|
+
# This cop supports safe autocorrection (--autocorrect).
|
31
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
32
|
+
Lint/UnusedBlockArgument:
|
33
|
+
Exclude:
|
34
|
+
- 'lib/ad_localize/mappers/locale_wording_to_hash.rb'
|
35
|
+
|
36
|
+
# Offense count: 4
|
37
|
+
# This cop supports safe autocorrection (--autocorrect).
|
38
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
|
39
|
+
Lint/UnusedMethodArgument:
|
40
|
+
Exclude:
|
41
|
+
- 'lib/ad_localize/interactors/base_generate_files.rb'
|
42
|
+
- 'lib/ad_localize/serializers/templated_serializer.rb'
|
43
|
+
|
44
|
+
# Offense count: 6
|
45
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
|
46
|
+
Metrics/AbcSize:
|
47
|
+
Max: 35
|
48
|
+
|
49
|
+
# Offense count: 2
|
50
|
+
# Configuration parameters: CountComments, CountAsOne.
|
51
|
+
Metrics/ClassLength:
|
52
|
+
Max: 139
|
53
|
+
|
54
|
+
# Offense count: 1
|
55
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
56
|
+
Metrics/CyclomaticComplexity:
|
57
|
+
Max: 11
|
58
|
+
|
59
|
+
# Offense count: 11
|
60
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
61
|
+
Metrics/MethodLength:
|
62
|
+
Max: 40
|
63
|
+
|
64
|
+
# Offense count: 1
|
65
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
66
|
+
Metrics/PerceivedComplexity:
|
67
|
+
Max: 11
|
68
|
+
|
69
|
+
# Offense count: 1
|
70
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
71
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
72
|
+
Naming/MethodParameterName:
|
73
|
+
Exclude:
|
74
|
+
- 'lib/ad_localize/mappers/locale_wording_to_hash.rb'
|
75
|
+
|
76
|
+
# Offense count: 10
|
77
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
78
|
+
# NamePrefix: is_, has_, have_
|
79
|
+
# ForbiddenPrefixes: is_, has_, have_
|
80
|
+
# AllowedMethods: is_a?
|
81
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
82
|
+
Naming/PredicateName:
|
83
|
+
Exclude:
|
84
|
+
- 'spec/**/*'
|
85
|
+
- 'lib/ad_localize/interactors/base_generate_files.rb'
|
86
|
+
- 'lib/ad_localize/interactors/generate_info_plist.rb'
|
87
|
+
- 'lib/ad_localize/interactors/generate_json.rb'
|
88
|
+
- 'lib/ad_localize/interactors/generate_localizable_strings.rb'
|
89
|
+
- 'lib/ad_localize/interactors/generate_localizable_strings_dict.rb'
|
90
|
+
- 'lib/ad_localize/interactors/generate_properties.rb'
|
91
|
+
- 'lib/ad_localize/interactors/generate_strings.rb'
|
92
|
+
- 'lib/ad_localize/interactors/generate_yaml.rb'
|
93
|
+
- 'lib/ad_localize/requests/export_request.rb'
|
94
|
+
|
95
|
+
# Offense count: 28
|
96
|
+
# Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns.
|
97
|
+
# SupportedStyles: snake_case, camelCase
|
98
|
+
Naming/VariableName:
|
99
|
+
Exclude:
|
100
|
+
- 'lib/ad_localize/sanitizers/ios_to_android_sanitizer.rb'
|
101
|
+
|
102
|
+
# Offense count: 1
|
103
|
+
# This cop supports safe autocorrection (--autocorrect).
|
104
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
105
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
106
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
107
|
+
# FunctionalMethods: let, let!, subject, watch
|
108
|
+
# AllowedMethods: lambda, proc, it
|
109
|
+
Style/BlockDelimiters:
|
110
|
+
Exclude:
|
111
|
+
- 'lib/ad_localize/parsers/csv_parser.rb'
|
112
|
+
|
113
|
+
# Offense count: 2
|
114
|
+
# This cop supports safe autocorrection (--autocorrect).
|
115
|
+
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
116
|
+
# SupportedStyles: assign_to_condition, assign_inside_condition
|
117
|
+
Style/ConditionalAssignment:
|
118
|
+
Exclude:
|
119
|
+
- 'lib/ad_localize/interactors/export_wording.rb'
|
120
|
+
- 'lib/ad_localize/sanitizers/ios_to_android_sanitizer.rb'
|
121
|
+
|
122
|
+
# Offense count: 36
|
123
|
+
# Configuration parameters: AllowedConstants.
|
124
|
+
Style/Documentation:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
# Offense count: 3
|
128
|
+
# This cop supports safe autocorrection (--autocorrect).
|
129
|
+
Style/ExpandPathArguments:
|
130
|
+
Exclude:
|
131
|
+
- 'ad_localize.gemspec'
|
132
|
+
- 'test/test_helper.rb'
|
133
|
+
|
134
|
+
# Offense count: 3
|
135
|
+
# This cop supports safe autocorrection (--autocorrect).
|
136
|
+
# Configuration parameters: EnforcedStyle.
|
137
|
+
# SupportedStyles: format, sprintf, percent
|
138
|
+
Style/FormatString:
|
139
|
+
Exclude:
|
140
|
+
- 'lib/ad_localize/interactors/generate_info_plist.rb'
|
141
|
+
- 'lib/ad_localize/interactors/generate_localizable_strings.rb'
|
142
|
+
- 'lib/ad_localize/interactors/generate_localizable_strings_dict.rb'
|
143
|
+
|
144
|
+
# Offense count: 3
|
145
|
+
# This cop supports safe autocorrection (--autocorrect).
|
146
|
+
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
147
|
+
# SupportedStyles: annotated, template, unannotated
|
148
|
+
Style/FormatStringToken:
|
149
|
+
EnforcedStyle: template
|
150
|
+
|
151
|
+
# Offense count: 1
|
152
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
153
|
+
Style/GlobalStdStream:
|
154
|
+
Exclude:
|
155
|
+
- 'lib/ad_localize/ad_logger.rb'
|
156
|
+
|
157
|
+
# Offense count: 1
|
158
|
+
# This cop supports safe autocorrection (--autocorrect).
|
159
|
+
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
160
|
+
Style/GuardClause:
|
161
|
+
Exclude:
|
162
|
+
- 'lib/ad_localize/repositories/drive_repository.rb'
|
163
|
+
|
164
|
+
# Offense count: 57
|
165
|
+
# This cop supports safe autocorrection (--autocorrect).
|
166
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
167
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
168
|
+
# SupportedShorthandSyntax: always, never, either, consistent
|
169
|
+
Style/HashSyntax:
|
170
|
+
Enabled: false
|
171
|
+
|
172
|
+
# Offense count: 4
|
173
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
174
|
+
Style/LineEndConcatenation:
|
175
|
+
Exclude:
|
176
|
+
- 'lib/ad_localize/entities/locale_wording.rb'
|
177
|
+
|
178
|
+
# Offense count: 6
|
179
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
180
|
+
# Configuration parameters: EnforcedStyle.
|
181
|
+
# SupportedStyles: literals, strict
|
182
|
+
Style/MutableConstant:
|
183
|
+
Exclude:
|
184
|
+
- 'lib/ad_localize/entities/platform.rb'
|
185
|
+
- 'lib/ad_localize/interactors/merge_wordings.rb'
|
186
|
+
- 'lib/ad_localize/option_handler.rb'
|
187
|
+
- 'lib/ad_localize/requests/export_request.rb'
|
188
|
+
- 'test/test_helper.rb'
|
189
|
+
|
190
|
+
# Offense count: 1
|
191
|
+
# This cop supports safe autocorrection (--autocorrect).
|
192
|
+
# Configuration parameters: EnforcedStyle.
|
193
|
+
# SupportedStyles: both, prefix, postfix
|
194
|
+
Style/NegatedIf:
|
195
|
+
Exclude:
|
196
|
+
- 'lib/ad_localize/interactors/generate_strings.rb'
|
197
|
+
|
198
|
+
# Offense count: 3
|
199
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
200
|
+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
201
|
+
# SupportedStyles: predicate, comparison
|
202
|
+
Style/NumericPredicate:
|
203
|
+
Exclude:
|
204
|
+
- 'spec/**/*'
|
205
|
+
- 'test/interactors/process_export_request_test.rb'
|
206
|
+
- 'test/repositories/drive_repository_test.rb'
|
207
|
+
|
208
|
+
# Offense count: 1
|
209
|
+
# This cop supports safe autocorrection (--autocorrect).
|
210
|
+
# Configuration parameters: AllowedCompactTypes.
|
211
|
+
# SupportedStyles: compact, exploded
|
212
|
+
Style/RaiseArgs:
|
213
|
+
EnforcedStyle: compact
|
214
|
+
|
215
|
+
# Offense count: 1
|
216
|
+
# This cop supports safe autocorrection (--autocorrect).
|
217
|
+
Style/RedundantAssignment:
|
218
|
+
Exclude:
|
219
|
+
- 'lib/ad_localize/parsers/csv_parser.rb'
|
220
|
+
|
221
|
+
# Offense count: 1
|
222
|
+
# This cop supports safe autocorrection (--autocorrect).
|
223
|
+
Style/RedundantBegin:
|
224
|
+
Exclude:
|
225
|
+
- 'lib/ad_localize/repositories/drive_repository.rb'
|
226
|
+
|
227
|
+
# Offense count: 18
|
228
|
+
# This cop supports safe autocorrection (--autocorrect).
|
229
|
+
Style/RedundantFreeze:
|
230
|
+
Exclude:
|
231
|
+
- 'lib/ad_localize/interactors/generate_info_plist.rb'
|
232
|
+
- 'lib/ad_localize/interactors/generate_localizable_strings.rb'
|
233
|
+
- 'lib/ad_localize/interactors/generate_localizable_strings_dict.rb'
|
234
|
+
- 'lib/ad_localize/interactors/generate_strings.rb'
|
235
|
+
- 'lib/ad_localize/interactors/merge_wordings.rb'
|
236
|
+
- 'lib/ad_localize/parsers/csv_parser.rb'
|
237
|
+
- 'lib/ad_localize/parsers/key_parser.rb'
|
238
|
+
- 'lib/ad_localize/serializers/info_plist_serializer.rb'
|
239
|
+
- 'lib/ad_localize/serializers/localizable_strings_serializer.rb'
|
240
|
+
- 'lib/ad_localize/serializers/localizable_stringsdict_serializer.rb'
|
241
|
+
|
242
|
+
# Offense count: 2
|
243
|
+
# This cop supports safe autocorrection (--autocorrect).
|
244
|
+
Style/RedundantPercentQ:
|
245
|
+
Exclude:
|
246
|
+
- 'ad_localize.gemspec'
|
247
|
+
|
248
|
+
# Offense count: 2
|
249
|
+
# This cop supports safe autocorrection (--autocorrect).
|
250
|
+
Style/RedundantRegexpEscape:
|
251
|
+
Exclude:
|
252
|
+
- 'lib/ad_localize/sanitizers/ios_sanitizer.rb'
|
253
|
+
- 'lib/ad_localize/sanitizers/ios_to_android_sanitizer.rb'
|
254
|
+
|
255
|
+
# Offense count: 1
|
256
|
+
# This cop supports safe autocorrection (--autocorrect).
|
257
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
258
|
+
Style/RedundantReturn:
|
259
|
+
Exclude:
|
260
|
+
- 'lib/ad_localize/option_handler.rb'
|
261
|
+
|
262
|
+
# Offense count: 2
|
263
|
+
# This cop supports safe autocorrection (--autocorrect).
|
264
|
+
# Configuration parameters: EnforcedStyle.
|
265
|
+
# SupportedStyles: implicit, explicit
|
266
|
+
Style/RescueStandardError:
|
267
|
+
Exclude:
|
268
|
+
- 'lib/ad_localize/repositories/drive_repository.rb'
|
269
|
+
|
270
|
+
# Offense count: 1
|
271
|
+
# This cop supports safe autocorrection (--autocorrect).
|
272
|
+
Style/SelfAssignment:
|
273
|
+
Exclude:
|
274
|
+
- 'lib/ad_localize/sanitizers/ios_to_android_sanitizer.rb'
|
275
|
+
|
276
|
+
# Offense count: 3
|
277
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
278
|
+
Style/SlicingWithRange:
|
279
|
+
Exclude:
|
280
|
+
- 'lib/ad_localize/interactors/merge_wordings.rb'
|
281
|
+
- 'lib/ad_localize/mappers/locale_wording_to_hash.rb'
|
282
|
+
- 'lib/ad_localize/parsers/csv_parser.rb'
|
283
|
+
|
284
|
+
# Offense count: 3
|
285
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
286
|
+
# Configuration parameters: Mode.
|
287
|
+
Style/StringConcatenation:
|
288
|
+
Exclude:
|
289
|
+
- 'lib/ad_localize/serializers/properties_serializer.rb'
|
290
|
+
- 'lib/ad_localize/serializers/strings_serializer.rb'
|
291
|
+
- 'lib/ad_localize/serializers/templated_serializer.rb'
|
292
|
+
|
293
|
+
# Offense count: 85
|
294
|
+
# This cop supports safe autocorrection (--autocorrect).
|
295
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
296
|
+
# SupportedStyles: single_quotes, double_quotes
|
297
|
+
Style/StringLiterals:
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
# Offense count: 3
|
301
|
+
# This cop supports safe autocorrection (--autocorrect).
|
302
|
+
Style/SymbolLiteral:
|
303
|
+
Exclude:
|
304
|
+
- 'lib/ad_localize/mappers/options_to_export_request.rb'
|
305
|
+
- 'test/option_handler_test.rb'
|
306
|
+
|
307
|
+
# Offense count: 3
|
308
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
309
|
+
Style/ZeroLengthPredicate:
|
310
|
+
Exclude:
|
311
|
+
- 'lib/ad_localize/mappers/locale_wording_to_hash.rb'
|
312
|
+
- 'test/repositories/drive_repository_test.rb'
|
313
|
+
|
314
|
+
# Offense count: 10
|
315
|
+
# This cop supports safe autocorrection (--autocorrect).
|
316
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
317
|
+
# URISchemes: http, https
|
318
|
+
Layout/LineLength:
|
319
|
+
Max: 153
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## Unreleased
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Remove extra spaces before and after key/translation contents
|
12
|
+
- skip lines starting with a `#` character
|
13
|
+
- new option `-l` or `--locales` to export only a subset or locales
|
14
|
+
- Separate csv parse responsibility between key parser and csv parser
|
15
|
+
- use Rubocop to detect coding style offenses (also in github workflow)
|
16
|
+
- print warning log when a value is replaced during merge
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- parse csv in 2 steps : first analyze keys and keep them in a map, second add translations to keys
|
21
|
+
- do not store empty values during parse if `-x` option is active
|
22
|
+
- handle duplicate keys while parsing csv instead of while exporting for a platform
|
23
|
+
- BREAKING CHANGE : the way to provide service account information is no longer to set GCLOUD_CLIENT_SECRET with the content of the service account configuration. Now you need to provide the path to the configuration using the environment variable GOOGLE_APPLICATION_CREDENTIALS
|
24
|
+
- we no longer access to spreadsheet cells using GSheet v4. Now we downloaded all the relevant sheets and then we parse file contents like normal csv files. We use the exponentiel retry feature provided by google with a maximum of 3 attempts [more info here](https://github.com/googleapis/google-api-ruby-client/blob/377edf2ca4c1ef41a91de4176e5c7ad7df220007/google-apis-core/lib/google/apis/options.rb#L70). We noticed we had download error for 6 or more sheets in a spreadsheet.
|
25
|
+
- locale wording stores separately each type of wording. This allows to export each wording type concurrently if you want to
|
26
|
+
- no more plaform interactor. It has been replaced with generated file interactors. We still have an ios interactor because there are multiple files to export.
|
27
|
+
- All templated serializers now share a common parent : `TemplatedSerializer`
|
28
|
+
- Isolate the process to ensure a translation is correctly formatted for a platform in a new class type `sanitizers`. They can be tested separately.
|
29
|
+
|
30
|
+
### Removed
|
31
|
+
|
32
|
+
- no more GSpreadsheetOptions. It is handled directly in request
|
33
|
+
|
34
|
+
## [5.0.0] - 2022-07-26
|
35
|
+
|
36
|
+
### Added
|
37
|
+
|
38
|
+
- Added new option (-x) to bypass keys with empty values for iOS only in
|
39
|
+
PR [#78](https://github.com/faberNovel/ad_localize/pull/78) by [ThomasEsterlin](https://github.com/ThomasEsterlin)
|
40
|
+
|
41
|
+
### Breaking change
|
42
|
+
|
43
|
+
- Drop support for Ruby >= 2.3, < 2.7
|
44
|
+
|
8
45
|
## [4.1.1] - 2022-04-15
|
9
46
|
|
10
47
|
### Fixed
|
@@ -21,10 +58,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
21
58
|
|
22
59
|
### Fixed
|
23
60
|
|
24
|
-
- Fix error warning when spreadsheet is empty. Fix [#58](https://github.com/applidium/ad_localize/issues/58) in
|
25
|
-
|
26
|
-
-
|
27
|
-
|
61
|
+
- Fix error warning when spreadsheet is empty. Fix [#58](https://github.com/applidium/ad_localize/issues/58) in
|
62
|
+
PR [#69](https://github.com/applidium/ad_localize/pull/69)
|
63
|
+
- Add warning messages when input is corrupted. Fix [#59](https://github.com/applidium/ad_localize/issues/59) in
|
64
|
+
PR [#69](https://github.com/applidium/ad_localize/pull/69)
|
65
|
+
- Fix performance issue and add warning messages. Fix [#61](https://github.com/applidium/ad_localize/issues/61) in
|
66
|
+
PR [#69](https://github.com/applidium/ad_localize/pull/69)
|
67
|
+
- Update deprecated `google-api-client` gem. Fix [#63](https://github.com/applidium/ad_localize/issues/63) in
|
68
|
+
PR [#70](https://github.com/applidium/ad_localize/pull/70)
|
28
69
|
|
29
70
|
## [4.0.8] - 2021-05-25
|
30
71
|
|
@@ -72,7 +113,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
72
113
|
|
73
114
|
### Fixed
|
74
115
|
|
75
|
-
- Use percent HTML char for escaping '%' on android. [#49](https://github.com/applidium/ad_localize/pull/49)
|
116
|
+
- Use percent HTML char for escaping '%' on android. [#49](https://github.com/applidium/ad_localize/pull/49)
|
117
|
+
by [flolom](https://github.com/flolom)
|
76
118
|
|
77
119
|
## [4.0.1] - 2020-10-19
|
78
120
|
|
@@ -85,8 +127,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
85
127
|
### Breaking change
|
86
128
|
|
87
129
|
- Precedence to csv files. Only CSV files will be exported if both csv file and google spreadsheet are provided
|
88
|
-
- In case of multiple CSVs or sheet ids, you should be aware that all sources will be merged. By default the merge
|
89
|
-
|
130
|
+
- In case of multiple CSVs or sheet ids, you should be aware that all sources will be merged. By default the merge
|
131
|
+
policy to keep the first wording translation for each key
|
132
|
+
- New architecture. Separate export process responsibilities in dedicated classes.
|
133
|
+
Fixes [#48](https://github.com/applidium/ad_localize/issues/48)
|
134
|
+
, [#20](https://github.com/applidium/ad_localize/issues/20)
|
90
135
|
|
91
136
|
### Changed
|
92
137
|
|
@@ -121,7 +166,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
121
166
|
|
122
167
|
### Removed
|
123
168
|
|
124
|
-
- no more option -a option to indicate that a service account configuration will be provided. If set, the environment
|
169
|
+
- no more option -a option to indicate that a service account configuration will be provided. If set, the environment
|
170
|
+
variable `GCLOUD_CLIENT_SECRET` content will be used
|
125
171
|
- no more substitution of empty wording with by "Missing Translation" when using the option -d
|
126
172
|
- no more Makefile, the Rakefile is sufficient. Use `bundle exec rake -T` to display the available commands
|
127
173
|
- no more check for ordered interpolation variables in translations
|
@@ -141,25 +187,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
141
187
|
|
142
188
|
### Added
|
143
189
|
|
144
|
-
- add support for private spreadsheet using google service acccount by [@sjcqs](https://github.com/sjcqs).
|
190
|
+
- add support for private spreadsheet using google service acccount by [@sjcqs](https://github.com/sjcqs).
|
191
|
+
Fixes [#31](https://github.com/applidium/ad_localize/issues/31)
|
145
192
|
- add makefile for easier testing by [@felginep](https://github.com/felginep)
|
146
193
|
|
147
194
|
### Changed
|
148
195
|
|
149
|
-
- improve error message to have useful information in case of google spreadsheet use
|
150
|
-
|
196
|
+
- improve error message to have useful information in case of google spreadsheet use
|
197
|
+
by [@felginep](https://github.com/felginep). Fixes [#27](https://github.com/applidium/ad_localize/issues/27)
|
198
|
+
- platform folder is no longer generated when there is only one platform selected. The files are directly generated in
|
199
|
+
the output path. By [@felginep](https://github.com/felginep).
|
200
|
+
Fixes [#29](https://github.com/applidium/ad_localize/issues/29)
|
151
201
|
- raise error when google spreadsheet key is invalid by [@felginep](https://github.com/felginep)
|
152
202
|
|
153
203
|
### Fixed
|
154
204
|
|
155
|
-
- auto escape strings in Localizable.strings by [@felginep](https://github.com/felginep).
|
156
|
-
|
205
|
+
- auto escape strings in Localizable.strings by [@felginep](https://github.com/felginep).
|
206
|
+
Fixes [#26](https://github.com/applidium/ad_localize/issues/26)
|
207
|
+
- trim keys to prevent user error by [@felginep](https://github.com/felginep).
|
208
|
+
Fixes [#16](https://github.com/applidium/ad_localize/issues/16)
|
157
209
|
|
158
210
|
## [3.4.0] - 2019-02-10
|
159
211
|
|
160
212
|
### Added
|
161
213
|
|
162
|
-
- Rails folks, [@epaillous](https://github.com/epaillous) has improved the YAML support. You can now have multi-level
|
214
|
+
- Rails folks, [@epaillous](https://github.com/epaillous) has improved the YAML support. You can now have multi-level
|
215
|
+
wording.
|
163
216
|
|
164
217
|
## [3.3.0] - 2019-02-10
|
165
218
|
|
@@ -172,7 +225,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
172
225
|
### Added
|
173
226
|
|
174
227
|
- Add tests to compare reference exports by [@felginep](https://github.com/felginep)
|
175
|
-
- [iOS only]
|
228
|
+
- [iOS only]
|
229
|
+
Handle [adaptive strings](https://developer.apple.com/documentation/foundation/nsstring/1413104-variantfittingpresentationwidth)
|
230
|
+
by [@felginep](https://github.com/felginep)
|
176
231
|
|
177
232
|
### Changed
|
178
233
|
|
data/Gemfile
CHANGED