diff --git a/app/assets/javascripts/shared/directives/question_mark_tooltip.js.coffee b/app/assets/javascripts/shared/directives/question_mark_tooltip.js.coffee index d6f2c87178..6fa2d46ee5 100644 --- a/app/assets/javascripts/shared/directives/question_mark_tooltip.js.coffee +++ b/app/assets/javascripts/shared/directives/question_mark_tooltip.js.coffee @@ -5,6 +5,7 @@ OFNShared.directive "questionMarkWithTooltip", ($tooltip)-> tooltip = $tooltip 'questionMarkWithTooltip', 'questionMarkWithTooltip', 'click' tooltip.scope = variant: "=" + key: "=" tooltip.templateUrl = "shared/question_mark_with_tooltip_icon.html" tooltip.replace = true tooltip.restrict = 'E' diff --git a/app/assets/javascripts/templates/shared/question_mark_with_tooltip.html.haml b/app/assets/javascripts/templates/shared/question_mark_with_tooltip.html.haml index 75a697fe12..9c68ca47c4 100644 --- a/app/assets/javascripts/templates/shared/question_mark_with_tooltip.html.haml +++ b/app/assets/javascripts/templates/shared/question_mark_with_tooltip.html.haml @@ -1,6 +1,6 @@ .joyride-tip-guide.question-mark-tooltip{class: "{{ context }}", ng: {class: "{ in: tt_isOpen, fade: tt_animation }", show: "tt_isOpen"}} .background{ng: {click: "tt_isOpen = false"}} .joyride-content-wrapper - {{ "js.shopfront.unit_price_tooltip" | t }} + {{ key | t }} %span.joyride-nub.bottom \ No newline at end of file diff --git a/app/assets/javascripts/templates/shop_variant_with_unit_price.html.haml b/app/assets/javascripts/templates/shop_variant_with_unit_price.html.haml index 4a3d2d7211..c9b9785a2c 100644 --- a/app/assets/javascripts/templates/shop_variant_with_unit_price.html.haml +++ b/app/assets/javascripts/templates/shop_variant_with_unit_price.html.haml @@ -12,7 +12,8 @@ %question-mark-with-tooltip{"question-mark-with-tooltip" => "_", "question-mark-with-tooltip-append-to-body" => "true", "question-mark-with-tooltip-placement" => "top", - "question-mark-with-tooltip-animation" => true} + "question-mark-with-tooltip-animation" => true, + key: "'js.shopfront.unit_price_tooltip.shopfront'"} {{ variant.unit_price_price | localizeCurrency }} / {{ variant.unit_price_unit }} .medium-2.large-2.columns.total-price diff --git a/config/locales/en.yml b/config/locales/en.yml index 8aefff8022..91718b176f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2782,7 +2782,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using min_quantity: "Min quantity" max_quantity: "Max quantity" price_breakdown: "Price breakdown" - unit_price_tooltip: "This is the unit price of this product. It allows you to compare the price of products independent of packaging sizes & weights." + unit_price_tooltip: + shopfront: "This is the unit price of this product. It allows you to compare the price of products independent of packaging sizes & weights." variants: on_demand: "yes": "On demand"