mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Extract translations from serializers and overrides
This commit is contained in:
committed by
Maikel Linke
parent
55b2c19b64
commit
1920ee7e88
@@ -1,6 +1,6 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
|
||||
:name => "add_enterprise_fees_to_admin_configurations_menu",
|
||||
:insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
|
||||
:text => "<li><%= link_to 'Enterprise Fees', main_app.admin_enterprise_fees_path %></li>",
|
||||
:text => "<li><%= link_to I18n.t(:enterprise_fees), main_app.admin_enterprise_fees_path %></li>",
|
||||
:partial => 'enterprise_fees/admin_configurations_menu',
|
||||
:original => '8445a03cc903cacc832f395757ffcfaa7e99ca92')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/checkout/_payment",
|
||||
:replace => "code[erb-loud]:contains('submit_tag t(:save_and_continue)')",
|
||||
:text => "<%= submit_tag 'Process My Order', :class => 'continue button primary' %>",
|
||||
:text => "<%= submit_tag I18n.t(:process_my_order), :class => 'continue button primary' %>",
|
||||
:name => "replace_checkout_payment_button",
|
||||
:original => 'ce2043a01931b3bc16b045302ebb0e0bb9150b67')
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
|
||||
.variant_unit_name{'ng-show' => 'product.variant_unit == "items"'}
|
||||
= f.field_container :variant_unit_name do
|
||||
= f.label :variant_unit_name, 'Variant unit name'
|
||||
= f.label :variant_unit_name, t(:spree_admin_variant_unit_name)
|
||||
= f.text_field :variant_unit_name, {placeholder: t('admin.products.unit_name_placeholder')}
|
||||
= f.error_message_on :variant_unit_name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/ insert_after "[data-hook='category_row'] td:first-child"
|
||||
|
||||
%td.align-center
|
||||
= shipping_category.temperature_controlled ? 'Yes' : 'No'
|
||||
= shipping_category.temperature_controlled ? t(:yes) : t(:no)
|
||||
%br/
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
.alpha.three.columns
|
||||
= f.label :name, t(:name)
|
||||
.omega.eight.columns
|
||||
= f.text_field :name, :class => 'fullwidth', placeholder: "eg. 'Pick-up from Primary School'"
|
||||
= f.text_field :name, :class => 'fullwidth', placeholder: t(:spree_admin_eg_pickup_from_school)
|
||||
= error_message_on :shipping_method, :name
|
||||
.row
|
||||
.alpha.three.columns
|
||||
= f.label :description, t(:description)
|
||||
.omega.eight.columns
|
||||
= f.text_area :description, class: 'fullwidth', rows: 2, placeholder: "eg. 'Please collect your order from 123 Imaginary St, Northcote, 3070'"
|
||||
= f.text_area :description, class: 'fullwidth', rows: 2, placeholder: t(:spree_admin_eg_collect_your_order)
|
||||
= error_message_on :shipping_method, :description
|
||||
- if @available_zones.length == 1
|
||||
= f.hidden_field :zone_id, value: @available_zones.first.id
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
= f.text_field :unit_value, {hidden: true, 'ng-value' => 'unit_value'}
|
||||
|
||||
.field{"data-hook" => "unit_description"}
|
||||
= f.label :unit_description, "Unit Description"
|
||||
= f.label :unit_description, t(:spree_admin_unit_description)
|
||||
= f.text_field :unit_description, class: "fullwidth", placeholder: t('admin.products.unit_name_placeholder')
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/ insert_bottom "[data-hook='on_demand']"
|
||||
%div{'ofn-with-tip' => t('admin.products.variants.to_order_tip')}
|
||||
%a What's this?
|
||||
%a= t('admin.whats_this')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/ replace_contents '#shipping_method p#minstrs'
|
||||
|
||||
= form.label :special_instructions, 'Delivery Instructions'
|
||||
= form.label :special_instructions, t(:delivery_instructions)
|
||||
%br/
|
||||
= form.text_area :special_instructions, :cols => 40, :rows => 7
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/ replace_contents '#shipping_method legend'
|
||||
Delivery Method
|
||||
= t(:delivery_method)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!-- insert_after '[data-hook="checkout_summary_box"]'
|
||||
<!-- insert_after '[data-hook="checkout_summary_box"]'
|
||||
sequence :before => 'add_change_distributor_form_to_checkout_address' -->
|
||||
|
||||
<% # Add a new 'Save and Continue/Process My Order' button under Order Summary on the checkout pages %>
|
||||
|
||||
<div id="add_new_save_checkout_button" class="columns omega four">
|
||||
<%= submit_tag @order.state == "payment" ? "Process My Order" : t(:save_and_continue),
|
||||
:class => "continue button primary large",
|
||||
<%= submit_tag @order.state == "payment" ? t(:process_my_order) : t(:save_and_continue),
|
||||
:class => "continue button primary large",
|
||||
:form=> "checkout_form_#{@order.state}" %>
|
||||
<script>
|
||||
//Show additional button only if form attribute is supported
|
||||
@@ -13,4 +13,4 @@
|
||||
$("#add_new_save_checkout_button").show();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ class Api::Admin::ProductSerializer < ActiveModel::Serializer
|
||||
has_one :master, serializer: Api::Admin::VariantSerializer
|
||||
|
||||
def on_hand
|
||||
object.on_hand.nil? ? 0 : object.on_hand.to_f.finite? ? object.on_hand : "On demand"
|
||||
object.on_hand.nil? ? 0 : object.on_hand.to_f.finite? ? object.on_hand : I18n.t(:on_demand)
|
||||
end
|
||||
|
||||
def price
|
||||
|
||||
@@ -4,7 +4,7 @@ class Api::Admin::VariantSerializer < ActiveModel::Serializer
|
||||
has_many :variant_overrides
|
||||
|
||||
def on_hand
|
||||
object.on_hand.nil? ? 0 : ( object.on_hand.to_f.finite? ? object.on_hand : "On demand" )
|
||||
object.on_hand.nil? ? 0 : ( object.on_hand.to_f.finite? ? object.on_hand : I18n.t(:on_demand) )
|
||||
end
|
||||
|
||||
def price
|
||||
|
||||
@@ -127,6 +127,7 @@ en:
|
||||
cancel: Cancel
|
||||
edit: Edit
|
||||
distributors: Distributors
|
||||
distribution: Distribution
|
||||
order_cycles: Order Cycles
|
||||
enterprise_limit: Enterprise Limit
|
||||
bulk_order_management: Bulk Order Management
|
||||
@@ -1458,6 +1459,9 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
distributor: "Distributor"
|
||||
product: "Products"
|
||||
enterprise_fees: "Enterprise Fees"
|
||||
process_my_order: "Process My Order"
|
||||
delivery_instructions: Delivery Instructions
|
||||
delivery_method: Delivery Method
|
||||
fee_type: "Fee Type"
|
||||
tax_category: "Tax Category"
|
||||
calculator: "Calculator"
|
||||
@@ -1485,11 +1489,8 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
price: "Price"
|
||||
on_hand: "On hand"
|
||||
save_changes: "Save Changes"
|
||||
<<<<<<< HEAD
|
||||
order_saved: "Order Saved"
|
||||
=======
|
||||
no_products: No Products
|
||||
>>>>>>> Extract translations from lib folder
|
||||
spree_admin_overview_enterprises_header: "My Enterprises"
|
||||
spree_admin_overview_enterprises_footer: "MANAGE MY ENTERPRISES"
|
||||
spree_admin_enterprises_hubs_name: "Name"
|
||||
@@ -1512,13 +1513,19 @@ Please follow the instructions there to make your enterprise visible on the Open
|
||||
spree_admin_enterprises_create_new_product: "CREATE A NEW PRODUCT"
|
||||
spree_admin_order_cycles: "Order Cycles"
|
||||
spree_admin_order_cycles_tip: "Order cycles determine when and where your products are available to customers."
|
||||
dashbord: "Dashboard"
|
||||
spree_admin_single_enterprise_alert_mail_confirmation: "Please confirm the email address for"
|
||||
spree_admin_single_enterprise_alert_mail_sent: "We've sent an email to"
|
||||
spree_admin_overview_action_required: "Action Required"
|
||||
spree_admin_overview_check_your_inbox: "Please check your inbox for further instructions. Thanks!"
|
||||
spree_admin_unit_value: Unit Value
|
||||
spree_admin_unit_description: Unit Description
|
||||
spree_admin_variant_unit: Variant unit
|
||||
spree_admin_variant_unit_scale: Variant unit scale
|
||||
spree_admin_variant_unit_name: Variant unit name
|
||||
change_package: "Change Package"
|
||||
spree_admin_single_enterprise_hint: "Hint: To allow people to find you, turn on your visibility under"
|
||||
spree_admin_eg_pickup_from_school: "eg. 'Pick-up from Primary School'"
|
||||
spree_admin_eg_collect_your_order: "eg. 'Please collect your order from 123 Imaginary St, Northcote, 3070'"
|
||||
your_profil_live: "Your profile live"
|
||||
on_ofn_map: "on the Open Food Network map"
|
||||
see: "See"
|
||||
|
||||
Reference in New Issue
Block a user