Fix incorrect translation key for parameter_not_allowed.detail

Đang mở Phù hợp với người mới
#1,468 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu từ lệnh gọi I18n.translate được hiển thị trong issue và so sánh khóa tra cứu của nó với khóa số ít trong các tệp bản dịch. Được xem là hoàn tất khi exception phân giải bản dịch parameter_not_allowed.detail đã định nghĩa thay vì fallback về thông báo tiếng Anh mặc định; không có tệp hoặc test cụ thể nào được nêu tên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

The gem is looking for the translation key parameters_not_allowed.detail (plural), but the key is correctly defined as parameter_not_allowed.detail (singular) in the code. Because of this mismatch, the translation is not found, and the default English message is shown.

Code with the Issue

Here’s the problematic code:

title: I18n.translate('jsonapi-resources.exceptions.parameters_not_allowed.detail',
                       default: "#{param} is not allowed.", param: param)
Expected Behavior

The code should look for the translation key parameter_not_allowed.detail (singular), as this is the correct key defined in the translation files. For example:

title: I18n.translate('jsonapi-resources.exceptions.parameter_not_allowed.detail',
                       default: "#{param} is not allowed.", param: param)
Solution

Update the code to use the correct translation key: parameter_not_allowed.detail (singular), ensuring it matches the key defined in the translation files.

Ngôn ngữ chính
Ruby
Star
2.3k
Fork
546
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JSONAPI-Resources/jsonapi-resources

Tất cả issue của JSONAPI-Resources/jsonapi-resources

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.