Add I18n support for flash messages and update locale file with new notices

This commit is contained in:
2026-01-30 20:19:12 -05:00
parent 5b31459629
commit e6818958ae
4 changed files with 26 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ class EstimateController < ApplicationController
begin
send_data estimate.pdf, filename: "estimate #{estimate.doc_number}.pdf", disposition: :inline, type: "application/pdf"
rescue
redirect_to :back, flash: { error: "Estimate not found" }
redirect_to :back, flash: { error: I18n.t(:notice_estimate_not_found) }
end
end
@@ -51,7 +51,7 @@ class EstimateController < ApplicationController
begin
send_data estimate.pdf, filename: "estimate #{estimate.doc_number}.pdf", disposition: :inline, type: "application/pdf"
rescue
redirect_to :back, flash: { error: "Estimate not found" }
redirect_to :back, flash: { error: I18n.t(:notice_estimate_not_found) }
end
end