Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4.4] Fix component translation scopes #5930

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions admin/app/components/solidus_admin/base_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def missing_translation(key, options)
end
end

def self.i18n_scope
@i18n_scope ||= name.underscore.tr("/", ".")
end

def self.stimulus_id
@stimulus_id ||= name.underscore
.sub(/^solidus_admin\/(.*)\/component$/, '\1')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
en:
columns:
items:
one: 1 Item
other: '%{count} Items'
filters:
status: Status
shipment_state: Shipment State
payment_state: Payment State
promotions: Promotions
date:
formats:
short: '%d %b %y'
scopes:
all_orders: All
canceled: Canceled
complete: Complete
returned: Returned
in_progress: In Progress
promotions: Promotions
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
en:
filters:
promotions: Promotions
scopes:
promotions: Promotions