Skip to content

Fix incorrect translation key for parameter_not_allowed.detail#1469

Open
pozzer wants to merge 3 commits into
JSONAPI-Resources:masterfrom
pozzer:fix-arameters_not_allowed-detail-key
Open

Fix incorrect translation key for parameter_not_allowed.detail#1469
pozzer wants to merge 3 commits into
JSONAPI-Resources:masterfrom
pozzer:fix-arameters_not_allowed-detail-key

Conversation

@pozzer

@pozzer pozzer commented Feb 28, 2025

Copy link
Copy Markdown

Closes https://github.com/cerebris/jsonapi-resources/issues/1468.

All Submissions:

  • I've checked to ensure there aren't other open Pull Requests for the same update/change.
  • I've submitted a ticket for my issue if one did not already exist.
  • My submission passes all tests. (I ran the full test suite locally to avoid unnecessary failures.)
  • I've used Github auto-closing keywords in the commit message or the description.
  • I've added/updated tests for this change.

Bug fixes and Changes to Core Features:

  • I've included an explanation of what the changes do and why I'd like you to include them.
  • I've provided test(s) that fail without the change.

Test Plan:

The issue occurs because the translation key being used in the code is incorrect.
The code currently looks for parameters_not_allowed.detail (plural), but the correct key in the translation files is parameter_not_allowed.detail (singular).

  • Added a test to verify that the correct key (parameter_not_allowed.detail) is used.
  • Without the fix, the test fails because the translation isn't found, falling back to the default English message.
  • With the fix, the test correctly retrieves the translation.

Reviewer Checklist:

  • Maintains compliance with JSON:API
  • Adequate test coverage exists to prevent regressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant