diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6ccf75546..0e1cc3990 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -52,7 +52,7 @@ class ApplicationController < ActionController::Base cookies.delete(autologin_cookie_name) self.logged_user = nil set_localization - render_error :status => 422, :message => "Invalid form authenticity token." + render_error :status => 422, :message => l(:error_invalid_authenticity_token) end end @@ -683,7 +683,7 @@ class ApplicationController < ActionController::Base def query_statement_invalid(exception) logger.error "Query::StatementInvalid: #{exception.message}" if logger session.delete(:issue_query) - render_error "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator." + render_error l(:error_query_statement_invalid) end # Renders a 204 response for successful updates or deletions via the API diff --git a/config/locales/en.yml b/config/locales/en.yml index 1c5ef1543..0d3d0bcf2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -234,6 +234,8 @@ en: error_can_not_delete_auth_source: "This authentication mode is in use and cannot be deleted." error_spent_on_future_date: "Cannot log time on a future date" error_not_allowed_to_log_time_for_other_users: "You are not allowed to log time for other users" + error_invalid_authenticity_token: "Invalid form authenticity token." + error_query_statement_invalid: "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator." mail_subject_lost_password: "Your %{value} password" mail_body_lost_password: 'To change your password, click on the following link:'