Move translations into their namespace and use '.key' format

This commit is contained in:
Matt-Yorkley
2018-09-24 15:54:05 +01:00
parent 9f57b43a13
commit 6f2760cf92
2 changed files with 21 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
- content_for :page_title do
= t(:listing_orders)
= t('.listing_orders')
- content_for :page_actions do
%li
= button_link_to t(:new_order), new_admin_order_url, :icon => 'icon-plus', :id => 'admin_new_order'
= button_link_to t('.new_order'), new_admin_order_url, icon: 'icon-plus', id: 'admin_new_order'
= render partial: 'spree/admin/shared/order_sub_menu'
@@ -48,7 +48,7 @@
%div{'ng-if' => 'order.special_instructions'}
%br
%span.icon-warning-sign{'ofn-with-tip' => "{{::order.special_instructions}}"}
= t(:note)
= t('.note')
%td.align-center
%span.state{'ng-class' => 'order.state'}
{{'order_state.' + order.state | t}}
@@ -65,11 +65,11 @@
%td.align-center
%span{'ng-bind-html' => '::order.display_total'}
%td.actions
%a.icon_link.with-tip.icon-edit.no-text{'ng-href' => '{{::order.edit_path}}', 'data-action' => 'edit', 'ofn-with-tip' => t(:edit)}
%a.icon_link.with-tip.icon-edit.no-text{'ng-href' => '{{::order.edit_path}}', 'data-action' => 'edit', 'ofn-with-tip' => t('.edit')}
%div{'ng-if' => 'order.ready_to_ship'}
%a.icon-road.icon_link.with-tip.no-text{'ng-href' => '{{::order.ship_path}}', 'data-action' => 'ship', 'data-confirm' => t(:are_you_sure), 'data-method' => 'put', rel: 'nofollow', 'ofn-with-tip' => t(:ship)}
%a.icon-road.icon_link.with-tip.no-text{'ng-href' => '{{::order.ship_path}}', 'data-action' => 'ship', 'data-confirm' => t(:are_you_sure), 'data-method' => 'put', rel: 'nofollow', 'ofn-with-tip' => t('.ship')}
%div{'ng-if' => 'order.capture_path'}
%a.icon-capture.icon_link.no-text{'ng-href' => '{{::order.capture_path}}', 'data-action' => 'capture', 'data-method' => 'put', rel: 'nofollow', 'ofn-with-tip' => t(:capture)}
%a.icon-capture.icon_link.no-text{'ng-href' => '{{::order.capture_path}}', 'data-action' => 'capture', 'data-method' => 'put', rel: 'nofollow', 'ofn-with-tip' => t('.capture')}
.orders-loading{'ng-show' => 'RequestMonitor.loading'}
.row
@@ -77,10 +77,10 @@
%img.spinner{ src: "/assets/spinning-circles.svg" }
.row
.small-12.columns.fullwidth.text-center
%span= t(:loading)
%span= t('.loading')
%div{'ng-show' => "!RequestMonitor.loading && orders.length > 0" }
= render partial: 'admin/shared/angular_pagination'
.no-objects-found{'ng-show' => "!RequestMonitor.loading && orders.length == 0"}
= t(:no_orders_found)
= t('.no_orders_found')

View File

@@ -613,16 +613,6 @@ en:
controls:
back_to_my_inventory: Back to my inventory
orders:
index:
capture: "Capture"
ship: "Ship"
edit: "Edit"
note: "Note"
first: "First"
last: "Last"
previous: "Previous"
next: "Next"
loading: "Loading"
invoice_email_sent: 'Invoice email has been sent'
order_email_resent: 'Order email has been resent'
bulk_management:
@@ -2655,6 +2645,19 @@ See the %{link} to find out more about %{sitename}'s features and to start using
index:
inherits_properties_checkbox_hint: "Inherit properties from %{supplier}? (unless overridden above)"
orders:
index:
listing_orders: "Listing Orders"
new_order: "New Order"
capture: "Capture"
ship: "Ship"
edit: "Edit"
note: "Note"
first: "First"
last: "Last"
previous: "Previous"
next: "Next"
loading: "Loading"
no_orders_found: "No Orders Found"
invoice:
issued_on: Issued on
tax_invoice: TAX INVOICE