diff --git a/CHANGELOG.md b/CHANGELOG.md index 162798d3..8d636e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] - + +### Changed +- I18n: Rename `operation.error.oauth_access_token_notify_required` key to `operation.error.oauth.access_token_notify_required` + ## [1.0.1] - 2023-06-02 ### Fixed diff --git a/docs/14-I18N.md b/docs/14-I18N.md index 4f82bc11..93eed2d0 100644 --- a/docs/14-I18N.md +++ b/docs/14-I18N.md @@ -218,6 +218,7 @@ en: user_not_found: User does not exist oauth: + access_token_notify_required: OAuth access token notification was not set client_id_required: Client ID is required client_inactive: Client is inactive client_not_authorized: Client is not allowed to perform this action diff --git a/spec/shield/operations/mixins/save_user_settings_spec.cr b/spec/shield/operations/mixins/save_user_settings_spec.cr index 9eb94287..71ebf40a 100644 --- a/spec/shield/operations/mixins/save_user_settings_spec.cr +++ b/spec/shield/operations/mixins/save_user_settings_spec.cr @@ -101,7 +101,7 @@ describe Shield::SaveUserSettings do user.should be_nil operation.oauth_access_token_notify.should have_error( - "operation.error.oauth_access_token_notify_required" + "operation.error.oauth.access_token_notify_required" ) end end diff --git a/spec/shield/operations/save_user_options_spec.cr b/spec/shield/operations/save_user_options_spec.cr index 5298e987..33793118 100644 --- a/spec/shield/operations/save_user_options_spec.cr +++ b/spec/shield/operations/save_user_options_spec.cr @@ -111,7 +111,7 @@ describe Shield::SaveUserOptions do user_options.should be_nil operation.oauth_access_token_notify - .should(have_error "operation.error.oauth_access_token_notify_required") + .should(have_error "operation.error.oauth.access_token_notify_required") end end end diff --git a/src/shield/operations/mixins/save_oauth_client_user_options.cr b/src/shield/operations/mixins/save_oauth_client_user_options.cr index 2eafcfbd..fc402c9d 100644 --- a/src/shield/operations/mixins/save_oauth_client_user_options.cr +++ b/src/shield/operations/mixins/save_oauth_client_user_options.cr @@ -8,7 +8,7 @@ module Shield::SaveOauthClientUserOptions private def validate_oauth_access_token_notify_required validate_required oauth_access_token_notify, - message: Rex.t(:"operation.error.oauth_access_token_notify_required") + message: Rex.t(:"operation.error.oauth.access_token_notify_required") end end end diff --git a/src/shield/operations/mixins/save_oauth_client_user_settings.cr b/src/shield/operations/mixins/save_oauth_client_user_settings.cr index 789a3a24..fcc2cd8a 100644 --- a/src/shield/operations/mixins/save_oauth_client_user_settings.cr +++ b/src/shield/operations/mixins/save_oauth_client_user_settings.cr @@ -11,7 +11,7 @@ module Shield::SaveOauthClientUserSettings return unless new_record? validate_required oauth_access_token_notify, - message: Rex.t(:"operation.error.oauth_access_token_notify_required") + message: Rex.t(:"operation.error.oauth.access_token_notify_required") end private def set_oauth_access_token_notify