diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee index 7e800965c..3ccfbdb05 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -493,9 +493,12 @@ class App.ControllerForm extends App.Controller return if !attribute.options selection = attribute.options attribute.options = [] - for key of selection + for key, value of selection + name_new = value + if attribute.translate + name_new = App.i18n.translateInline( name_new ) attribute.options.push { - name: selection[key], + name: name_new, value: key, } diff --git a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee index 3d2691aaa..976f7fe8b 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee @@ -177,6 +177,7 @@ class Settings extends App.ControllerModal tag: 'checkbox', default: @overview.view.d.overview, null: false, + translate: true options: { number: 'Number', title: 'Title', @@ -185,7 +186,7 @@ class Settings extends App.ControllerModal ticket_priority: 'Priority', group: 'Group', owner: 'Owner', - created_at: 'Alter', + created_at: 'Age', last_contact: 'Last Contact', last_contact_agent: 'Last Contact Agent', last_contact_customer: 'Last Contact Customer', @@ -202,6 +203,7 @@ class Settings extends App.ControllerModal tag: 'select', default: @overview.order.by, null: false, + translate: true options: { number: 'Number', title: 'Title', @@ -210,7 +212,7 @@ class Settings extends App.ControllerModal ticket_priority: 'Priority', group: 'Group', owner: 'Owner', - created_at: 'Alter', + created_at: 'Age', last_contact: 'Last Contact', last_contact_agent: 'Last Contact Agent', last_contact_customer: 'Last Contact Customer', @@ -226,6 +228,7 @@ class Settings extends App.ControllerModal tag: 'select', default: @overview.order.direction, null: false, + translate: true options: { ASC: 'up', DESC: 'down', diff --git a/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee index 77abd5090..bc7c23e64 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee @@ -378,6 +378,7 @@ class Settings extends App.ControllerModal tag: 'checkbox' default: @overview.view[@view_mode].overview null: false + translate: true options: # true: 'internal' # false: 'public' @@ -388,7 +389,7 @@ class Settings extends App.ControllerModal ticket_priority: 'Priority' group: 'Group' owner: 'Owner' - created_at: 'Alter' + created_at: 'Age' last_contact: 'Last Contact' last_contact_agent: 'Last Contact Agent' last_contact_customer: 'Last Contact Customer' @@ -403,6 +404,7 @@ class Settings extends App.ControllerModal tag: 'select' default: @overview.order.by null: false + translate: true options: number: 'Number' title: 'Title' @@ -411,7 +413,7 @@ class Settings extends App.ControllerModal ticket_priority: 'Priority' group: 'Group' owner: 'Owner' - created_at: 'Alter' + created_at: 'Age' last_contact: 'Last Contact' last_contact_agent: 'Last Contact Agent' last_contact_customer: 'Last Contact Customer' @@ -426,6 +428,7 @@ class Settings extends App.ControllerModal tag: 'select' default: @overview.order.direction null: false + translate: true options: ASC: 'up' DESC: 'down' @@ -438,6 +441,7 @@ class Settings extends App.ControllerModal default: @overview.group_by null: true nulloption: true + translate: true options: customer: 'Customer' ticket_state: 'State' diff --git a/db/seeds.rb b/db/seeds.rb index e3dd2ac44..39e37a366 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1861,12 +1861,19 @@ Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "web", :target => "Web", :updated_by_id => 1, :created_by_id => 1 ) -Translation.create_if_not_exists( :locale => 'de', :source => "Change order", :target => "Reihenfolge �ndern", :updated_by_id => 1, :created_by_id => 1 ) -Translation.create_if_not_exists( :locale => 'de', :source => "Items per page", :target => "Eintr�ge je Seite", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "Change order", :target => "Reihenfolge ändern", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "Group by", :target => "Gruppieren mit", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "Items per page", :target => "Einträge je Seite", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact", :target => "Letzter Kontakt", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Agent", :target => "Letzter Kontakt Agent", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Customer", :target => "Letzter Kontakt Kunde", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "Create an inbound Ticket", :target => "Erstelle ein eingehendes Ticket", :updated_by_id => 1, :created_by_id => 1 ) Translation.create_if_not_exists( :locale => 'de', :source => "Create an outbound Ticket (will send this as email to customer)", :target => "Erstelle ein ausgehendes Ticket (wird per E-Mail an den Kunden gesendet)", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "Age", :target => "Alter", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "Article Count", :target => "Artikel Anzahl", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "Close Time", :target => "Schließzeit", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "First Response", :target => "Erste Reaktion", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "up", :target => "auf", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create_if_not_exists( :locale => 'de', :source => "down", :target => "ab", :updated_by_id => 1, :created_by_id => 1 ) #Translation.create_if_not_exists( :locale => 'de', :source => "", :target => "", :updated_by_id => 1, :created_by_id => 1 )