Add missing translations on views

This commit is contained in:
François Turbelin
2017-03-28 21:52:48 +02:00
parent 29e2886b05
commit 01746ed470
21 changed files with 85 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
%div{ ng: { show: "data.length > limit" } }
%input{ type: 'button', value: t(:show_more), ng: { click: 'limit = limit + increment' } }
or
%input{ type: 'button', value: t(:show_more_with_more, num: '{{ data.length - limit }}'), ng: { click: 'limit = data.length' } }
%input{ type: 'button', value: t(:show_all_with_more, num: '{{ data.length - limit }}'), ng: { click: 'limit = data.length' } }

View File

@@ -231,7 +231,7 @@ Spree::Admin::ReportsController.class_eval do
@report_types = REPORT_TYPES[:orders_and_fulfillment]
@report_type = params[:report_type]
@include_blank = 'All'
@include_blank = I18n.t(:all)
# -- Build Report with Order Grouper
@report = OpenFoodNetwork::OrdersAndFulfillmentsReport.new spree_current_user, params

View File

@@ -4,7 +4,7 @@ module OpenFoodNetwork
attr_accessible :preferred_per_kg
def self.description
"Weight (per kg)"
I18n.t('spree.weight')
end
def compute(object)

View File

@@ -1,3 +1,3 @@
/ insert_bottom "[data-hook='admin_product_sub_tabs']"
= tab :variant_overrides, label: "Inventory", url: main_app.admin_inventory_path, match_path: '/inventory'
= tab :variant_overrides, url: main_app.admin_inventory_path, match_path: '/inventory'

View File

@@ -25,7 +25,7 @@
%col{ width: '62.5%' }
%col{ width: '12.5%' }
%thead
%th Date
%th= t('admin.date')
%th= t(:description)
%th= t(:charge)
- if order = invoice.order

View File

@@ -20,7 +20,7 @@
.filter_select.five.columns.alpha
%label{ :for => 'quick_search', ng: {class: '{disabled: !shop_id}'} }=t('admin.quick_search')
%br
%input.fullwidth{ :type => "text", :id => 'quick_search', ng: { model: 'quickSearch', disabled: '!shop_id' }, :placeholder => "Search by email/code..." }
%input.fullwidth{ :type => "text", :id => 'quick_search', ng: { model: 'quickSearch', disabled: '!shop_id' }, :placeholder => t('.search_by_email') }
.filter_select.four.columns
%label{ :for => 'hub_id', ng: { bind: "shop_id ? '#{t('admin.shop')}' : '#{t('admin.variant_overrides.index.select_a_shop')}'" } }
%br
@@ -94,6 +94,6 @@
-# %show-more.text-center{ data: "filteredCustomers", limit: "customerLimit", increment: "20" }
%div.text-center{ ng: { show: "filteredCustomers.length > customerLimit" } }
%input{ type: 'button', value: 'Show More', ng: { click: 'customerLimit = customerLimit + 20' } }
%input{ type: 'button', value: t(:show_more), ng: { click: 'customerLimit = customerLimit + 20' } }
or
%input{ type: 'button', value: "Show All ({{ filteredCustomers.length - customerLimit }} More)", ng: { click: 'customerLimit = filteredCustomers.length' } }
%input{ type: 'button', value: t(:show_all_with_more, num: '{{ filteredCustomers.length - customerLimit }}'), ng: { click: 'customerLimit = filteredCustomers.length' } }

View File

@@ -23,11 +23,11 @@
= f.label :charges_sales_tax, t(:say_no), value: 'false'
.row
.alpha.three.columns
= f.label :display_invoice_logo, 'Display logo in invoices'
= f.label :display_invoice_logo, t('.display_invoice_logo')
.omega.eight.columns
= f.check_box :display_invoice_logo
.row
.alpha.three.columns
= f.label :invoice_text, 'Add customized text at the end of invoices'
= f.label :invoice_text, t('.invoice_text')
.omega.eight.columns
= f.text_area :invoice_text, style: "width: 100%; height: 100px;"

View File

@@ -10,7 +10,7 @@
%tr{ ng: { controller: 'shippingMethodsCtrl', init: "findShippingMethodByID(#{shipping_method.id})" } }
%td= shipping_method.name
%td= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
%td= link_to "Edit", edit_admin_shipping_method_path(shipping_method)
%td= link_to t(:edit), edit_admin_shipping_method_path(shipping_method)
%br
.row
.six.columns.alpha

View File

@@ -1,7 +1,7 @@
.row
.alpha.eleven.columns
.three.columns.alpha
= f.label "enterprise_preferred_shopfront_message", t(:shopfront_message)
= f.label "enterprise_preferred_shopfront_message", t('.shopfront_message')
.eight.columns.omega
%text-angular{'ng-model' => 'Enterprise.preferred_shopfront_message', 'id' => 'enterprise_preferred_shopfront_message', 'name' => 'enterprise[preferred_shopfront_message]', 'class' => 'text-angular',
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]",
@@ -9,7 +9,7 @@
.row
.alpha.eleven.columns
.three.columns.alpha
= f.label "enterprise_preferred_shopfront_closed_message", t(:shopfront_closed_message)
= f.label "enterprise_preferred_shopfront_closed_message", t('.shopfront_closed_message')
.eight.columns.omega
%text-angular{'ng-model' => 'Enterprise.preferred_shopfront_closed_message', 'id' => 'enterprise_preferred_shopfront_closed_message', 'name' => 'enterprise[preferred_shopfront_closed_message]', 'class' => 'text-angular',
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]",
@@ -17,7 +17,7 @@
.row
.alpha.eleven.columns
.three.columns.alpha
= f.label "enterprise_preferred_shopfront_taxon_order", t(:shopfront_category_ordering)
= f.label "enterprise_preferred_shopfront_taxon_order", t('.shopfront_category_ordering')
%br
(top to bottom)
.eight.columns.omega

View File

@@ -11,7 +11,7 @@
.filter_select.four.columns
%label{ :for => 'producer_filter', ng: {class: '{disabled: !hub_id}'} }=t('admin.producer')
%br
%input.ofn-select2.fullwidth{ :id => 'producer_filter', type: 'number', data: 'producers', blank: "{id: 0, name: 'All'}", ng: { model: 'producerFilter', disabled: '!hub_id' } }
%input.ofn-select2.fullwidth{ :id => 'producer_filter', type: 'number', data: 'producers', blank: "{id: 0, name: '#{t(:all)}'}", ng: { model: 'producerFilter', disabled: '!hub_id' } }
-# .filter_select{ :class => "three columns" }
-# %label{ :for => 'distributor_filter' }Hub
-# %br

View File

@@ -38,7 +38,7 @@
.small-12.medium-6.medium-offset-3.columns.text-center
%h2
= t :producers_signup_cta_headline
%p.text-big Start with a free profile, and expand when you're ready!
%p.text-big= t('.start_free_profile')
%a.button.transparent{href: "/register"}
= t :producers_signup_cta_action

View File

@@ -31,21 +31,21 @@
%label{ :for => 'supplier_filter' }
= t("admin.producer")
%br
%input#supplier_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'suppliers', blank: "{ id: 0, name: 'All' }", ng: { model: 'supplierFilter' } }
%input#supplier_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'suppliers', blank: "{ id: 0, name: '#{t(:all)}' }", ng: { model: 'supplierFilter' } }
.filter_select{ :class => "three columns" }
%label{ :for => 'distributor_filter' }
= t("admin.shop")
%br
%input#distributor_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'distributors', blank: "{ id: 0, name: 'All' }", ng: { model: 'distributorFilter' } }
%input#distributor_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'distributors', blank: "{ id: 0, name: '#{t(:all)}' }", ng: { model: 'distributorFilter' } }
.filter_select{ :class => "three columns" }
%label{ :for => 'order_cycle_filter' }
= t("admin.order_cycle")
%br
%input#order_cycle_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'orderCycles', blank: "{ id: 0, name: 'All' }", on: { selecting: "confirmRefresh" }, ng: { model: 'orderCycleFilter', change: 'refreshData()' } }
%input#order_cycle_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'orderCycles', blank: "{ id: 0, name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'orderCycleFilter', change: 'refreshData()' } }
.filter_clear{ :class => "two columns omega" }
%label{ :for => 'clear_all_filters' }
%br
%input.red.fullwidth{ :type => 'button', :id => 'clear_all_filters', :value => "Clear All", 'ng-click' => "resetSelectFilters()" }
%input.red.fullwidth{ :type => 'button', :id => 'clear_all_filters', :value => t('admin.clear_all'), 'ng-click' => "resetSelectFilters()" }
%hr.divider.sixteen.columns.alpha.omega{ ng: { show: 'unitsVariantSelected()' } }
@@ -59,7 +59,7 @@
%h6{ :class => "eight columns alpha", 'ng-hide' => 'sharedResource', style: 'text-align: center;' } {{ selectedUnitsVariant.full_name }}
%div{ :class => "four columns omega" }
%h6{ :class => "four columns alpha", :style => 'text-align: right;' }
%a{ :href => '#', 'ng-click' => 'selectedUnitsVariant = {};selectedUnitsProduct = {};sharedResource=false;' } Clear
%a{ :href => '#', 'ng-click' => 'selectedUnitsVariant = {};selectedUnitsProduct = {};sharedResource=false;' }= t('admin.clear')
%hr
.row
.one.column.alpha  

View File

@@ -15,4 +15,4 @@
.filter_clear.three.columns.omega
%label{ :for => 'clear_all_filters' }
%br
%input.fullwidth.red{ :type => 'button', :id => 'clear_all_filters', :value => "Clear Filters", 'ng-click' => "resetSelectFilters()" }
%input.fullwidth.red{ :type => 'button', :id => 'clear_all_filters', :value => t('admin.clear_filters'), 'ng-click' => "resetSelectFilters()" }

View File

@@ -20,7 +20,7 @@
%tr{ ng: { controller: "ColumnsCtrl" } }
%th.left-actions
%a{ 'ng-click' => 'toggleShowAllVariants()', :style => 'color: red' }
Expand All
= t(:expand_all)
%th.producer{ 'ng-show' => 'columns.producer.visible' }=t('admin.producer')
%th.sku{ 'ng-show' => 'columns.sku.visible' }=t('admin.sku')
%th.name{ 'ng-show' => 'columns.name.visible' }=t('admin.name')

View File

@@ -26,7 +26,7 @@
%input.fullwidth{ :type => 'text', id: "p{{product.id}}_category_id", 'ng-model' => 'product.category_id', 'ofn-taxon-autocomplete' => '', 'ofn-track-product' => 'category_id', 'multiple-selection' => 'false', placeholder: 'Category' }
%td.tax_category{ 'ng-if' => 'columns.tax_category.visible' }
%select.select2{ name: 'product_tax_category_id', 'ofn-track-product' => 'tax_category_id', ng: {model: 'product.tax_category_id', options: 'tax_category.id as tax_category.name for tax_category in tax_categories'} }
%option{value: ''} None
%option{value: ''}= t(:none)
%td.inherits_properties{ 'ng-show' => 'columns.inherits_properties.visible' }
%input{ 'ng-model' => 'product.inherits_properties', :name => 'inherits_properties', 'ofn-track-product' => 'inherits_properties', type: "checkbox" }
%td.available_on{ 'ng-show' => 'columns.available_on.visible' }

View File

@@ -1,3 +1,3 @@
%div.sixteen.columns.alpha{ 'ng-hide' => 'loading || products.length == 0', style: "margin-bottom: 10px" }
%div.four.columns.alpha
%input.four.columns.alpha{ :type => 'button', :value => 'Save Changes', 'ng-click' => 'submitProducts()'}
%input.four.columns.alpha{ :type => 'button', :value => t(:save_changes), 'ng-click' => 'submitProducts()'}

View File

@@ -4,7 +4,7 @@
.row
.four.columns.alpha
= label_tag nil, "Distributor: "
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => 'All'}, {:class => "select2 fullwidth"})
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => t(:all)}, {:class => "select2 fullwidth"})
= label_tag nil, "Report Type: "
%br
= select_tag(:report_type, options_for_select([['Bulk Co-op - Totals by Supplier',:bulk_coop_supplier_report],['Bulk Co-op - Allocation',:bulk_coop_allocation],['Bulk Co-op - Packing Sheets',:bulk_coop_packing_sheets],['Bulk Co-op - Customer Payments',:bulk_coop_customer_payments]], @report_type))

View File

@@ -4,7 +4,7 @@
.row
.four.columns.alpha
= label_tag nil, t(:report_distributor)
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => 'All'}, {:class => "select2 fullwidth"})
= f.collection_select(:distributor_id_eq, @distributors, :id, :name, {:include_blank => t(:all)}, {:class => "select2 fullwidth"})
= label_tag nil, t(:report_customers_type)
%br
= select_tag(:report_type, options_for_select([[t(:report_tax_types),:tax_types],[t(:report_tax_rates),:tax_rates]], @report_type))

View File

@@ -1,5 +1,5 @@
%div{:data-hook => "product_source"}
%h6.product-section-title SUPPLIER
%h6.product-section-title= t(:supplier)
%table#product-source.table-display{:width => "100%"}
%tbody
- if @product.supplier
@@ -7,7 +7,7 @@
%td= link_to @product.supplier.name, [main_app, @product.supplier]
- if false
%br/
%h6.product-section-title DISTRIBUTORS
%h6.product-section-title= t(:distributors)
%table#product-source.table-display{:width => "100%"}
%tbody
- order = current_order(false)
@@ -18,11 +18,11 @@
%td
%b= link_to(distributor.name, [main_app, distributor])
%td
%b Current
%b= t(:current)
- elsif order.nil? || validator.can_change_to_distributor?(distributor)
%tr.even
%td= link_to distributor.name, [main_app, distributor]
%td Available
%td= t(:available)
- else
%tr.even
%td= link_to distributor.name, [main_app, distributor]

View File

@@ -0,0 +1,4 @@
<%= t('.welcome', email: @email) %>
<%= t('.text') %>
<%= @confirmation_url %>

View File

@@ -80,6 +80,21 @@ en:
show_all: Show all
show_all_with_more: "Show All (%{num} More)"
cancel: Cancel
edit: Edit
distributors: Distributors
order_cycles: Order Cycles
enterprise_limit: Enterprise Limit
bulk_order_management: Bulk Order Management
enterprises: Enterprises
enterprise_groups: Groups
reports: Reports
variant_overrides: Inventory
more: More
spree_products: Spree Products
all: All
current: Current
available: Available
dashboard: Dashboard
admin:
# Common properties / models
@@ -107,6 +122,8 @@ en:
end_date: "End Date"
unsaved_changes: "You have unsaved changes"
form_invalid: "Form contains missing or invalid fields"
clear_filters: Clear Filters
clear: Clear
columns: Columns
actions: Actions
@@ -190,6 +207,7 @@ en:
edit: 'Edit'
update_address: 'Update Address'
confirm_delete: 'Sure to delete?'
search_by_email: "Search by email/code..."
cache_settings:
show:
@@ -299,6 +317,8 @@ en:
abn_placeholder: eg. 99 123 456 789
acn: ACN
acn_placeholder: eg. 123 456 789
display_invoice_logo: Display logo in invoices
invoice_text: Add customized text at the end of invoices
contact:
name: Name
name_placeholder: eg. Gustav Plum
@@ -375,13 +395,16 @@ en:
allow_guest_orders_tip: "Allow checkout as guest or require a registered user."
allow_guest_orders_false: "Require login to order"
allow_guest_orders_true: "Allow guest checkout"
shopfront_message: Shopfront Message
shopfront_message_placeholder: >
An optional explanation for customers detailing how your shopfront works,
to be displayed above the product list on your shop page.
shopfront_closed_message: Shopfront Closed Message
shopfront_closed_message_placeholder: >
A message which provides a more detailed explanation about why your shop is
closed and/or when customers can expect it to open again. This is displayed
on your shop only when you have no active order cycles (ie. shop is closed).
shopfront_category_ordering: Shopfront Category Ordering
open_date: Open Date
close_date: Close Date
social:
@@ -743,6 +766,7 @@ en:
order_billing_address: Billing address
order_delivery_on: Delivery on
order_delivery_address: Delivery address
order_delivery_time: Delivery time
order_special_instructions: "Your notes:"
order_pickup_time: Ready for collection
order_pickup_instructions: Collection Instructions
@@ -1122,6 +1146,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
enterprise_long_desc: "Long Description"
enterprise_long_desc_placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words."
enterprise_long_desc_length: "%{num} characters / up to 600 recommended"
enterprise_limit: Enterprise Limit
enterprise_abn: "ABN"
enterprise_abn_placeholder: "eg. 99 123 456 789"
enterprise_acn: "ACN"
@@ -1262,6 +1287,7 @@ Please follow the instructions there to make your enterprise visible on the Open
calculator_values: "Calculator values"
flat_percent_per_item: "Flat Percent (per item)"
new_order_cycles: "New Order Cycles"
new_order_cycle: "New Order Cycle"
select_a_coordinator_for_your_order_cycle: "Select a coordinator for your order cycle"
edit_order_cycle: "Edit Order Cycle"
roles: "Roles"
@@ -1542,6 +1568,10 @@ Please follow the instructions there to make your enterprise visible on the Open
now_out_of_stock: is now out of stock.
only_n_remainging: "now only has %{num} remaining."
producers:
signup:
start_free_profile: "Start with a free profile, and expand when you're ready!"
spree:
admin:
products:
@@ -1558,24 +1588,7 @@ Please follow the instructions there to make your enterprise visible on the Open
date_picker:
format: ! '%Y-%m-%d'
js_format: 'yy-mm-dd'
zipcode: Postcode
shipment_states:
backorder: backorder
partial: partial
pending: pending
ready: ready
shipped: shipped
payment_states:
balance_due: balance due
completed: completed
checkout: checkout
credit_owed: credit owed
failed: failed
paid: paid
pending: pending
processing: processing
void: void
invalid: invalid
inventory: Inventaire
order_mailer:
invoice_email:
hi: "Hi %{name}"
@@ -1596,6 +1609,23 @@ Please follow the instructions there to make your enterprise visible on the Open
orders:
invoice:
tax_invoice: "TAX INVOICE: "
payment_states:
balance_due: balance due
completed: completed
checkout: checkout
credit_owed: credit owed
failed: failed
paid: paid
pending: pending
processing: processing
void: void
invalid: invalid
shipment_states:
backorder: backorder
partial: partial
pending: pending
ready: ready
shipped: shipped
user_mailer:
reset_password_instructions:
request_sent_text: |
@@ -1606,3 +1636,5 @@ Please follow the instructions there to make your enterprise visible on the Open
issue_text: |
If the above URL does not work try copying and pasting it into your browser.
If you continue to have problems please feel free to contact us.
weight: Weight (per kg)
zipcode: Postcode