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

@@ -48,7 +48,7 @@ class InvoiceController < ApplicationController
send_data @pdf, filename: "invoice #{ref}.pdf", disposition: :inline, type: "application/pdf"
end
rescue
redirect_to :back, flash: { error: "Invoice not found" }
redirect_to :back, flash: { error: I18n.t(:notice_invoice_not_found) }
end
end
end