diff --git a/app/views/customers/_details.html.erb b/app/views/customers/_details.html.erb
index 51a0a9f..e269716 100644
--- a/app/views/customers/_details.html.erb
+++ b/app/views/customers/_details.html.erb
@@ -1,53 +1,53 @@
- | Email |
+ <%=t(:label_email)%> |
<%= customer.email %> |
- | Primary Phone |
+ <%=t(:label_primary_phone)%> |
<%= number_to_phone(customer.primary_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.primary_phone %> |
- | Mobile Phone |
+ <%=t(:label_mobile_phone)%> |
<%= number_to_phone(customer.mobile_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.mobile_phone %> |
- | Bill Address |
+ <%=t(:label_billing_address)%> |
<%= customer.billing_address %> |
- | Shipping Address |
+ <%=t(:label_shipping_address)%> |
<%= customer.shipping_address %> |
- | Issues |
+ <%=t(:issues)%> |
<%= customer.issues.count %> |
- | Account Balance |
+ <%=t(:label_account_balance)%> |
$<%= customer.balance %> |
- | Balance With Jobs |
+ <%=t(:label_balance_with_jobs)%> |
$<%= customer.balance_with_jobs %> |
- | Notes |
+ <%=t(:field_notes)%> |
<%= customer.notes %> |
|
- <%= button_to "Edit Customer", edit_customer_path(customer), method: :get%>
+ <%= button_to t(:label_edit_customer), edit_customer_path(customer), method: :get%>
|
diff --git a/app/views/customers/_form.html.erb b/app/views/customers/_form.html.erb
index d70fe97..d1b5e68 100644
--- a/app/views/customers/_form.html.erb
+++ b/app/views/customers/_form.html.erb
@@ -5,35 +5,35 @@
<%= form_for @customer do |f| %>
- Display Name:
+ <%=t(:label_display_name)%>
<%= f.text_field :name, :required => true %>
- Phone Number:
+ <%=t(:label_primary_phone)%>
<%= f.telephone_field :primary_phone %>
- Mobile Phone Number:
+ <%=t(:label_mobile_phone)%>:
<%= f.telephone_field :mobile_phone %>
- Email:
+ <%=t(:label_email)%>:
<%= f.email_field :email %>
- Notes:
+ <%=t(:field_notes)%>:
<%= link_to_function content_tag(:span, l(:button_edit), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @customer.new_record? %>
diff --git a/app/views/customers/_search.html.erb b/app/views/customers/_search.html.erb
index 826382a..d7a1669 100644
--- a/app/views/customers/_search.html.erb
+++ b/app/views/customers/_search.html.erb
@@ -1,6 +1,6 @@
<%= form_tag(customers_path, :method => "get", id: "search-form") do %>
-<%= text_field_tag :search, params[:search], placeholder: "Search Customers" %>
-<%= submit_tag "Search" %>
+<%= text_field_tag :search, params[:search], placeholder: t(:label_search_customers) %>
+<%= submit_tag t(:label_search) %>
<% end %>
-<%= button_to "New Customer", new_customer_path, method: :get%>
-<%= button_to "Sync", qbo_sync_path, method: :get%>
+<%= button_to t(:label_new_customer), new_customer_path, method: :get%>
+<%= button_to t(:label_sync), qbo_sync_path, method: :get%>
diff --git a/app/views/customers/_sidebar.html.erb b/app/views/customers/_sidebar.html.erb
index 47c3d42..e22a3e7 100644
--- a/app/views/customers/_sidebar.html.erb
+++ b/app/views/customers/_sidebar.html.erb
@@ -1,2 +1,2 @@
-
Customers
+
<%=t(:label_customers)%>
<%= render :partial => 'customers/search' %>
diff --git a/app/views/customers/edit.html.erb b/app/views/customers/edit.html.erb
index e4e7682..deb9096 100644
--- a/app/views/customers/edit.html.erb
+++ b/app/views/customers/edit.html.erb
@@ -1,3 +1,3 @@
-
Edit Customer
+
<%=t(:label_edit_customer)%>
<%= render :partial => 'customers/form' %>
diff --git a/app/views/customers/index.html.erb b/app/views/customers/index.html.erb
index 9461c61..d1f8e53 100644
--- a/app/views/customers/index.html.erb
+++ b/app/views/customers/index.html.erb
@@ -1,4 +1,4 @@
-
Customers <%= render :partial => 'customers/search' %>
+
<%=t(:field_customers)%> <%= render :partial => 'customers/search' %>
<% if @customers.present? %>
<% @customers.each do |c| %>
@@ -9,14 +9,14 @@
<% end %>
-
Matching <%= @customers.count %> Customers
+
<%=t(:label_matching)%> <%= @customers.count %> <%=t(:field_customers)%>
<%= will_paginate @customers %>
<% else %>
-
There are no customers containing the term(s) <%= params[:search] %>.
+
<%=t(:label_no_customers)%> <%= params[:search] %>.
<% end %>
diff --git a/app/views/customers/new.html.erb b/app/views/customers/new.html.erb
index 84f4777..ae24589 100644
--- a/app/views/customers/new.html.erb
+++ b/app/views/customers/new.html.erb
@@ -1,3 +1,3 @@
-
New Customer
+
<%=t(:label_new_customer)%>
<%= render :partial => 'customers/form' %>
diff --git a/app/views/customers/show.html.erb b/app/views/customers/show.html.erb
index 4d94324..7c6e583 100644
--- a/app/views/customers/show.html.erb
+++ b/app/views/customers/show.html.erb
@@ -1,8 +1,8 @@
-
Customer #<%= @customer.id %> - <%= @customer.name %>
+
<%=t(:field_customer)%> #<%= @customer.id %> - <%= @customer.name %>
-
Details:
+
<%=t(:label_details)%>:
@@ -12,17 +12,17 @@
<%= render :partial => 'customers/details', locals: {customer: @customer} %>
-
Vehicles:
+ <%=t(:field_vehicles)%>:
<%= render :partial => 'vehicles/list' %>
<%= button_to "New Vehicle", new_customer_vehicle_path(@customer), method: :get %>
-
Open Issues:
+
<%=t(:label_open_issues)%>:
<%= render :partial => 'issues/list_simple', locals: {issues: @issues.open} %>
-
Closed Issues:
+
<%=t(:label_closed_issues)%>:
<%= render :partial => 'issues/list_simple', locals: {issues: (@issues - @issues.open)} %>
diff --git a/app/views/customers/view.html.erb b/app/views/customers/view.html.erb
index a059c8d..cfcee03 100644
--- a/app/views/customers/view.html.erb
+++ b/app/views/customers/view.html.erb
@@ -6,7 +6,7 @@
<%= render_issue_subject_with_tree(@issue) %>
-This customer link expires in <%= distance_of_time_in_words(Time.now, @token.expires_at) %>
+<%=t(:label_customer_link_expires)%> <%= distance_of_time_in_words(Time.now, @token.expires_at) %>
<%= authoring @issue.created_on, @issue.author %>.
diff --git a/app/views/estimates/_sidebar.html.erb b/app/views/estimates/_sidebar.html.erb
index dce48b5..10eefe5 100644
--- a/app/views/estimates/_sidebar.html.erb
+++ b/app/views/estimates/_sidebar.html.erb
@@ -1,2 +1,2 @@
-
Estimate
+<%=t(:label_estimates) %>
<%= render :partial => 'estimates/search' %>
diff --git a/app/views/payments/_form.html.erb b/app/views/payments/_form.html.erb
index 592922b..b229889 100644
--- a/app/views/payments/_form.html.erb
+++ b/app/views/payments/_form.html.erb
@@ -5,28 +5,28 @@
<%= form_for @payment do |f| %>
- Customer:
+ <%=t(:field_customer)%>:
<%= f.collection_select :customer_id, @customers, :id, :name, include_blank: true, :selected => @customer, :required => true%>
- Deposit to Account:
+ <%=t(:label_deposit_into)%>:
<%= f.collection_select :account_id, @accounts, :id, :name, include_blank: true, :selected => @account, :required => true%>
- Payment Method:
+ <%=t(:label_payment_method)%>:
<%= f.collection_select :payment_method_id, @payment_methods, :id, :name, include_blank: true, :selected => @payment_method, :required => true%>
- Amount:
+ <%=t(:label_amount)%>:
<%= f.number_field :total_amount %>
diff --git a/app/views/payments/new.html.erb b/app/views/payments/new.html.erb
index 14e714a..1745d20 100644
--- a/app/views/payments/new.html.erb
+++ b/app/views/payments/new.html.erb
@@ -1,3 +1,3 @@
-
New Payment
+
<%=t(:label_new_payment)%>
<%= render :partial => 'payments/form' %>
diff --git a/app/views/public/401.html.erb b/app/views/public/401.html.erb
index be716a6..50381b8 100644
--- a/app/views/public/401.html.erb
+++ b/app/views/public/401.html.erb
@@ -1 +1 @@
-<%= flash.now[:error] = "Not Authorized" %>
+<%= flash.now[:error] = t(:label_401) %>
diff --git a/app/views/qbo/_issues_show_details.html.erb b/app/views/qbo/_issues_show_details.html.erb
index a275d34..41c8d66 100644
--- a/app/views/qbo/_issues_show_details.html.erb
+++ b/app/views/qbo/_issues_show_details.html.erb
@@ -1,34 +1,34 @@
-
Customer:
+
<%=t(:field_customer)%>:
<%= customer %>
-
Estimate:
+
<%=t(:field_qbo_estimate)%>:
<%= estimate_link %>
-
Invoice:
+
<%=t(:field_qbo_invoice)%>:
<%= invoice_link %>
-
Vehicle:
+
<%=t(:field_vehicle)%>:
<%= vehicle %>
-
VIN:
+
<%=t(:field_vin)%>:
<%=split_vin[0] if split_vin%><%=split_vin[1] if split_vin%>
-
Notes:
+
<%=t(:field_notes)%>:
<%=notes%>
diff --git a/app/views/qbo/_last_sync.html.erb b/app/views/qbo/_last_sync.html.erb
index f040537..dd2118e 100644
--- a/app/views/qbo/_last_sync.html.erb
+++ b/app/views/qbo/_last_sync.html.erb
@@ -1 +1 @@
-
Last Sync: <%= Qbo.last_sync if Qbo.exists? %>
+
<%=t(:label_last_sync)%>: <%= Qbo.last_sync if Qbo.exists? %>
diff --git a/app/views/qbo/_settings.html.erb b/app/views/qbo/_settings.html.erb
index 838f80b..592bd11 100644
--- a/app/views/qbo/_settings.html.erb
+++ b/app/views/qbo/_settings.html.erb
@@ -22,7 +22,7 @@ intuit.ipp.anywhere.setup({menuProxy: '/path/to/blue-dot', grantUrl: '<%= Settin
- | Intuit QBO OAuth2 Client ID |
+ <%=t(:label_client_id)%> |
|
- | Intuit QBO OAuth2 Client Secret |
+ <%=t(:label_client_secret)%> |
|
- | Intuit QBO Webhook Token |
+ <%=t(:label_webhook_token)%> |
|
- | OAuth2 Access Token Expires At |
+ <%=t(:label_oauth_expires)%> |
<%= if Qbo.exists? then Qbo.first.expire end %>
|
@@ -57,7 +57,7 @@ intuit.ipp.anywhere.setup({menuProxy: '/path/to/blue-dot', grantUrl: '<%= Settin
-Note: You need to authenticate with Quickbooks after saving your key and secret above
+<%=t(:label_oauth_note)%>
@@ -68,27 +68,27 @@ Note: You need to authenticate with Quickbooks after saving your key and secret
- Customer Count: <%= Customer.count%>
+ <%=t(:label_customer_count)%>: <%= Customer.count%>
- Item Count: <%= QboItem.count %>
+ <%=t(:label_item_count)%>: <%= QboItem.count %>
- Employee Count: <%= QboEmployee.count %>
+ <%=t(:label_employee_count)%>: <%= QboEmployee.count %>
- Invoice Count: <%= QboInvoice.count %>
+ <%=t(:label_invoice_count)%>: <%= QboInvoice.count %>
- Estimate Count: <%= QboEstimate.count %>
+ <%=t(:label_estimate_count)%>: <%= QboEstimate.count %>
- Last Sync: <%= Qbo.last_sync if Qbo.exists? %> <%= link_to " Sync Now", qbo_sync_path %>
+ <%=t(:label_last_sync)%> <%= Qbo.last_sync if Qbo.exists? %> <%= link_to " Sync Now", qbo_sync_path %>
diff --git a/app/views/qbo/_stats.html.erb b/app/views/qbo/_stats.html.erb
index 0fb334f..b0f8907 100644
--- a/app/views/qbo/_stats.html.erb
+++ b/app/views/qbo/_stats.html.erb
@@ -1 +1 @@
-<%= Customer.count %> Customers - <%= render :partial => 'qbo/last_sync' %>
+<%= Customer.count %> <%=t(:field_customers)%> - <%= render :partial => 'qbo/last_sync' %>
diff --git a/app/views/qbo/index.html.erb b/app/views/qbo/index.html.erb
index 5f97254..b9924a9 100644
--- a/app/views/qbo/index.html.erb
+++ b/app/views/qbo/index.html.erb
@@ -11,32 +11,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
-->
- Redmine Quickbooks
+ <%=t(:label_redmine_qbo)%>
- Customer Count: <%= @customer_count.to_s%>
+ <%=t(:label_customer_count)%>: <%= @customer_count.to_s%>
- Item Count: <%= @qbo_item_count.to_s %>
+ <%=t(:label_item_count)%>: <%= @qbo_item_count.to_s %>
- Employee Count: <%= @qbo_employee_count.to_s %>
+ <%=t(:label_employee_count)%>: <%= @qbo_employee_count.to_s %>
- Invoice Count: <%= @qbo_invoice_count.to_s %>
+ <%=t(:label_invoice_count)%>: <%= @qbo_invoice_count.to_s %>
- Estimate Count: <%= @qbo_estimate_count.to_s %>
+ <%=t(:label_estimate_count)%>: <%= @qbo_estimate_count.to_s %>
- Last Sync: <%= Qbo.last_sync if Qbo.exists? %>
+ <%=t(:label_last_sync)%>: <%= Qbo.last_sync if Qbo.exists? %>
diff --git a/app/views/vehicles/_details.html.erb b/app/views/vehicles/_details.html.erb
index 207f1b2..65e6a69 100644
--- a/app/views/vehicles/_details.html.erb
+++ b/app/views/vehicles/_details.html.erb
@@ -2,36 +2,34 @@
- | Customer |
+ <%= t(:field_customer)%> |
<%= link_to vehicle.customer.name, customer_path(vehicle.customer) %> |
- | Vehicle |
+ <%= t(:field_vehicle) %> |
<%= vehicle.to_s %> |
- | VIN |
+ <%= t(:field_vin) %> |
<%= @vin[0] if @vin %><%=@vin[1] if @vin%> |
- | Notes |
+ <%= t(:field_notes) %> |
<%= vehicle.notes %> |
- | Issues |
+ <%= t(:issues) %> |
<%= vehicle.issues.count %> |
- |
-
- <%= button_to "Edit", edit_vehicle_path(vehicle), method: :get%>
- <%= button_to "Delete", vehicle, method: :delete, data: {confirm: "You sure?"} %>
+ <%= button_to t(:label_edit), edit_vehicle_path(vehicle), method: :get%>
+ <%= button_to t(:label_delete), vehicle, method: :delete, data: {confirm: t(:warn_ru_sure)} %>
|
diff --git a/app/views/vehicles/_form.html.erb b/app/views/vehicles/_form.html.erb
index 8de9048..4026130 100644
--- a/app/views/vehicles/_form.html.erb
+++ b/app/views/vehicles/_form.html.erb
@@ -4,43 +4,43 @@
<%= form_for @vehicle do |f| %>
- Customer:
-
- <%= f.autocomplete_field :customer, autocomplete_customer_name_customers_path, :value => @customer.name, :update_elements => {:id => '#customer_id', :value => '#issue_customer'}, :required => true %>
- <%= f.hidden_field :customer_id, :id => "customer_id", :value => @customer.id %>
-
+ <%=t(:field_customer)%>:
+
+ <%= f.autocomplete_field :customer, autocomplete_customer_name_customers_path, :value => @customer.name, :update_elements => {:id => '#customer_id', :value => '#issue_customer'}, :required => true %>
+ <%= f.hidden_field :customer_id, :id => "customer_id", :value => @customer.id %>
+
- Year:
+ <%=t(:label_year)%>:
<%= f.number_field :year %>
- Make:
+ <%=t(:label_make)%>:
<%= f.text_field :make %>
- Model:
+ <%=t(:label_model)%>:
<%= f.text_field :model %>
- VIN:
+ <%=t(:field_vin)%>:
<%= f.text_field :vin , :autofocus => true %>
- Notes:
+ <%=t(:field_notes)%>:
<%= f.text_area :notes, :cols => 60, :rows => 10, :no_label => true %>
diff --git a/app/views/vehicles/_list.html.erb b/app/views/vehicles/_list.html.erb
index 6930783..923df94 100644
--- a/app/views/vehicles/_list.html.erb
+++ b/app/views/vehicles/_list.html.erb
@@ -21,8 +21,8 @@
<%= will_paginate @vehicles %>
-Matching <%= @vehicles.count %> Vehicles
+<%=t(:label_matching)%> <%=@vehicles.count%> <%=t(:field_vehicles) %>
<% else %>
- There are no vehicles containing the term(s) <%= params[:search] %>.
+ <%=t(:label_no_vehicles)%> <%= params[:search] %>.
<% end %>
diff --git a/app/views/vehicles/_search.html.erb b/app/views/vehicles/_search.html.erb
index 797e4c1..51169d6 100644
--- a/app/views/vehicles/_search.html.erb
+++ b/app/views/vehicles/_search.html.erb
@@ -1,4 +1,4 @@
<%= form_tag(vehicles_path, :method => "get", id: "search-form") do %>
- <%= text_field_tag :search, params[:search], placeholder: "Search Vehicles by VIN" %>
- <%= submit_tag "Search" %>
+ <%= text_field_tag :search, params[:search], placeholder: t(:label_seach_vin) %>
+ <%= submit_tag t(:label_search) %>
<% end %>
diff --git a/app/views/vehicles/edit.html.erb b/app/views/vehicles/edit.html.erb
index 624eda8..9490f6b 100644
--- a/app/views/vehicles/edit.html.erb
+++ b/app/views/vehicles/edit.html.erb
@@ -1,3 +1,3 @@
-Edit Customer Vehicle
+<%=t(:label_edit_customer_vehicle)%>
<%= render :partial => 'vehicles/form' %>
diff --git a/app/views/vehicles/index.html.erb b/app/views/vehicles/index.html.erb
index 4bab684..2538e89 100644
--- a/app/views/vehicles/index.html.erb
+++ b/app/views/vehicles/index.html.erb
@@ -1,4 +1,4 @@
-Customer Vehicles <%= render :partial => 'vehicles/search' %>
+<%=t(:label_cusomer_vehicles)%> <%= render :partial => 'vehicles/search' %>
<%= render :partial => 'vehicles/list' %>
diff --git a/app/views/vehicles/new.html.erb b/app/views/vehicles/new.html.erb
index f4abf57..b99af4d 100644
--- a/app/views/vehicles/new.html.erb
+++ b/app/views/vehicles/new.html.erb
@@ -1,3 +1,3 @@
-New Customer Vehicle
+<%=t(:label_new_vehicle)%>
<%= render :partial => 'vehicles/form' %>
diff --git a/app/views/vehicles/show.html.erb b/app/views/vehicles/show.html.erb
index 50df914..ff8f527 100644
--- a/app/views/vehicles/show.html.erb
+++ b/app/views/vehicles/show.html.erb
@@ -1,14 +1,14 @@
-Vehicle #<%=@vehicle.id%> <%= render :partial => 'customers/search' %>
+<%=t(:field_vehicle)%> #<%=@vehicle.id%> <%= render :partial => 'customers/search' %>
<%= render :partial => 'vehicles/details', locals: {vehicle: @vehicle} %>
-
Open Issues
+
<%=t(:label_open_issues)%>
<%= render :partial => 'issues/list_simple', locals: {issues: @vehicle.issues.open} %>
-
Closed Issues
+
<%=t(:label_closed_issues)%>
<%= render :partial => 'issues/list_simple', locals: {issues: (@vehicle.issues - @vehicle.issues.open)} %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 175a932..dc7946d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -24,4 +24,53 @@ en:
field_qbo_billed: "Billed"
label_week: "Week"
label_search_estimates: "Search Estimates"
- label_search: "Search"
\ No newline at end of file
+ label_search: "Search"
+ label_estimates: "Estimates"
+ label_401: "Not Authorized"
+ warn_ru_sure: "You sure?"
+ label_delete: "Delete"
+ label_edit: "Edit"
+ label_year: "Year"
+ label_make: " Make"
+ label_model: "Model"
+ label_no_vehicles: "There are no vehicles containing the term(s)"
+ label_no_customers: "There are no customers containing the term(s)"
+ label_matching: "Matching "
+ label_search_vin: "Search Vehicles by VIN"
+ label_edit_customer_vehicle: "Edit Customer Vehicle"
+ label_cusomer_vehicles: "Customer Vehicles"
+ label_new_vehicle: "New Customer Vehicle"
+ label_open_issues: "Open Issues"
+ label_closed_issues: "Closed Issues"
+ label_sync: "Sync"
+ label_new_customer: "New Customer"
+ label_search_customers: "Search Customers"
+ label_customers: "Customers"
+ label_edit_customer: "Edit Customer"
+ label_email: "Email"
+ label_primary_phone: "Primary Phone"
+ label_mobile_phone: "Mobile Phone"
+ label_billing_address: "Billing Address"
+ label_shipping_address: "Shipping Address"
+ label_account_balance: "Account Balance"
+ label_balance_with_jobs: "Balance With Jobs"
+ label_display_name: "Display Name"
+ label_details: "Details"
+ label_customer_link_expires: "This customer link expires in"
+ label_new_payment: "New Payment"
+ label_amount: "Amount"
+ label_payment_method: "Payment Method"
+ label_deposit_into: "Deposit to Account"
+ label_last_sync: "Last Sync"
+ label_redmine_qbo: "Redmine Quickbooks"
+ label_customer_count: "Customer Count"
+ label_invoice_count: "Invoice Count"
+ label_estimate_count: "Estimate Count"
+ label_item_count: "Item Count"
+ label_employee_count: "Employee Count"
+ label_client_id: "Intuit QBO OAuth2 Client ID"
+ label_client_secret: "Intuit QBO OAuth2 Client Secret"
+ label_webhook_token: "Intuit QBO Webhook Token"
+ label_oauth_expires: "OAuth2 Access Token Expires At"
+ label_oauth_note: "Note: You need to authenticate with Quickbooks after saving your key and secret above"
+ field_customers: "Customers"
\ No newline at end of file