mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Don't transform translated values
Eg if :oidc_settings has no translation key: options[:label].humanize => "Oidc settings" If it was translated as "OIDC Settings" then it is unchanged.
This commit is contained in:
@@ -24,17 +24,17 @@ module Spree
|
||||
options[:route] ||= "admin_#{args.first}"
|
||||
|
||||
destination_url = options[:url] || spree.public_send("#{options[:route]}_path")
|
||||
titleized_label = Spree.t(options[:label],
|
||||
default: options[:label],
|
||||
scope: [:admin, :tab]).capitalize
|
||||
label = Spree.t(options[:label],
|
||||
default: options[:label].humanize,
|
||||
scope: [:admin, :tab])
|
||||
|
||||
css_classes = []
|
||||
|
||||
if options[:icon] && !feature?(:admin_style_v3, spree_current_user)
|
||||
link = link_to_with_icon(options[:icon], titleized_label, destination_url)
|
||||
link = link_to_with_icon(options[:icon], label, destination_url)
|
||||
css_classes << 'tab-with-icon'
|
||||
else
|
||||
link = link_to(titleized_label, destination_url)
|
||||
link = link_to(label, destination_url)
|
||||
end
|
||||
|
||||
selected = if options[:match_path]
|
||||
|
||||
Reference in New Issue
Block a user