using translate filter instead of root scope function with parameters

This commit is contained in:
Maikel Linke
2015-10-09 10:21:26 +11:00
parent e9d1cf6eb5
commit 5f80043857
6 changed files with 11 additions and 16 deletions

View File

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

View File

@@ -13,7 +13,7 @@
.row
.small-12.columns
.alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } }
%h6 {{t('enterprise_success', {enterprise: enterprise.name})}}
%h6{ "ng-bind" => "'enterprise_success' | t:{enterprise: enterprise.name}" }
%span {{'enterprise_registration_exit_message' | t}}
%a.close{ ng: { click: "close()" } } ×
@@ -28,7 +28,7 @@
.field
%label{ for: 'enterprise_long_desc' } {{'enterprise_long_desc' | t}}:
%textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{'enterprise_long_desc_placeholder' | t}}", ng: { model: 'enterprise.long_description' } }
%small {{t('enterprise_long_desc_length', {num: enterprise.long_description.length})}}
%small{ "ng-bind" => "'enterprise_long_desc_length' | t:{num: enterprise.long_description.length}" }
.small-12.large-4.columns
.row
.small-12.columns

View File

@@ -4,8 +4,7 @@
.small-12.columns
%header
%h2 {{'registration_greeting' | t}}
%h5
{{t('who_is_managing_enterprise', {enterprise: enterprise.name})}}
%h5{ "ng-bind" => "'who_is_managing_enterprise' | t:{enterprise: enterprise.name}" }
%form{ name: 'contact', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('type',contact)" } }
.row.content

View File

@@ -4,13 +4,11 @@
%header
%h2 {{'registration_finished_headline' | t}}
.panel.callout
%p
{{t('registration_finished_thanks', {enterprise: enterprise.name})}}
%p{ "ng-bind" => "'registration_finished_thanks' | t:{enterprise: enterprise.name}" }
%p {{'registration_finished_login' | t}}
.row
.small-12.columns.text-center
%h4
{{t('registration_finished_activate', {enterprise: enterprise.name})}}
%h4{ "ng-bind" => "'registration_finished_activate' | t:{enterprise: enterprise.name}" }
%p{ "ng-bind-html" => "t('registration_finished_activate_instruction_html', {email: enterprise.email})"}

View File

@@ -5,8 +5,7 @@
.small-12.columns
%header
%h2 {{'enterprise_final_step' | t}}
%h5
{{t('enterprise_social_text', {enterprise: enterprise.name})}}
%h5{ "ng-bind" => "'enterprise_social_text' | t:{enterprise: enterprise.name}" }
%form{ name: 'social', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('finished',social)" } }
.row.content

View File

@@ -5,8 +5,7 @@
.row
.small-12.columns
%header
%h2
{{t('registration_type_headline', {enterprise: enterprise.name})}}
%h2{ "ng-bind" => "'registration_type_headline' | t:{enterprise: enterprise.name}" }
%h4
{{'registration_type_question' | t}}