mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
new translate filter and updated specs for js translations
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
Darkswarm.filter "translate", ->
|
||||
(key) ->
|
||||
t(key)
|
||||
|
||||
Darkswarm.filter "t", ->
|
||||
(key) ->
|
||||
t(key)
|
||||
@@ -47,7 +47,7 @@ Darkswarm.factory "EnterpriseRegistrationService", ($http, RegistrationService,
|
||||
RegistrationService.select(step)
|
||||
).error((data) ->
|
||||
Loading.clear()
|
||||
alert(t('failed_to_create_enterprise_unknown'))
|
||||
alert(t('failed_to_update_enterprise_unknown'))
|
||||
)
|
||||
|
||||
prepare: =>
|
||||
|
||||
@@ -4,35 +4,35 @@
|
||||
.collapsed{"ng-show" => "!expanded"}
|
||||
%price-percentage{percentage: 'variant.basePricePercentage'}
|
||||
%a{"ng-click" => "expanded = !expanded"}
|
||||
{{t('price_breakdown')}}
|
||||
%span{"bo-text" => "'price_breakdown' | t"}
|
||||
%i.ofn-i_005-caret-down
|
||||
|
||||
.expanded{"ng-show" => "expanded"}
|
||||
%ul
|
||||
%li.cost
|
||||
.right {{ variant.price | localizeCurrency }}
|
||||
{{t('item_cost')}}
|
||||
%span{"bo-text" => "'item_cost' | t"}
|
||||
%li.admin-fee{"bo-if" => "variant.fees.admin"}
|
||||
.right {{ variant.fees.admin | localizeCurrency }}
|
||||
{{t('admin_fee')}}
|
||||
%span{"bo-text" => "'admin_fee' | t"}
|
||||
%li.sales-fee{"bo-if" => "variant.fees.sales"}
|
||||
.right {{ variant.fees.sales | localizeCurrency }}
|
||||
{{t('sales_fee')}}
|
||||
%span{"bo-text" => "'sales_fee' | t"}
|
||||
%li.packing-fee{"bo-if" => "variant.fees.packing"}
|
||||
.right {{ variant.fees.packing | localizeCurrency }}
|
||||
{{t('packing_fee')}}
|
||||
%span{"bo-text" => "'packing_fee' | t"}
|
||||
%li.transport-fee{"bo-if" => "variant.fees.transport"}
|
||||
.right {{ variant.fees.transport | localizeCurrency }}
|
||||
{{t('transport_fee')}}
|
||||
%span{"bo-text" => "'transport_fee' | t"}
|
||||
%li.fundraising-fee{"bo-if" => "variant.fees.fundraising"}
|
||||
.right {{ variant.fees.fundraising | localizeCurrency }}
|
||||
{{t('fundraising_fee')}}
|
||||
%span{"bo-text" => "'fundraising_fee' | t"}
|
||||
%li.total
|
||||
%strong
|
||||
.right = {{ variant.price_with_fees | localizeCurrency }}
|
||||
|
||||
|
||||
%a{"ng-click" => "expanded = !expanded"}
|
||||
{{t('price_graph')}}
|
||||
%span{"bo-text" => "'price_graph' | t"}
|
||||
%i.ofn-i_006-caret-up
|
||||
|
||||
|
||||
Reference in New Issue
Block a user