Skip to content

Commit

Permalink
Merge pull request #5927 from mamhoff/fix-component-translation-scope
Browse files Browse the repository at this point in the history
Fix component translation scopes
  • Loading branch information
tvdeyen authored Nov 15, 2024
2 parents e6e0243 + 46e8250 commit 900cb78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
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

0 comments on commit 900cb78

Please sign in to comment.