From d7e706e6e7db6ba6b531aaac884be3abb6647eb7 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Mon, 29 Apr 2019 13:39:52 +0100 Subject: [PATCH] Make text area translations run immeditaly on setup with the t function instead of sending the translation expression down to the textAngular code --- .../admin/enterprises/enterprises.js.coffee | 30 +++++++++---------- config/locales/en.yml | 22 +++++++------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/assets/javascripts/admin/enterprises/enterprises.js.coffee b/app/assets/javascripts/admin/enterprises/enterprises.js.coffee index b33220089a..bd721c14e4 100644 --- a/app/assets/javascripts/admin/enterprises/enterprises.js.coffee +++ b/app/assets/javascripts/admin/enterprises/enterprises.js.coffee @@ -1,15 +1,15 @@ -angular.module("admin.enterprises", [ - "admin.paymentMethods", - "admin.utils", - "admin.shippingMethods", - "admin.users", - "textAngular", - "admin.side_menu", - "admin.taxons", - 'admin.indexUtils', - 'admin.tagRules', - 'admin.dropdown', - 'ngSanitize'] +angular.module("admin.enterprises", [ + "admin.paymentMethods", + "admin.utils", + "admin.shippingMethods", + "admin.users", + "textAngular", + "admin.side_menu", + "admin.taxons", + 'admin.indexUtils', + 'admin.tagRules', + 'admin.dropdown', + 'ngSanitize'] ) # For more options: https://github.com/textAngular/textAngular/blob/master/src/textAngularSetup.js .config [ @@ -18,9 +18,9 @@ angular.module("admin.enterprises", [ '$delegate' (taTranslations) -> taTranslations.insertLink = { - tooltip: "{{'admin.enterprises.form.shop_preferences.shopfront_message_link_tooltip' | t}}", - dialogPrompt: "{{'admin.enterprises.form.shop_preferences.shopfront_message_link_prompt' | t}}" + tooltip: t('admin.enterprises.form.shop_preferences.shopfront_message_link_tooltip'), + dialogPrompt: t('admin.enterprises.form.shop_preferences.shopfront_message_link_prompt') } taTranslations ] -] +] diff --git a/config/locales/en.yml b/config/locales/en.yml index c6c4f287b0..d5b3f566aa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -789,25 +789,25 @@ en: enable_subscriptions_tip: "Enable subscriptions functionality?" enable_subscriptions_false: "Disabled" enable_subscriptions_true: "Enabled" - shopfront_message: Shopfront Message + shopfront_message: "Shopfront Message" shopfront_message_placeholder: > An optional explanation for customers detailing how your shopfront works, to be displayed above the product list on your shop page. - shopfront_message_link_tooltip: Insert / edit link - shopfront_message_link_prompt: Please enter a URL to insert - shopfront_closed_message: Shopfront Closed Message + shopfront_message_link_tooltip: "Insert / edit link" + shopfront_message_link_prompt: "Please enter a URL to insert" + shopfront_closed_message: "Shopfront Closed Message" shopfront_closed_message_placeholder: > A message which provides a more detailed explanation about why your shop is closed and/or when customers can expect it to open again. This is displayed on your shop only when you have no active order cycles (ie. shop is closed). - shopfront_category_ordering: Shopfront Category Ordering - open_date: Open Date - close_date: Close Date + shopfront_category_ordering: "Shopfront Category Ordering" + open_date: "Open Date" + close_date: "Close Date" social: - twitter_placeholder: eg. @the_prof - instagram_placeholder: eg. the_prof - facebook_placeholder: eg. www.facebook.com/PageNameHere - linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere + twitter_placeholder: "eg. @the_prof" + instagram_placeholder: "eg. the_prof" + facebook_placeholder: "eg. www.facebook.com/PageNameHere" + linkedin_placeholder: "eg. www.linkedin.com/in/YourNameHere" stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started."