Moved strings for notices to en.yml

This commit is contained in:
2025-06-16 22:56:54 -04:00
parent 166a9ee31b
commit f22795ac90
2 changed files with 6 additions and 5 deletions

View File

@@ -51,9 +51,9 @@ class QboController < ApplicationController
qbo.refresh_token! qbo.refresh_token!
if qbo.save! if qbo.save!
redirect_to qbo_sync_path, :flash => { :notice => "Successfully connected to Quickbooks" } redirect_to qbo_sync_path, :flash => { :notice => I18n.t(:label_connected) }
else else
redirect_to plugin_settings_path(:redmine_qbo), :flash => { :error => "Error" } redirect_to plugin_settings_path(:redmine_qbo), :flash => { :error => I18n.t(:label_error) }
end end
end end
@@ -65,9 +65,9 @@ class QboController < ApplicationController
i = Issue.find_by_id params[:id] i = Issue.find_by_id params[:id]
if i.customer if i.customer
i.bill_time i.bill_time
redirect_to i, :flash => { :notice => "Successfully Billed #{i.customer.name}" } redirect_to i, :flash => { :notice => I18n.t(:label_billed_success) + i.customer.name }
else else
redirect_to i, :flash => { :error => "Cannot bill without a customer assigned" } redirect_to i, :flash => { :error => I18n.t(:label_billing_error) }
end end
end end
@@ -152,6 +152,6 @@ class QboController < ApplicationController
ActiveRecord::Base.connection.close ActiveRecord::Base.connection.close
end end
redirect_to :home, :flash => { :notice => "Syncing Quickbooks" } redirect_to :home, :flash => { :notice => I18n.t(:label_syncing) }
end end
end end

View File

@@ -92,3 +92,4 @@ en:
label_appointment: "Add Appointment" label_appointment: "Add Appointment"
label_actions: "Actions" label_actions: "Actions"
label_create_estimate: "Create Estimate" label_create_estimate: "Create Estimate"
label_syncing: "Syncing Quickbooks"