Skip to content

Commit

Permalink
Improve i18n in stock location views
Browse files Browse the repository at this point in the history
  • Loading branch information
Murph33 committed Feb 16, 2016
1 parent ddbea12 commit e7535bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

<div class="five columns">
<div class="field" id="stock_movement_variant_id_field">
<%= label_tag 'variant_id', Spree.t(:variant) %>
<%= label_tag 'variant_id', Spree::Variant.model_name.human %>
<%= select_tag :variant_id, options_from_collection_for_select(@variants, :id, :name_and_sku), class: 'select2 fullwidth' %>
</div>
</div>

<div class="five columns">
<div class="field" id="stock_movement_quantity_field">
<%= label_tag 'quantity', Spree.t(:quantity) %>
<%= label_tag 'quantity', Spree::StockMovement.human_attribute_name(:quantity) %>
<%= number_field_tag :quantity, 1, class: 'fullwidth' %>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions backend/app/views/spree/admin/stock_locations/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= render :partial => 'spree/admin/shared/configuration_menu' %>
<% content_for :page_title do %>
<%= Spree.t(:stock_locations) %>
<%= Spree::StockLocation.model_name.human(count: :other) %>
<% end %>
<% content_for :page_actions do %>
Expand Down Expand Up @@ -32,9 +32,9 @@
<thead>
<tr data-hook="stock_locations_header">
<th class="no-border"></th>
<th><%= Spree.t(:name) %></th>
<th><%= Spree.t(:state) %></th>
<th><%= Spree.t(:stock_movements) %></th>
<th><%= Spree::StockLocation.human_attribute_name(:name) %></th>
<th><%= Spree::StockLocation.human_attribute_name(:state_id) %></th>
<th><%= Spree::StockMovement.model_name.human(count: :other) %></th>
<th class="actions"></th>
</tr>
</thead>
Expand All @@ -53,7 +53,7 @@
<td class="align-center"><span class="state <%= state(stock_location) %>"><%= Spree.t(state(stock_location)) %></span></td>
<td class="align-center">
<% if can?(:display, Spree::StockMovement) %>
<%= link_to Spree.t(:stock_movements), admin_stock_location_stock_movements_path(stock_location.id) %>
<%= link_to Spree::StockMovement.model_name.human(count: :other), admin_stock_location_stock_movements_path(stock_location.id) %>
<% else %>
Stock Movements
<% end %>
Expand Down
1 change: 1 addition & 0 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ en:
action: Action
quantity: Quantity
stock_item_id: Stock Item
quantity: Quantity
spree/stock_transfer:
created_at: Created At
created_by_id: Created By
Expand Down

0 comments on commit e7535bd

Please sign in to comment.