From 543368169f5aa09b6646aa5440b44f2ce6c96629 Mon Sep 17 00:00:00 2001 From: Paul Mackay Date: Fri, 31 Oct 2014 06:59:43 +0000 Subject: [PATCH] #254: Localisation of home page and welcome email. --- app/views/home/_beta.en-GB.html.haml | 13 ++++++++++++ app/views/shared/_footer.html.haml | 6 +++--- .../components/_enterprise_search.html.haml | 2 +- .../signup_confirmation.en-GB.text.erb | 14 +++++++++++++ config/locales/en-GB.yml | 21 +++++++++++++++++++ config/locales/en.yml | 1 + 6 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 app/views/home/_beta.en-GB.html.haml create mode 100644 app/views/spree/user_mailer/signup_confirmation.en-GB.text.erb create mode 100644 config/locales/en-GB.yml diff --git a/app/views/home/_beta.en-GB.html.haml b/app/views/home/_beta.en-GB.html.haml new file mode 100644 index 0000000000..2badc7c826 --- /dev/null +++ b/app/views/home/_beta.en-GB.html.haml @@ -0,0 +1,13 @@ +#beta.pane + + .row + .small-12.columns.text-center + %h2 S'cuse us + %h5 while we get (more) awesome + %p Open Food Network UK is a new service that’s being piloted right now! + %p Want to help? Or find out when OFN is coming to you? + %strong We’d love to hear from you: + %p + %a{href: "hello@openfoodnetwork.org".reverse, target: '_blank', mailto: true} Food buyers + | + %a{href: "hello@openfoodnetwork.org".reverse, target: '_blank', mailto: true} Food producers & farmers diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index f8fa116f5a..c5f44988d6 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -44,9 +44,9 @@ %p %small %a{href:"/Terms-of-service.pdf", target: "_blank" } Site terms & conditions - | - %a{href:"https://github.com/openfoodfoundation/openfoodnetwork", target: "_blank" } Open Source & developer info on Github - + | + %a{href:"https://github.com/openfoodfoundation/openfoodnetwork", target: "_blank" } Open Source & developer info on GitHub + // To be added when Guy's pretty landing page is up: //| //%a{href:'' } Developers diff --git a/app/views/shared/components/_enterprise_search.html.haml b/app/views/shared/components/_enterprise_search.html.haml index 0ccb23220c..62dcec3ea6 100644 --- a/app/views/shared/components/_enterprise_search.html.haml +++ b/app/views/shared/components/_enterprise_search.html.haml @@ -2,6 +2,6 @@ .small-12.columns %input{type: :text, "ng-model" => "query", - placeholder: "Search by name or suburb...", + placeholder: t('search_by_name'), "ng-debounce" => "150", "ofn-disable-enter" => true} diff --git a/app/views/spree/user_mailer/signup_confirmation.en-GB.text.erb b/app/views/spree/user_mailer/signup_confirmation.en-GB.text.erb new file mode 100644 index 0000000000..2af9144ddf --- /dev/null +++ b/app/views/spree/user_mailer/signup_confirmation.en-GB.text.erb @@ -0,0 +1,14 @@ +Hello, + +Welcome to Open Food Network UK! Your login email is <%= @user.email %> + +You can go online and start shopping through food hubs and local producers you like at http://openfoodnetwork.org.uk + +We welcome all your questions and feedback; you can use the Send Feedback button on the site or email us at hello@openfoodnetwork.org. + +Thanks for getting on board and we look forward to introducing you to many more great farmers, food hubs and food! + +Cheers, + +The Open Food Network UK team + diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml new file mode 100644 index 0000000000..71186a0a52 --- /dev/null +++ b/config/locales/en-GB.yml @@ -0,0 +1,21 @@ +# Localization file for British English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en-GB: + activerecord: + errors: + models: + spree/user: + attributes: + password: + confirmation: you have successfully registered + too_short: pick a longer name + devise: + failure: + invalid: | + Invalid email or password. + Were you a guest last time? Perhaps you need to create an account or reset your password. + home: "OFN" + + welcome_to: 'Welcome to ' + search_by_name: Search by name... diff --git a/config/locales/en.yml b/config/locales/en.yml index 445f629e22..378e411406 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -8,3 +8,4 @@ en: Invalid email or password. Were you a guest last time? Perhaps you need to create an account or reset your password. home: "OFN" + search_by_name: Search by name or suburb...