Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use attribute translations for customer return forms #764

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
23 changes: 23 additions & 0 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ en:
base: ''
cc_type: Type
month: Month
name: Name
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 +167,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_id: Preferred Reimbursement Type
reception_status: Reception Status
resellable: "Resellable?"
return_reason: Reason
spree/return_reason:
name: Name
active: Active
Expand Down