using translate filter instead of root scope function

This commit is contained in:
Maikel Linke
2015-10-08 18:09:11 +11:00
parent d2470685cd
commit e9d1cf6eb5
23 changed files with 143 additions and 147 deletions

View File

@@ -1,6 +1,6 @@
# Declares the translation function t.
# You can use t('login') in Javascript.
window.t = (key, options = {}) ->
# You can use translate('login') or t('login') in Javascript.
window.translate = (key, options = {}) ->
unless 'I18n' of window
console.log 'The I18n object is undefined. Cannot translate text.'
return key
@@ -9,8 +9,4 @@ window.t = (key, options = {}) ->
for name, value of options
text = text.split("%{#{name}}").join(value)
text
# Provides the translation function t on all scopes.
# You can write {{t('login')}} in all templates.
window.Darkswarm.run ($rootScope) ->
$rootScope.t = t
window.t = window.translate

View File

@@ -1,5 +1,5 @@
%tab#forgot{"ng-controller" => "ForgotCtrl",
heading: "{{t('forgot_password')}}",
heading: "{{'forgot_password' | t}}",
active: "active(path)",
select: "select(path)"}
@@ -8,7 +8,7 @@
.row
.large-12.columns
.alert-box.success.radius{"ng-show" => "sent"}
{{t('password_reset_sent')}}
{{'password_reset_sent' | t}}
%div{"ng-show" => "!sent"}
.alert-box.alert{"ng-show" => "errors != null"}
@@ -16,7 +16,7 @@
.row
.large-12.columns
%label{for: "email"} {{t('signup_email')}}
%label{for: "email"} {{'signup_email' | t}}
%input.title.input-text{name: "email",
type: "email",
id: "email",
@@ -27,4 +27,4 @@
%input.button.primary{name: "commit",
tabindex: "3",
type: "submit",
value: "{{t('reset_password')}}"}
value: "{{'reset_password' | t}}"}

View File

@@ -1,5 +1,5 @@
%tab#login-content{"ng-controller" => "LoginCtrl",
heading: "{{t('label_login')}}",
heading: "{{'label_login' | t}}",
active: "active(path)",
select: "select(path)"}
%form{"ng-submit" => "submit()"}
@@ -9,7 +9,7 @@
{{ errors }}
.row
.large-12.columns
%label{for: "email"} {{t('email')}}
%label{for: "email"} {{'email' | t}}
%input.title.input-text{name: "email",
type: "email",
id: "email",
@@ -17,7 +17,7 @@
"ng-model" => "spree_user.email"}
.row
.large-12.columns
%label{for: "password"} {{t('password')}}
%label{for: "password"} {{'password' | t}}
%input.title.input-text{name: "password",
type: "password",
id: "password",
@@ -31,10 +31,10 @@
id: "remember_me",
value: "1",
"ng-model" => "spree_user.remember_me"}
%label{for: "remember_me"} {{t('remember_me')}}
%label{for: "remember_me"} {{'remember_me' | t}}
.row
.large-12.columns
%input.button.primary{name: "commit",
tabindex: "3",
type: "submit",
value: "{{t('label_login')}}"}
value: "{{'label_login' | t}}"}

View File

@@ -1,6 +1,6 @@
%div.contact-container{bindonce: true}
%div.modal-centered{"bo-if" => "enterprise.email || enterprise.website || enterprise.phone"}
%p.modal-header {{t('contact')}}
%p.modal-header {{'contact' | t}}
%p{"bo-if" => "enterprise.phone", "bo-text" => "enterprise.phone"}
%p.word-wrap{"ng-if" => "enterprise.email"}

View File

@@ -3,7 +3,7 @@
/ TODO: Rob add logic for taxons and properties too:
/ %div{"ng-if" => "enterprise.long_description.length > 0 || enterprise.logo"}
%div
%p.modal-header {{t('label_about')}}
%p.modal-header {{'label_about' | t}}
/ TODO: Rob - add in taxons and properties and property pop-overs
-# TODO: Add producer taxons and properties here

View File

@@ -1,5 +1,5 @@
%div.modal-centered{bindonce: true, "bo-if" => "enterprise.twitter || enterprise.facebook || enterprise.linkedin || enterprise.instagram"}
%p.modal-header {{t('follow')}}
%p.modal-header {{'follow' | t}}
.follow-icons
%span{"bo-if" => "enterprise.twitter"}
%a{"bo-href-i" => "http://twitter.com/{{enterprise.twitter}}", target: "_blank"}

View File

@@ -2,16 +2,16 @@
.cta-container.small-12.columns
.row
.small-4.columns
%label{"active-table-hub-link" => "enterprise", change: "{{t('change_shop')}}", shop: "{{t('shop_at')}}"}
%label{"active-table-hub-link" => "enterprise", change: "{{'change_shop' | t}}", shop: "{{'shop_at' | t}}"}
.small-8.columns.right
%label.right{"bo-if" => "enterprise.pickup || enterprise.delivery"}
{{t('hubs_delivery_options')}}:
{{'hubs_delivery_options' | t}}:
%span{"bo-if" => "enterprise.pickup"}
%i.ofn-i_038-takeaway
{{t('hubs_pickup')}}
{{'hubs_pickup' | t}}
%span{"bo-if" => "enterprise.delivery"}
%i.ofn-i_039-delivery
{{t('hubs_delivery')}}
{{'hubs_delivery' | t}}
.row
.columns.small-12
%a.cta-hub{"bo-href" => "enterprise.path",

View File

@@ -1,5 +1,5 @@
.progress
.right {{t('fees')}}
.right {{'fees' | t}}
.meter
{{t('item_cost')}}
{{'item_cost' | t}}

View File

@@ -3,7 +3,7 @@
.columns.small-12.large-6.product-header
%h3{"bo-text" => "product.name"}
%span
%em {{t('products_from')}}
%em {{'products_from' | t}}
%span{"bo-text" => "enterprise.name"}
%br

View File

@@ -3,9 +3,9 @@
.row
.small-12.columns
%header
%h2 {{t('enterprise_about_headline')}}
%h2 {{'enterprise_about_headline' | t}}
%h5
{{t('enterprise_about_message')}}
{{'enterprise_about_message' | t}}
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
{{ enterprise.name }}
@@ -14,44 +14,44 @@
.small-12.columns
.alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } }
%h6 {{t('enterprise_success', {enterprise: enterprise.name})}}
%span {{t('enterprise_registration_exit_message')}}
%span {{'enterprise_registration_exit_message' | t}}
%a.close{ ng: { click: "close()" } } ×
.small-12.large-8.columns
.row
.small-12.columns
.field
%label{ for: 'enterprise_description' } {{t('enterprise_description')}}:
%input.chunky{ id: 'enterprise_description', placeholder: "{{t('enterprise_description_placeholder')}}", ng: { model: 'enterprise.description' } }
%label{ for: 'enterprise_description' } {{'enterprise_description' | t}}:
%input.chunky{ id: 'enterprise_description', placeholder: "{{'enterprise_description_placeholder' | t}}", ng: { model: 'enterprise.description' } }
.row
.small-12.columns
.field
%label{ for: 'enterprise_long_desc' } {{t('enterprise_long_desc')}}:
%textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{t('enterprise_long_desc_placeholder')}}", ng: { model: 'enterprise.long_description' } }
%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-12.large-4.columns
.row
.small-12.columns
.field
%label{ for: 'enterprise_abn' } {{t('enterprise_abn')}}:
%input.chunky{ id: 'enterprise_abn', placeholder: "{{t('enterprise_abn_placeholder')}}", ng: { model: 'enterprise.abn' } }
%label{ for: 'enterprise_abn' } {{'enterprise_abn' | t}}:
%input.chunky{ id: 'enterprise_abn', placeholder: "{{'enterprise_abn_placeholder' | t}}", ng: { model: 'enterprise.abn' } }
.row
.small-12.columns
.field
%label{ for: 'enterprise_acn' } {{t('enterprise_acn')}}:
%input.chunky{ id: 'enterprise_acn', placeholder: "{{t('enterprise_acn_placeholder')}}", ng: { model: 'enterprise.acn' } }
%label{ for: 'enterprise_acn' } {{'enterprise_acn' | t}}:
%input.chunky{ id: 'enterprise_acn', placeholder: "{{'enterprise_acn_placeholder' | t}}", ng: { model: 'enterprise.acn' } }
.row
.small-12.columns
.field
%label{ for: 'enterprise_charges_sales_tax' }= t(:charges_sales_tax)
%input{ id: 'enterprise_charges_sales_tax_true', type: 'radio', name: 'charges_sales_tax', value: 'true', required: true, ng: { model: 'enterprise.charges_sales_tax' } }
%label{ for: 'enterprise_charges_sales_tax_true' } {{t('say_yes')}}
%label{ for: 'enterprise_charges_sales_tax_true' } {{'say_yes' | t}}
%input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', name: 'charges_sales_tax', value: 'false', required: true, ng: { model: 'enterprise.charges_sales_tax' } }
%label{ for: 'enterprise_charges_sales_tax_false' } {{t('say_no')}}
%label{ for: 'enterprise_charges_sales_tax_false' } {{'say_no' | t}}
%span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } }
{{t('enterprise_tax_required')}}
{{'enterprise_tax_required' | t}}
.row.buttons.pad-top
.small-12.columns
%input.button.primary.right{ type: "submit", value: "{{t('continue')}}" }
%input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" }

View File

@@ -3,7 +3,7 @@
.row
.small-12.columns
%header
%h2 {{t('registration_greeting')}}
%h2 {{'registration_greeting' | t}}
%h5
{{t('who_is_managing_enterprise', {enterprise: enterprise.name})}}
@@ -12,19 +12,19 @@
.small-12.medium-12.large-7.columns
.row
.small-12.columns.field
%label{ for: 'enterprise_contact' } {{t('enterprise_contact')}}:
%label{ for: 'enterprise_contact' } {{'enterprise_contact' | t}}:
%input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact', required: true, placeholder: "Contact Name", ng: { model: 'enterprise.contact' } }
%span.error.small-12.columns{ ng: { show: "contact.contact.$error.required && submitted" } }
{{t('enterprise_contact_required')}}
{{'enterprise_contact_required' | t}}
.row
.small-12.columns.field
%label{ for: 'enterprise_email' } {{t('enterprise_email')}}:
%label{ for: 'enterprise_email' } {{'enterprise_email' | t}}:
%input.chunky.small-12.columns{ id: 'enterprise_email', name: 'email', type: 'email', required: true, placeholder: "eg. charlie@thefarm.com", ng: { model: 'enterprise.email' } }
%span.error.small-12.columns{ ng: { show: "(contact.email.$error.email || contact.email.$error.required) && submitted" } }
{{t('enterprise_email_required')}}
{{'enterprise_email_required' | t}}
.row
.small-12.columns.field
%label{ for: 'enterprise_phone' } {{t('enterprise_phone')}}:
%label{ for: 'enterprise_phone' } {{'enterprise_phone' | t}}:
%input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "eg. (03) 1234 5678", ng: { model: 'enterprise.phone' } }
.small-12.medium-12.large-5.hide-for-small-only
/ %h6
@@ -43,5 +43,5 @@
.row.buttons
.small-12.columns
%input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('details')" } }
%input.button.primary.right{ type: "submit", value: "{{t('continue')}}" }
%input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "select('details')" } }
%input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" }

View File

@@ -3,62 +3,62 @@
.row
.small-12.columns
%header
%h2 {{t('registration_detail_headline')}}
%h5{ bo: { if: "enterprise.type != 'own'" } } {{t('registration_detail_enterprise')}}
%h5{ bo: { if: "enterprise.type == 'own'" } } {{t('registration_detail_producer')}}
%h2 {{'registration_detail_headline' | t}}
%h5{ bo: { if: "enterprise.type != 'own'" } } {{'registration_detail_enterprise' | t}}
%h5{ bo: { if: "enterprise.type == 'own'" } } {{'registration_detail_producer' | t}}
%form{ name: 'details', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('contact',details)" } }
.row
.small-12.medium-9.large-12.columns.end
.field
%label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } {{t('registration_detail_name_enterprise')}}
%label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } {{t('registration_detail_name_producer')}}
%input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{t('registration_detail_name_placeholder')}}", required: true, ng: { model: 'enterprise.name' } }
%label{ for: 'enterprise_name', bo: { if: "enterprise.type != 'own'" } } {{'registration_detail_name_enterprise' | t}}
%label{ for: 'enterprise_name', bo: { if: "enterprise.type == 'own'" } } {{'registration_detail_name_producer' | t}}
%input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{'registration_detail_name_placeholder' | t}}", required: true, ng: { model: 'enterprise.name' } }
%span.error{ ng: { show: "details.name.$error.required && submitted" } }
{{t('registration_detail_name_error')}}
{{'registration_detail_name_error' | t}}
.row
.small-12.medium-9.large-6.columns
.field
%label{ for: 'enterprise_address' } {{t('registration_detail_address1')}}
%input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{t('registration_detail_address1_placeholder')}}", required: true, ng: { model: 'enterprise.address.address1' } }
%label{ for: 'enterprise_address' } {{'registration_detail_address1' | t}}
%input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{'registration_detail_address1_placeholder' | t}}", required: true, ng: { model: 'enterprise.address.address1' } }
%span.error{ ng: { show: "details.address1.$error.required && submitted" } }
{{t('registration_detail_address1_error')}}
{{'registration_detail_address1_error' | t}}
.field
%label{ for: 'enterprise_address2' } {{t('registration_detail_address2')}}
%label{ for: 'enterprise_address2' } {{'registration_detail_address2' | t}}
%input.chunky{ id: 'enterprise_address2', name: 'address2', required: false, placeholder: "", required: false, ng: { model: 'enterprise.address.address2' } }
.small-12.medium-9.large-6.columns.end
.row
.small-12.medium-8.large-8.columns
.field
%label{ for: 'enterprise_city' } {{t('registration_detail_suburb')}}
%input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{t('registration_detail_suburb_placeholder')}}", ng: { model: 'enterprise.address.city' } }
%label{ for: 'enterprise_city' } {{'registration_detail_suburb' | t}}
%input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{'registration_detail_suburb_placeholder' | t}}", ng: { model: 'enterprise.address.city' } }
%span.error{ ng: { show: "details.city.$error.required && submitted" } }
{{t('registration_detail_suburb_error')}}
{{'registration_detail_suburb_error' | t}}
.small-12.medium-4.large-4.columns
.field
%label{ for: 'enterprise_zipcode' } {{t('registration_detail_postcode')}}
%input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{t('registration_detail_postcode_placeholder')}}", ng: { model: 'enterprise.address.zipcode' } }
%label{ for: 'enterprise_zipcode' } {{'registration_detail_postcode' | t}}
%input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{'registration_detail_postcode_placeholder' | t}}", ng: { model: 'enterprise.address.zipcode' } }
%span.error{ ng: { show: "details.zipcode.$error.required && submitted" } }
{{t('registration_detail_postcode_error')}}
{{'registration_detail_postcode_error' | t}}
.row
.small-12.medium-4.large-4.columns
.field
%label{ for: 'enterprise_state' } {{t('registration_detail_state')}}
%label{ for: 'enterprise_state' } {{'registration_detail_state' | t}}
%select.chunky{ id: 'enterprise_state', name: 'state', ng: { model: 'enterprise.address.state_id', options: 's.id as s.abbr for s in enterprise.country.states', show: 'countryHasStates()', required: 'countryHasStates()' } }
%span.error{ ng: { show: "details.state.$error.required && submitted" } }
{{t('registration_detail_state_error')}}
{{'registration_detail_state_error' | t}}
.small-12.medium-8.large-8.columns
.field
%label{ for: 'enterprise_country' } {{t('registration_detail_country')}}
%label{ for: 'enterprise_country' } {{'registration_detail_country' | t}}
%select.chunky{ id: 'enterprise_country', name: 'country', required: true, ng: { model: 'enterprise.country', options: 'c as c.name for c in countries' } }
%span.error{ ng: { show: "details.country.$error.required && submitted" } }
{{t('registration_detail_country_error')}}
{{'registration_detail_country_error' | t}}
.row.buttons
.small-12.columns
%hr
%input.button.primary.right{ type: "submit", value: "{{t('continue')}}" }
%input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" }

View File

@@ -2,11 +2,11 @@
.row
.small-12.columns.pad-top
%header
%h2 {{t('registration_finished_headline')}}
%h2 {{'registration_finished_headline' | t}}
.panel.callout
%p
{{t('registration_finished_thanks', {enterprise: enterprise.name})}}
%p {{t('registration_finished_login')}}
%p {{'registration_finished_login' | t}}
.row
.small-12.columns.text-center
%h4
@@ -14,4 +14,4 @@
%p{ "ng-bind-html" => "t('registration_finished_activate_instruction_html', {email: enterprise.email})"}
%a.button.primary{ type: "button", href: "/" } {{t('registration_finished_action')}} >
%a.button.primary{ type: "button", href: "/" } {{'registration_finished_action' | t}} >

View File

@@ -3,8 +3,8 @@
.row
.small-12.columns
%header
%h2 {{t('registration_images_headline')}}
%h5 {{t('registration_images_description')}}
%h2 {{'registration_images_headline' | t}}
%h5 {{'registration_images_description' | t}}
%form{ name: 'images', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "select('social')" } }
.row{ ng: { repeat: 'image_step in imageSteps', show: "imageStep == image_step" } }
@@ -18,5 +18,5 @@
.row.buttons.pad-top{ ng: { if: "imageStep == 'promo'" } }
.small-12.columns
%input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "imageSelect('logo')" } }
%input.button.primary.right{ type: "submit", value: "{{t('continue')}}" }
%input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "imageSelect('logo')" } }
%input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" }

View File

@@ -4,42 +4,42 @@
.row
.small-12.columns.center
%h4
{{t('select_logo')}}
{{'select_logo' | t}}
.row
.small-12.columns.center
%span.small
{{t('logo_tip')}}
{{'logo_tip' | t}}
.row.pad-top
.small-12.columns
.image-select.small-12.columns
%label.small-12.columns.button{ for: 'image-select' } {{t('logo_label')}}
%label.small-12.columns.button{ for: 'image-select' } {{'logo_label' | t}}
%input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' }
.row.show-for-large-up
.large-12.columns
%span#or.large-12.columns
{{t('action_or')}}
{{'action_or' | t}}
.row.show-for-large-up
.large-12.columns
#image-over{ 'nv-file-over' => true, uploader: "imageUploader" }
{{t('logo_drag')}}
{{'logo_drag' | t}}
.small-12.medium-12.large-6.columns
.row
.small-12.columns.center
.row
.small-12.columns.center
%h4
{{t('review_logo')}}
{{'review_logo' | t}}
.row
.small-12.columns.center
%span.small
{{t('review_logo_tip')}}
{{'review_logo_tip' | t}}
.row.pad-top
.small-12.columns.center
#image-placeholder.logo
%img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } }
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
{{t('logo_placeholder')}}
{{'logo_placeholder' | t}}
.loading{ ng: { hide: "!imageUploader.isUploading" } }
%img.spinner{ src: "/assets/spinning-circles.svg" }
%br/
{{t('uploading')}}
{{'uploading' | t}}

View File

@@ -2,42 +2,42 @@
.row
.small-12.columns.center
%h4
{{t('select_promo_image')}}
{{'select_promo_image' | t}}
.row
.small-12.medium-12.large-5.columns.center
.row
.small-12.columns.center
%span.small
{{t('promo_image_tip')}}
{{'promo_image_tip' | t}}
.row.pad-top
.small-12.columns
.image-select.small-12.columns
%label.small-12.columns.button{ for: 'image-select' } {{t('promo_image_label')}}
%label.small-12.columns.button{ for: 'image-select' } {{'promo_image_label' | t}}
%input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' }
.large-2.columns
%span#or.horizontal.large-12.columns
{{t('action_or')}}
{{'action_or' | t}}
.large-5.columns
#image-over{ 'nv-file-over' => true, uploader: "imageUploader" }
{{t('promo_image_drag')}}
{{'promo_image_drag' | t}}
.small-12.medium-12.large-12.columns.pad-top
.row
.small-12.columns.center
%h4
{{t('review_promo_image')}}
{{'review_promo_image' | t}}
.row
.small-12.columns.center
.row
.small-12.columns.center
%span.small
{{t('review_promo_image_tip')}}
{{'review_promo_image_tip' | t}}
.row.pad-top
.small-12.columns.center
#image-placeholder.promo
%img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } }
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
{{t('promo_image_placeholder')}}
{{'promo_image_placeholder' | t}}
.loading{ ng: { hide: "!imageUploader.isUploading" } }
%img.spinner{ src: "/assets/spinning-circles.svg" }
%br/
{{t('uploading')}}
{{'uploading' | t}}

View File

@@ -1,41 +1,41 @@
.row
.small-12.columns
%header
%h2 {{t('registration_greeting')}}
%h2 {{'registration_greeting' | t}}
%h4
%small
%i.ofn-i_040-hub
{{t('registration_intro')}}
{{'registration_intro' | t}}
.hide-for-large-up
%hr
%input.button.small.primary{ type: "button", value: "{{t('registration_action')}}", ng: { click: "select('details')" } }
%input.button.small.primary{ type: "button", value: "{{'registration_action' | t}}", ng: { click: "select('details')" } }
%hr
.row{ 'data-equalizer' => true }
.small-12.medium-12.large-6.columns.pad-top{ 'data-equalizer-watch' => true }
%h5 {{t('registration_checklist')}}:
%h5 {{'registration_checklist' | t}}:
%ul.check-list
%li
{{t('registration_time')}}
{{'registration_time' | t}}
%li
{{t('registration_enterprise_address')}}
{{'registration_enterprise_address' | t}}
%li
{{t('registration_contact_details')}}
{{'registration_contact_details' | t}}
%li
{{t('registration_logo')}}
{{'registration_logo' | t}}
%li
{{t('registration_promo_image')}}
{{'registration_promo_image' | t}}
%li
{{t('registration_about_us')}}
{{'registration_about_us' | t}}
.small-9.medium-8.large-5.columns.pad-top.end{ 'data-equalizer-watch' => true}
%h5
{{t('registration_outcome_headline')}}
{{'registration_outcome_headline' | t}}
%p{ "ng-bind-html" => "t('registration_outcome1_html')" }
%p {{t('registration_outcome2')}}
%p {{t('registration_outcome3')}}
%p {{'registration_outcome2' | t}}
%p {{'registration_outcome3' | t}}
.row.show-for-large-up
.small-12.columns
%hr
%input.button.primary.right{ type: "button", value: "{{t('registration_action')}}", ng: { click: "select('details')" } }
%input.button.primary.right{ type: "button", value: "{{'registration_action' | t}}", ng: { click: "select('details')" } }

View File

@@ -1,16 +1,16 @@
.row
.small-12.columns
%header
%h2 {{t('limit_reached_headline')}}
%h4 {{t('limit_reached_message')}}
%h2 {{'limit_reached_headline' | t}}
%h4 {{'limit_reached_message' | t}}
.row
.small-12.medium-3.large-2.columns.text-right.hide-for-small-only
%img{:src => "/assets/potatoes.png"}
.small-12.medium-9.large-10.columns
%p
{{t('limit_reached_text')}}
{{'limit_reached_text' | t}}
%strong Open Food Network.
.row
.small-12.columns
%hr
%input.button.primary{ type: "button", value: "{{t('limit_reached_action')}}", ng: { click: "close()" } }
%input.button.primary{ type: "button", value: "{{'limit_reached_action' | t}}", ng: { click: "close()" } }

View File

@@ -4,7 +4,7 @@
.row
.small-12.columns
%header
%h2 {{t('enterprise_final_step')}}
%h2 {{'enterprise_final_step' | t}}
%h5
{{t('enterprise_social_text', {enterprise: enterprise.name})}}
@@ -14,33 +14,33 @@
.row
.small-12.columns
.field
%label{ for: 'enterprise_website' } {{t('website')}}:
%input.chunky{ id: 'enterprise_website', placeholder: "{{t('website_placeholder')}}", ng: { model: 'enterprise.website' } }
%label{ for: 'enterprise_website' } {{'website' | t}}:
%input.chunky{ id: 'enterprise_website', placeholder: "{{'website_placeholder' | t}}", ng: { model: 'enterprise.website' } }
.row
.small-12.columns
.field
%label{ for: 'enterprise_facebook' } {{t('facebook')}}:
%input.chunky{ id: 'enterprise_facebook', placeholder: "{{t('facebook_placeholder')}}", ng: { model: 'enterprise.facebook' } }
%label{ for: 'enterprise_facebook' } {{'facebook' | t}}:
%input.chunky{ id: 'enterprise_facebook', placeholder: "{{'facebook_placeholder' | t}}", ng: { model: 'enterprise.facebook' } }
.row
.small-12.columns
.field
%label{ for: 'enterprise_linkedin' } {{t('linkedin')}}:
%input.chunky{ id: 'enterprise_linkedin', placeholder: "{{t('linkedin_placeholder')}}", ng: { model: 'enterprise.linkedin' } }
%label{ for: 'enterprise_linkedin' } {{'linkedin' | t}}:
%input.chunky{ id: 'enterprise_linkedin', placeholder: "{{'linkedin_placeholder' | t}}", ng: { model: 'enterprise.linkedin' } }
.small-12.large-5.columns
.row
.small-12.columns
.field
%label{ for: 'enterprise_twitter' } {{t('twitter')}}:
%input.chunky{ id: 'enterprise_twitter', placeholder: "{{t('twitter_placeholder')}}", ng: { model: 'enterprise.twitter' } }
%label{ for: 'enterprise_twitter' } {{'twitter' | t}}:
%input.chunky{ id: 'enterprise_twitter', placeholder: "{{'twitter_placeholder' | t}}", ng: { model: 'enterprise.twitter' } }
.row
.small-12.columns
.field
%label{ for: 'enterprise_instagram' } {{t('instagram')}}:
%input.chunky{ id: 'enterprise_instagram', placeholder: "{{t('instagram_placeholder')}}", ng: { model: 'enterprise.instagram' } }
%label{ for: 'enterprise_instagram' } {{'instagram' | t}}:
%input.chunky{ id: 'enterprise_instagram', placeholder: "{{'instagram_placeholder' | t}}", ng: { model: 'enterprise.instagram' } }
.row.buttons
.small-12.columns
%input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('images')" } }
%input.button.primary.right{ type: "submit", value: "{{t('continue')}}" }
%input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "select('images')" } }
%input.button.primary.right{ type: "submit", value: "{{'continue' | t}}" }

View File

@@ -8,7 +8,7 @@
%h2
{{t('registration_type_headline', {enterprise: enterprise.name})}}
%h4
{{t('registration_type_question')}}
{{'registration_type_question' | t}}
%form{ name: 'type', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "create(type)" } }
.row#enterprise-types{ 'data-equalizer' => true, bo: { if: "enterprise.type != 'own'" } }
@@ -17,32 +17,32 @@
.small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true }
%a.btnpanel#producer-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = true", class: "{selected: enterprise.is_primary_producer}" } }
%i.ofn-i_059-producer
%h4 {{t('registration_type_producer')}}
%h4 {{'registration_type_producer' | t}}
.small-12.medium-6.large-6.columns{ 'data-equalizer-watch' => true }
%a.btnpanel#hub-panel{ href: "#", ng: { click: "enterprise.is_primary_producer = false", class: "{selected: enterprise.is_primary_producer == false}" } }
%i.ofn-i_063-hub
%h4 {{t('registration_type_no_producer')}}
%h4 {{'registration_type_no_producer' | t}}
.row
.small-12.columns
%input.chunky{ id: 'enterprise_is_primary_producer', name: 'is_primary_producer', hidden: true, required: true, ng: { model: 'enterprise.is_primary_producer' } }
%span.error{ ng: { show: "type.is_primary_producer.$error.required && submitted" } }
{{t('registration_type_error')}}
{{'registration_type_error' | t}}
.row
.small-12.columns
.panel.callout
.left
%i.ofn-i_013-help
 
%p {{t('registration_type_producer_help')}}
%p {{'registration_type_producer_help' | t}}
.panel.callout
.left
%i.ofn-i_013-help
 
%p {{t('registration_type_no_producer_help')}}
%p {{'registration_type_no_producer_help' | t}}
.row.buttons
.small-12.columns
%input.button.secondary{ type: "button", value: "{{t('back')}}", ng: { click: "select('contact')" } }
%input.button.primary.right{ type: "submit", value: "{{t('create_profile')}}" }
%input.button.secondary{ type: "button", value: "{{'back' | t}}", ng: { click: "select('contact')" } }
%input.button.primary.right{ type: "submit", value: "{{'create_profile' | t}}" }

View File

@@ -1,7 +1,7 @@
.container
.row.modal-centered
%h2 {{t('welcome_to_ofn')}}
%h5 {{t('signup_or_login')}}:
%h2 {{'welcome_to_ofn' | t}}
%h5 {{'signup_or_login' | t}}:
%div{"ng-controller" => "AuthenticationCtrl"}
%tabset
%ng-include{src: "'signup.html'"}
@@ -9,9 +9,9 @@
%ng-include{src: "'forgot.html'"}
%div{ ng: { show: "active('/signup')"} }
%hr
{{t('have_an_account')}}
{{'have_an_account' | t}}
%a{ href: "", ng: { click: "select('/login')"}}
{{t('action_login')}}
{{'action_login' | t}}
%a.close-reveal-modal{"ng-click" => "$close()"}
%i.ofn-i_009-close

View File

@@ -5,7 +5,7 @@
.bulk-buy.inline{"bo-if" => "variant.product.group_buy"}
%i.ofn-i_056-bulk><
%em><
\ {{t('bulk')}}
\ {{'bulk' | t}}
-# WITHOUT GROUP BUY
.small-5.medium-3.large-3.columns.text-right{"bo-if" => "!variant.product.group_buy"}
@@ -30,7 +30,7 @@
integer: true,
min: 0,
"ng-model" => "variant.line_item.quantity",
placeholder: "{{t('shop_variant_quantity_min')}}",
placeholder: "{{'shop_variant_quantity_min' | t}}",
"ofn-disable-scroll" => true,
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
name: "variants[{{variant.id}}]", id: "variants_{{variant.id}}"}
@@ -40,7 +40,7 @@
integer: true,
min: 0,
"ng-model" => "variant.line_item.max_quantity",
placeholder: "{{t('shop_variant_quantity_max')}}",
placeholder: "{{'shop_variant_quantity_max' | t}}",
"ofn-disable-scroll" => true,
max: "{{variant.on_demand && 9999 || variant.count_on_hand }}",
name: "variant_attributes[{{variant.id}}][max_quantity]"}

View File

@@ -1,11 +1,11 @@
%tab#sign-up-content{"ng-controller" => "SignupCtrl",
heading: "{{t('label_signup')}}",
heading: "{{'label_signup' | t}}",
active: "active(path)",
select: "select(path)"}
%form{"ng-submit" => "submit()"}
.row
.large-12.columns
%label{for: "email"} {{t('signup_email')}}
%label{for: "email"} {{'signup_email' | t}}
%input.title.input-text{name: "email",
type: "email",
id: "email",
@@ -15,7 +15,7 @@
{{ errors.email.join(' ') }}
.row
.large-12.columns
%label{for: "password"} {{t('choose_password')}}
%label{for: "password"} {{'choose_password' | t}}
%input.title.input-text{name: "password",
type: "password",
id: "password",
@@ -26,7 +26,7 @@
{{ errors.password.join(' ') }}
.row
.large-12.columns
%label{for: "password_confirmation"} {{t('confirm_password')}}
%label{for: "password_confirmation"} {{'confirm_password' | t}}
%input.title.input-text{name: "password_confirmation",
type: "password",
id: "password_confirmation",
@@ -38,4 +38,4 @@
%input.button.primary{name: "commit",
tabindex: "3",
type: "submit",
value: "{{t('action_signup')}}"}
value: "{{'action_signup' | t}}"}