Skip to content

Conversation

@chaimann
Copy link
Contributor

@chaimann chaimann commented May 29, 2025

Closes #6242

Summary

Moved tabs from user edit pages into its own component. This allows to remove repetitive tabs definitions and translations.
Also removed a redundant translation that has been moved to a different component.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

chaimann added 3 commits May 30, 2025 11:20
This will be used in all user edit pages, so that each page does not
have to repeatedly define the tabs and translations.
Updates user edit pages to use shared tabs component, removing #tabs
methods from each and tab related translations. Order history and Store
credits still use :order_history and :store_credit respectively in their
templates.
This has been moved to `stats` component.
@chaimann chaimann force-pushed the admin-users-edit-tabs branch from 22f6a90 to fda42f7 Compare May 30, 2025 09:20
@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.82%. Comparing base (f0a7456) to head (fda42f7).
Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6252      +/-   ##
==========================================
- Coverage   88.82%   88.82%   -0.01%     
==========================================
  Files         850      851       +1     
  Lines       18334    18332       -2     
==========================================
- Hits        16286    16284       -2     
  Misses       2048     2048              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chaimann
Copy link
Contributor Author

@tvdeyen this should fix the issue with duplicating translation keys, but i'm not sure the way they posted it in the discussion works?

so I need to have a structure like that at the yml file

en:
solidus_admin:
users:
edit:
account: ...

the lookup for the keys would be solidus_admin.users.edit.tabs.component.account etc, and the one they posted seems to be based on current controller/action.

I've tried switching locale to :fr and adding a french locale file in sandbox app, it works fine with this scope solidus_admin.users.edit.tabs.component.

I have a question though, if one would want to override the en translations defined in solidus_admin, how do they do it? I've always thought it would be just defining your own translations under the same scope in your host app, but clearly it's not how it works?

@chaimann chaimann marked this pull request as ready for review May 30, 2025 10:50
@chaimann chaimann requested a review from a team as a code owner May 30, 2025 10:50
@tvdeyen
Copy link
Member

tvdeyen commented Jun 2, 2025

Thanks

I have a question though, if one would want to override the en translations defined in solidus_admin, how do they do it? I've always thought it would be just defining your own translations under the same scope in your host app, but clearly it's not how it works?

I would have imagined the same. @kennyadsl can you help out?

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes much sense.

@tvdeyen tvdeyen merged commit 4ba70c9 into solidusio:main Jun 4, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

New admin components i18n scope too granular

2 participants