Skip to content

Commit 26d949a

Browse files
authored
Merge branch 'main' into feature/ability_to_see_search_result_in_index_page
2 parents 99d3217 + 1d8410d commit 26d949a

29 files changed

+176
-118
lines changed

Diff for: CONTRIBUTING.MD

+29
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,32 @@ To keep track of the schema structure for the models, run `annotate --models --e
224224
## Using VSCode?
225225

226226
We compiled [an extension pack](https://marketplace.visualstudio.com/items?itemName=adrianthedev.vsruby) with a few extensions that should help you with Ruby development. We use them with Avo.
227+
228+
## Adding I18n Keys
229+
230+
When incorporating I18n keys, such as `avo.preview`, it's important to ensure that all locale files include the key with appropriate translations.
231+
232+
### Step 1: Add and Normalize
233+
First, add the key to the `avo.en.yml` file. Then, run the following command to normalize the locale files alphabetically:
234+
```bash
235+
i18n-tasks normalize
236+
```
237+
238+
### Step 2: Adding Missing Keys with or without Translation
239+
240+
When adding missing keys, you have two options: proceed without translation or automatically translate them using OpenAI.
241+
242+
#### Option 1: Add Missing Keys Without Translation
243+
Run the following command to add the missing keys to all locale files:
244+
```bash
245+
i18n-tasks add-missing
246+
```
247+
This will populate the missing keys but retain the original label without translations applied.
248+
249+
#### Option 2: Add and Automatically Translate Missing Keys
250+
If you prefer to automatically translate the missing keys, skip the previous step and execute this command with your OpenAI API token:
251+
```bash
252+
OPENAI_API_KEY=TOKEN bundle exec i18n-tasks translate-missing --backend=openai
253+
```
254+
255+
Replace `TOKEN` with your actual OpenAI API key. This step will both add the missing keys and translate them automatically.

Diff for: Gemfile.lock

+16-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
avo (3.18.0)
4+
avo (3.18.1)
55
actionview (>= 6.1)
66
active_link_to
77
activerecord (>= 6.1)
@@ -108,7 +108,7 @@ GEM
108108
acts_as_list (1.2.4)
109109
activerecord (>= 6.1)
110110
activesupport (>= 6.1)
111-
actual_db_schema (0.8.2)
111+
actual_db_schema (0.8.3)
112112
activerecord
113113
activesupport
114114
ast
@@ -130,8 +130,8 @@ GEM
130130
money-rails (~> 1.12)
131131
avo-record_link_field (0.0.2)
132132
aws-eventstream (1.3.1)
133-
aws-partitions (1.1056.0)
134-
aws-sdk-core (3.219.0)
133+
aws-partitions (1.1061.0)
134+
aws-sdk-core (3.220.0)
135135
aws-eventstream (~> 1, >= 1.3.0)
136136
aws-partitions (~> 1, >= 1.992.0)
137137
aws-sigv4 (~> 1.9)
@@ -191,7 +191,7 @@ GEM
191191
bigdecimal
192192
rexml
193193
crass (1.0.6)
194-
cssbundling-rails (1.4.2)
194+
cssbundling-rails (1.4.3)
195195
railties (>= 6.0.0)
196196
csv (3.3.2)
197197
cuprite (0.15.1)
@@ -452,7 +452,7 @@ GEM
452452
puma (6.6.0)
453453
nio4r (~> 2.0)
454454
racc (1.8.1)
455-
rack (3.1.10)
455+
rack (3.1.11)
456456
rack-session (2.1.0)
457457
base64 (>= 0.1.0)
458458
rack (>= 3.0.0)
@@ -511,7 +511,7 @@ GEM
511511
psych (>= 4.0.0)
512512
redis (5.4.0)
513513
redis-client (>= 0.22.0)
514-
redis-client (0.23.2)
514+
redis-client (0.24.0)
515515
connection_pool
516516
reek (6.4.0)
517517
dry-schema (~> 1.13.0)
@@ -563,8 +563,8 @@ GEM
563563
rubocop-performance (1.23.1)
564564
rubocop (>= 1.48.1, < 2.0)
565565
rubocop-ast (>= 1.31.1, < 2.0)
566-
rubocop-shopify (2.15.1)
567-
rubocop (~> 1.51)
566+
rubocop-shopify (2.16.0)
567+
rubocop (~> 1.62)
568568
ruby-openai (7.4.0)
569569
event_stream_parser (>= 0.3.0, < 2.0.0)
570570
faraday (>= 1)
@@ -602,7 +602,7 @@ GEM
602602
simplecov-lcov (0.8.0)
603603
simplecov_json_formatter (0.1.4)
604604
smart_properties (1.17.0)
605-
solargraph (0.51.2)
605+
solargraph (0.52.0)
606606
backport (~> 1.2)
607607
benchmark
608608
bundler (~> 2.0)
@@ -620,6 +620,7 @@ GEM
620620
thor (~> 1.0)
621621
tilt (~> 2.0)
622622
yard (~> 0.9, >= 0.9.24)
623+
yard-solargraph (~> 0.1)
623624
solargraph-rails (1.1.0)
624625
activesupport
625626
solargraph
@@ -656,9 +657,9 @@ GEM
656657
tilt (2.6.0)
657658
timeout (0.4.3)
658659
tty-which (0.5.0)
659-
turbo-rails (2.0.11)
660-
actionpack (>= 6.0.0)
661-
railties (>= 6.0.0)
660+
turbo-rails (2.0.13)
661+
actionpack (>= 7.1.0)
662+
railties (>= 7.1.0)
662663
turbo_power (0.7.0)
663664
turbo-rails (>= 1.3.0)
664665
tzinfo (2.0.6)
@@ -696,6 +697,8 @@ GEM
696697
xpath (3.2.0)
697698
nokogiri (~> 1.8)
698699
yard (0.9.37)
700+
yard-solargraph (0.1.0)
701+
yard (~> 0.9)
699702
zeitwerk (2.7.2)
700703

701704
PLATFORMS

Diff for: app/assets/stylesheets/avo.base.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ dl {
9797
@apply text-sm grid gap-x-2 grid-cols-[max-content_1fr];
9898

9999
dt {
100-
@apply font-bold mt-1;
100+
@apply font-bold;
101101
}
102102

103103
dd {

Diff for: gemfiles/rails_6.1_ruby_3.1.4.gemfile.lock

+14-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PATH
66
PATH
77
remote: ..
88
specs:
9-
avo (3.18.0)
9+
avo (3.18.1)
1010
actionview (>= 6.1)
1111
active_link_to
1212
activerecord (>= 6.1)
@@ -95,7 +95,7 @@ GEM
9595
acts_as_list (1.2.4)
9696
activerecord (>= 6.1)
9797
activesupport (>= 6.1)
98-
actual_db_schema (0.8.2)
98+
actual_db_schema (0.8.3)
9999
activerecord
100100
activesupport
101101
ast
@@ -117,8 +117,8 @@ GEM
117117
money-rails (~> 1.12)
118118
avo-record_link_field (0.0.2)
119119
aws-eventstream (1.3.1)
120-
aws-partitions (1.1056.0)
121-
aws-sdk-core (3.219.0)
120+
aws-partitions (1.1061.0)
121+
aws-sdk-core (3.220.0)
122122
aws-eventstream (~> 1, >= 1.3.0)
123123
aws-partitions (~> 1, >= 1.992.0)
124124
aws-sigv4 (~> 1.9)
@@ -178,7 +178,7 @@ GEM
178178
bigdecimal
179179
rexml
180180
crass (1.0.6)
181-
cssbundling-rails (1.4.2)
181+
cssbundling-rails (1.4.3)
182182
railties (>= 6.0.0)
183183
csv (3.3.2)
184184
cuprite (0.15.1)
@@ -436,7 +436,7 @@ GEM
436436
puma (6.6.0)
437437
nio4r (~> 2.0)
438438
racc (1.8.1)
439-
rack (2.2.11)
439+
rack (2.2.12)
440440
rack-test (2.2.0)
441441
rack (>= 1.3)
442442
rails (6.1.7.10)
@@ -488,7 +488,7 @@ GEM
488488
rdoc (6.3.4.1)
489489
redis (5.4.0)
490490
redis-client (>= 0.22.0)
491-
redis-client (0.23.2)
491+
redis-client (0.24.0)
492492
connection_pool
493493
reek (6.4.0)
494494
dry-schema (~> 1.13.0)
@@ -540,8 +540,8 @@ GEM
540540
rubocop-performance (1.23.1)
541541
rubocop (>= 1.48.1, < 2.0)
542542
rubocop-ast (>= 1.31.1, < 2.0)
543-
rubocop-shopify (2.15.1)
544-
rubocop (~> 1.51)
543+
rubocop-shopify (2.16.0)
544+
rubocop (~> 1.62)
545545
ruby-openai (7.4.0)
546546
event_stream_parser (>= 0.3.0, < 2.0.0)
547547
faraday (>= 1)
@@ -578,7 +578,7 @@ GEM
578578
simplecov-lcov (0.8.0)
579579
simplecov_json_formatter (0.1.4)
580580
smart_properties (1.17.0)
581-
solargraph (0.51.2)
581+
solargraph (0.52.0)
582582
backport (~> 1.2)
583583
benchmark
584584
bundler (~> 2.0)
@@ -596,6 +596,7 @@ GEM
596596
thor (~> 1.0)
597597
tilt (~> 2.0)
598598
yard (~> 0.9, >= 0.9.24)
599+
yard-solargraph (~> 0.1)
599600
solargraph-rails (1.1.0)
600601
activesupport
601602
solargraph
@@ -631,7 +632,7 @@ GEM
631632
tilt (2.6.0)
632633
timeout (0.4.3)
633634
tty-which (0.5.0)
634-
turbo-rails (2.0.11)
635+
turbo-rails (2.0.12)
635636
actionpack (>= 6.0.0)
636637
railties (>= 6.0.0)
637638
turbo_power (0.7.0)
@@ -670,6 +671,8 @@ GEM
670671
xpath (3.2.0)
671672
nokogiri (~> 1.8)
672673
yard (0.9.37)
674+
yard-solargraph (0.1.0)
675+
yard (~> 0.9)
673676
zeitwerk (2.7.2)
674677

675678
PLATFORMS

Diff for: gemfiles/rails_6.1_ruby_3.3.0.gemfile.lock

+12-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PATH
66
PATH
77
remote: ..
88
specs:
9-
avo (3.18.0)
9+
avo (3.18.1)
1010
actionview (>= 6.1)
1111
active_link_to
1212
activerecord (>= 6.1)
@@ -95,7 +95,7 @@ GEM
9595
acts_as_list (1.2.4)
9696
activerecord (>= 6.1)
9797
activesupport (>= 6.1)
98-
actual_db_schema (0.8.2)
98+
actual_db_schema (0.8.3)
9999
activerecord
100100
activesupport
101101
ast
@@ -117,8 +117,8 @@ GEM
117117
money-rails (~> 1.12)
118118
avo-record_link_field (0.0.2)
119119
aws-eventstream (1.3.1)
120-
aws-partitions (1.1056.0)
121-
aws-sdk-core (3.219.0)
120+
aws-partitions (1.1061.0)
121+
aws-sdk-core (3.220.0)
122122
aws-eventstream (~> 1, >= 1.3.0)
123123
aws-partitions (~> 1, >= 1.992.0)
124124
aws-sigv4 (~> 1.9)
@@ -178,7 +178,7 @@ GEM
178178
bigdecimal
179179
rexml
180180
crass (1.0.6)
181-
cssbundling-rails (1.4.2)
181+
cssbundling-rails (1.4.3)
182182
railties (>= 6.0.0)
183183
csv (3.3.2)
184184
cuprite (0.15.1)
@@ -408,7 +408,7 @@ GEM
408408
puma (6.6.0)
409409
nio4r (~> 2.0)
410410
racc (1.8.1)
411-
rack (2.2.11)
411+
rack (2.2.12)
412412
rack-test (2.2.0)
413413
rack (>= 1.3)
414414
rails (6.1.7.10)
@@ -460,7 +460,7 @@ GEM
460460
rdoc (6.3.4.1)
461461
redis (5.4.0)
462462
redis-client (>= 0.22.0)
463-
redis-client (0.23.2)
463+
redis-client (0.24.0)
464464
connection_pool
465465
reek (6.1.4)
466466
kwalify (~> 0.7.0)
@@ -549,7 +549,7 @@ GEM
549549
simplecov-lcov (0.8.0)
550550
simplecov_json_formatter (0.1.4)
551551
smart_properties (1.17.0)
552-
solargraph (0.51.2)
552+
solargraph (0.52.0)
553553
backport (~> 1.2)
554554
benchmark
555555
bundler (~> 2.0)
@@ -567,6 +567,7 @@ GEM
567567
thor (~> 1.0)
568568
tilt (~> 2.0)
569569
yard (~> 0.9, >= 0.9.24)
570+
yard-solargraph (~> 0.1)
570571
solargraph-rails (1.1.0)
571572
activesupport
572573
solargraph
@@ -602,7 +603,7 @@ GEM
602603
tilt (2.6.0)
603604
timeout (0.4.3)
604605
tty-which (0.5.0)
605-
turbo-rails (2.0.11)
606+
turbo-rails (2.0.12)
606607
actionpack (>= 6.0.0)
607608
railties (>= 6.0.0)
608609
turbo_power (0.7.0)
@@ -639,6 +640,8 @@ GEM
639640
xpath (3.2.0)
640641
nokogiri (~> 1.8)
641642
yard (0.9.37)
643+
yard-solargraph (0.1.0)
644+
yard (~> 0.9)
642645
zeitwerk (2.7.2)
643646

644647
PLATFORMS

0 commit comments

Comments
 (0)