Skip to content

Commit

Permalink
Merge pull request #840 from Murph33/improve_i18n_store_credits
Browse files Browse the repository at this point in the history
Improve i18n store credits
  • Loading branch information
jhawthorn committed Feb 18, 2016
2 parents 7d63bb6 + 7c542a6 commit 3244fa1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div data-hook="admin_store_credit_form_fields" class="row">
<div class="alpha twelve columns">
<%= f.field_container :amount do %>
<%= f.label :amount, Spree.t(:amount), class: 'required' %><br />
<%= f.label :amount, class: 'required' %><br />
<%= f.number_field :amount, min: 0.00, step: :any %>
<%= f.error_message_on :amount %>
<% end %>
Expand Down
10 changes: 5 additions & 5 deletions backend/app/views/spree/admin/store_credits/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<% if @store_credits.any? %>
<div id='sc-current-balance'>
<strong><%= Spree.t("admin.store_credits.current_balance") %>: </strong><%= @user.display_total_available_store_credit %>
<strong><%= Spree.t("admin.store_credits.current_balance") %> </strong><%= @user.display_total_available_store_credit %>
</div>

<table>
<thead>
<th><%= Spree.t("admin.store_credits.credited_html_header") %></th>
<th><%= Spree.t("admin.store_credits.used_html_header") %></th>
<th><%= Spree.t("admin.store_credits.authed_html_header") %></th>
<th><%= Spree.t("admin.store_credits.type_html_header") %></th>
<th><%= Spree.t("admin.store_credits.amount_credited") %></th>
<th><%= Spree.t("admin.store_credits.amount_used") %></th>
<th><%= Spree.t("admin.store_credits.amount_authorized") %></th>
<th><%= Spree.t("admin.store_credits.credit_type") %></th>
<th><%= Spree.t("admin.store_credits.created_by") %></th>
<th><%= Spree.t("admin.store_credits.issued_on") %></th>
<th><%= Spree.t("admin.store_credits.invalidated") %></th>
Expand Down
8 changes: 4 additions & 4 deletions backend/app/views/spree/admin/store_credits/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@
<tr>
<th><%= Spree.t(:date) %></th>
<th><%= Spree.t(:action) %></th>
<th><%= Spree.t(:amount) %></th>
<th><%= Spree.t(:created_by) %></th>
<th><%= Spree.t("admin.store_credits.total_unused").html_safe %></th>
<th><%= Spree.t("admin.store_credits.reason_for_updating").html_safe %></th>
<th><%= Spree::StoreCredit.human_attribute_name(:amount) %></th>
<th><%= Spree::StoreCredit.human_attribute_name(:created_by_id) %></th>
<th><%= Spree.t("admin.store_credits.total_unused") %></th>
<th><%= Spree.t("admin.store_credits.reason_for_updating") %></th>
</tr>
</thead>
<tbody>
Expand Down
31 changes: 16 additions & 15 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ en:
amount: Amount
amount_used: Amount used
category_id: Credit Type
created_by_id: Created By
memo: Memo
spree/stock_item:
count_on_hand: Count On Hand
Expand Down Expand Up @@ -632,37 +633,37 @@ en:
user_information: User Information
store_credits:
add: "Add store credit"
new: "New store credit"
edit: "Editing store credit"
edit_amount: "Editing store credit amount"
invalidate_store_credit: "Invalidating store credit"
amount_authorized: "Amount Authorized"
amount_credited: "Amount Credited"
amount_used: "Amount Used"
back_to_edit: "Back to edit"
back_to_user_list: "Back to user list"
back_to_store_credit_list: "Store credit list"
change_amount: "Change amount"
credit_type: "Credit type"
credited_html_header: "Amount Credited"
current_balance: "Current balance"
used_html_header: "Amount Used"
authed_html_header: "Amount Authorized"
type_html_header: "Credit Type"
created_by: "Created By"
credit_type: "Credit type"
current_balance: "Current balance:"
edit: "Editing store credit"
edit_amount: "Editing store credit amount"
history: "Store credit history"
invalidate_store_credit: "Invalidating store credit"
invalidated: "Invalidated"
issued_on: "Issued On"
new: "New store credit"
no_store_credit_selected: "No store credit was selected"
payment_originator: "Payment - Order #%{order_number}"
reason_for_updating: "Reason for updating"
refund_originator: "Refund - Order #%{order_number}"
resource_name: "store credits"
user_originator: "User - %{email}"
select_reason: "Select a reason for this store credit"
select_amount_update_reason: "Select a reason for updating the amount"
total_unused: "Total<br/>unused"
unable_to_create: "Unable to create store credit"
unable_to_update: "Unable to update store credit"
unable_to_delete: "Unable to delete store credit"
unable_to_invalidate: "Unable to invalidate store credit"
resource_name: "store credits"
no_store_credit_selected: "No store credit was selected"
select_reason: "Select a reason for this store credit"
select_amount_update_reason: "Select a reason for updating the amount"
total_unused: "Total unused"
type_html_header: "Credit Type"
errors:
cannot_change_used_store_credit: "Store credit that has been claimed cannot be changed"
cannot_be_modified: "cannot be modified"
Expand Down

0 comments on commit 3244fa1

Please sign in to comment.