new translate filter and updated specs for js translations

This commit is contained in:
Maikel Linke
2015-10-07 15:47:51 +11:00
parent 91fae79be4
commit 8b40d094ee
5 changed files with 21 additions and 13 deletions

View File

@@ -0,0 +1,7 @@
Darkswarm.filter "translate", ->
(key) ->
t(key)
Darkswarm.filter "t", ->
(key) ->
t(key)

View File

@@ -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: =>

View File

@@ -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