Skip to content

Commit

Permalink
Merge branch 'main' into feature/ability_to_see_search_result_in_inde…
Browse files Browse the repository at this point in the history
…x_page
  • Loading branch information
SahSantoshh authored Mar 7, 2025
2 parents 99d3217 + 1d8410d commit 26d949a
Show file tree
Hide file tree
Showing 29 changed files with 176 additions and 118 deletions.
29 changes: 29 additions & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,32 @@ To keep track of the schema structure for the models, run `annotate --models --e
## Using VSCode?

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.

## Adding I18n Keys

When incorporating I18n keys, such as `avo.preview`, it's important to ensure that all locale files include the key with appropriate translations.

### Step 1: Add and Normalize
First, add the key to the `avo.en.yml` file. Then, run the following command to normalize the locale files alphabetically:
```bash
i18n-tasks normalize
```

### Step 2: Adding Missing Keys with or without Translation

When adding missing keys, you have two options: proceed without translation or automatically translate them using OpenAI.

#### Option 1: Add Missing Keys Without Translation
Run the following command to add the missing keys to all locale files:
```bash
i18n-tasks add-missing
```
This will populate the missing keys but retain the original label without translations applied.

#### Option 2: Add and Automatically Translate Missing Keys
If you prefer to automatically translate the missing keys, skip the previous step and execute this command with your OpenAI API token:
```bash
OPENAI_API_KEY=TOKEN bundle exec i18n-tasks translate-missing --backend=openai
```

Replace `TOKEN` with your actual OpenAI API key. This step will both add the missing keys and translate them automatically.
29 changes: 16 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
avo (3.18.0)
avo (3.18.1)
actionview (>= 6.1)
active_link_to
activerecord (>= 6.1)
Expand Down Expand Up @@ -108,7 +108,7 @@ GEM
acts_as_list (1.2.4)
activerecord (>= 6.1)
activesupport (>= 6.1)
actual_db_schema (0.8.2)
actual_db_schema (0.8.3)
activerecord
activesupport
ast
Expand All @@ -130,8 +130,8 @@ GEM
money-rails (~> 1.12)
avo-record_link_field (0.0.2)
aws-eventstream (1.3.1)
aws-partitions (1.1056.0)
aws-sdk-core (3.219.0)
aws-partitions (1.1061.0)
aws-sdk-core (3.220.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
Expand Down Expand Up @@ -191,7 +191,7 @@ GEM
bigdecimal
rexml
crass (1.0.6)
cssbundling-rails (1.4.2)
cssbundling-rails (1.4.3)
railties (>= 6.0.0)
csv (3.3.2)
cuprite (0.15.1)
Expand Down Expand Up @@ -452,7 +452,7 @@ GEM
puma (6.6.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.10)
rack (3.1.11)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
Expand Down Expand Up @@ -511,7 +511,7 @@ GEM
psych (>= 4.0.0)
redis (5.4.0)
redis-client (>= 0.22.0)
redis-client (0.23.2)
redis-client (0.24.0)
connection_pool
reek (6.4.0)
dry-schema (~> 1.13.0)
Expand Down Expand Up @@ -563,8 +563,8 @@ GEM
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-shopify (2.15.1)
rubocop (~> 1.51)
rubocop-shopify (2.16.0)
rubocop (~> 1.62)
ruby-openai (7.4.0)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
Expand Down Expand Up @@ -602,7 +602,7 @@ GEM
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
smart_properties (1.17.0)
solargraph (0.51.2)
solargraph (0.52.0)
backport (~> 1.2)
benchmark
bundler (~> 2.0)
Expand All @@ -620,6 +620,7 @@ GEM
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
yard-solargraph (~> 0.1)
solargraph-rails (1.1.0)
activesupport
solargraph
Expand Down Expand Up @@ -656,9 +657,9 @@ GEM
tilt (2.6.0)
timeout (0.4.3)
tty-which (0.5.0)
turbo-rails (2.0.11)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
turbo-rails (2.0.13)
actionpack (>= 7.1.0)
railties (>= 7.1.0)
turbo_power (0.7.0)
turbo-rails (>= 1.3.0)
tzinfo (2.0.6)
Expand Down Expand Up @@ -696,6 +697,8 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.37)
yard-solargraph (0.1.0)
yard (~> 0.9)
zeitwerk (2.7.2)

PLATFORMS
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/avo.base.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ dl {
@apply text-sm grid gap-x-2 grid-cols-[max-content_1fr];

dt {
@apply font-bold mt-1;
@apply font-bold;
}

dd {
Expand Down
25 changes: 14 additions & 11 deletions gemfiles/rails_6.1_ruby_3.1.4.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PATH
PATH
remote: ..
specs:
avo (3.18.0)
avo (3.18.1)
actionview (>= 6.1)
active_link_to
activerecord (>= 6.1)
Expand Down Expand Up @@ -95,7 +95,7 @@ GEM
acts_as_list (1.2.4)
activerecord (>= 6.1)
activesupport (>= 6.1)
actual_db_schema (0.8.2)
actual_db_schema (0.8.3)
activerecord
activesupport
ast
Expand All @@ -117,8 +117,8 @@ GEM
money-rails (~> 1.12)
avo-record_link_field (0.0.2)
aws-eventstream (1.3.1)
aws-partitions (1.1056.0)
aws-sdk-core (3.219.0)
aws-partitions (1.1061.0)
aws-sdk-core (3.220.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
Expand Down Expand Up @@ -178,7 +178,7 @@ GEM
bigdecimal
rexml
crass (1.0.6)
cssbundling-rails (1.4.2)
cssbundling-rails (1.4.3)
railties (>= 6.0.0)
csv (3.3.2)
cuprite (0.15.1)
Expand Down Expand Up @@ -436,7 +436,7 @@ GEM
puma (6.6.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.11)
rack (2.2.12)
rack-test (2.2.0)
rack (>= 1.3)
rails (6.1.7.10)
Expand Down Expand Up @@ -488,7 +488,7 @@ GEM
rdoc (6.3.4.1)
redis (5.4.0)
redis-client (>= 0.22.0)
redis-client (0.23.2)
redis-client (0.24.0)
connection_pool
reek (6.4.0)
dry-schema (~> 1.13.0)
Expand Down Expand Up @@ -540,8 +540,8 @@ GEM
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-shopify (2.15.1)
rubocop (~> 1.51)
rubocop-shopify (2.16.0)
rubocop (~> 1.62)
ruby-openai (7.4.0)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
Expand Down Expand Up @@ -578,7 +578,7 @@ GEM
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
smart_properties (1.17.0)
solargraph (0.51.2)
solargraph (0.52.0)
backport (~> 1.2)
benchmark
bundler (~> 2.0)
Expand All @@ -596,6 +596,7 @@ GEM
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
yard-solargraph (~> 0.1)
solargraph-rails (1.1.0)
activesupport
solargraph
Expand Down Expand Up @@ -631,7 +632,7 @@ GEM
tilt (2.6.0)
timeout (0.4.3)
tty-which (0.5.0)
turbo-rails (2.0.11)
turbo-rails (2.0.12)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
turbo_power (0.7.0)
Expand Down Expand Up @@ -670,6 +671,8 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.37)
yard-solargraph (0.1.0)
yard (~> 0.9)
zeitwerk (2.7.2)

PLATFORMS
Expand Down
21 changes: 12 additions & 9 deletions gemfiles/rails_6.1_ruby_3.3.0.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PATH
PATH
remote: ..
specs:
avo (3.18.0)
avo (3.18.1)
actionview (>= 6.1)
active_link_to
activerecord (>= 6.1)
Expand Down Expand Up @@ -95,7 +95,7 @@ GEM
acts_as_list (1.2.4)
activerecord (>= 6.1)
activesupport (>= 6.1)
actual_db_schema (0.8.2)
actual_db_schema (0.8.3)
activerecord
activesupport
ast
Expand All @@ -117,8 +117,8 @@ GEM
money-rails (~> 1.12)
avo-record_link_field (0.0.2)
aws-eventstream (1.3.1)
aws-partitions (1.1056.0)
aws-sdk-core (3.219.0)
aws-partitions (1.1061.0)
aws-sdk-core (3.220.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
Expand Down Expand Up @@ -178,7 +178,7 @@ GEM
bigdecimal
rexml
crass (1.0.6)
cssbundling-rails (1.4.2)
cssbundling-rails (1.4.3)
railties (>= 6.0.0)
csv (3.3.2)
cuprite (0.15.1)
Expand Down Expand Up @@ -408,7 +408,7 @@ GEM
puma (6.6.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.11)
rack (2.2.12)
rack-test (2.2.0)
rack (>= 1.3)
rails (6.1.7.10)
Expand Down Expand Up @@ -460,7 +460,7 @@ GEM
rdoc (6.3.4.1)
redis (5.4.0)
redis-client (>= 0.22.0)
redis-client (0.23.2)
redis-client (0.24.0)
connection_pool
reek (6.1.4)
kwalify (~> 0.7.0)
Expand Down Expand Up @@ -549,7 +549,7 @@ GEM
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
smart_properties (1.17.0)
solargraph (0.51.2)
solargraph (0.52.0)
backport (~> 1.2)
benchmark
bundler (~> 2.0)
Expand All @@ -567,6 +567,7 @@ GEM
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
yard-solargraph (~> 0.1)
solargraph-rails (1.1.0)
activesupport
solargraph
Expand Down Expand Up @@ -602,7 +603,7 @@ GEM
tilt (2.6.0)
timeout (0.4.3)
tty-which (0.5.0)
turbo-rails (2.0.11)
turbo-rails (2.0.12)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
turbo_power (0.7.0)
Expand Down Expand Up @@ -639,6 +640,8 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.37)
yard-solargraph (0.1.0)
yard (~> 0.9)
zeitwerk (2.7.2)

PLATFORMS
Expand Down
Loading

0 comments on commit 26d949a

Please sign in to comment.