Skip to content

Commit

Permalink
Use attribute translations for customer return forms
Browse files Browse the repository at this point in the history
Change-Id: I2b41ae32237622edef509809457efaea0f9b7529
  • Loading branch information
Thomas von Deyen authored and Murph33 committed Feb 16, 2016
1 parent 339cc85 commit 698992b
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<table class="index customer-return-reimbursements">
<thead data-hook="customer_return_header">
<tr>
<th><%= Spree.t(:number) %></th>
<th><%= Spree.t(:total) %></th>
<th><%= Spree.t(:status) %></th>
<th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
<th><%= Spree::Reimbursement.human_attribute_name(:number) %></th>
<th><%= Spree::Reimbursement.human_attribute_name(:total) %></th>
<th><%= Spree::Reimbursement.human_attribute_name(:reimbursement_status) %></th>
<th><%= Spree::Reimbursement.human_attribute_name(:created_at) %></th>
<th class="actions"></th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<thead>
<tr>
<th><%= Spree::Product.model_name.human %></th>
<th><%= Spree.t(:sku) %></th>
<th><%= Spree.t(:pre_tax_amount) %></th>
<th><%= Spree.t(:preferred_reimbursement_type) %></th>
<th><%= Spree.t(:exchange_for) %></th>
<th><%= Spree.t(:acceptance_errors) %></th>
<th><%= Spree.t(:reception_status) %></th>
<th><%= Spree::Variant.human_attribute_name(:sku) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:pre_tax_amount) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:preferred_reimbursement_type) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:exchange_variant) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:acceptance_status_errors) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:reception_status) %></th>
<% unless return_items.all?(&:received?)%>
<th><%= Spree.t(:item_received?) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:item_received?) %></th>
<% end %>
<% if show_decision %>
<th class="actions"></th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<%= check_box_tag 'select-all' %>
</th>
<th><%= Spree::Product.model_name.human %></th>
<th><%= Spree.t(:sku) %></th>
<th><%= Spree.t(:pre_tax_amount) %></th>
<th><%= Spree.t(:state) %></th>
<th><%= Spree.t(:exchange_for) %></th>
<th><%= Spree.t(:resellable?) %></th>
<th><%= Spree.t(:reception_status) %></th>
<th><%= Spree.t(:reason) %></th>
<th><%= Spree::Variant.human_attribute_name(:sku) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:pre_tax_amount) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:inventory_unit_state) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:exchange_variant) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:resellable) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:reception_status) %></th>
<th><%= Spree::ReturnItem.human_attribute_name(:return_reason) %></th>
</tr>
</thead>
<tbody>
Expand Down
10 changes: 5 additions & 5 deletions backend/app/views/spree/admin/customer_returns/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<table class="index">
<thead data-hook="customer_return_header">
<tr>
<th><%= Spree.t(:return_number) %></th>
<th><%= Spree.t(:pre_tax_total) %></th>
<th><%= Spree.t(:total) %></th>
<th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
<th><%= Spree.t(:reimbursement_status) %></th>
<th><%= Spree::CustomerReturn.human_attribute_name(:number) %></th>
<th><%= Spree::CustomerReturn.human_attribute_name(:pre_tax_total) %></th>
<th><%= Spree::CustomerReturn.human_attribute_name(:total) %></th>
<th><%= Spree::CustomerReturn.human_attribute_name(:created_at) %></th>
<th><%= Spree::CustomerReturn.human_attribute_name(:reimbursement_status) %></th>
<th class="actions"></th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</fieldset>

<%= f.field_container :stock_location do %>
<%= f.label :stock_location, Spree.t(:stock_location) %>
<%= f.label :stock_location_id, Spree::StockLocation.model_name.human %>
<%= f.select :stock_location_id, Spree::StockLocation.order_default.to_a.collect{|l|[l.name.humanize, l.id]}, {include_blank: true}, {class: 'select2 fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
<%= f.error_message_on :stock_location_id %>
<% end %>
Expand Down
22 changes: 22 additions & 0 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ en:
number: Number
verification_value: Verification Value
year: Year
spree/customer_return:
number: Return Number
pre_tax_total: Pre-Tax Total
total: Total
created_at: "Date/Time"
reimbursement_status: Reimbursement status
name: Name
spree/image:
alt: Alternative Text
Expand Down Expand Up @@ -160,11 +166,27 @@ en:
active: Active
name: Name
code: Code
spree/reimbursement:
created_at: "Date/Time"
number: Number
reimbursement_status: Status
total: Total
spree/reimbursement_type:
name: Name
type: Type
spree/return_authorization:
amount: Amount
spree/return_item:
acceptance_status: Acceptance status
acceptance_status_errors: Acceptance errors
exchange_variant: Exchange for
inventory_unit_state: State
item_received?: "Item Received?"
pre_tax_amount: Pre-Tax Amount
preferred_reimbursement_type: Preferred Reimbursement Type
reception_status: Reception Status
resellable: "Resellable?"
return_reason: Reason
spree/return_reason:
name: Name
active: Active
Expand Down

0 comments on commit 698992b

Please sign in to comment.