Fix incorrect translation key for parameter_not_allowed.detail
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
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JSONAPI-Resources/jsonapi-resources
-
ArgumentError with Rails 8.1 Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
JSONAPI-Resources/jsonapi-resources#1488 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
JSONAPI-Resources/jsonapi-resources#1479 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
JSONAPI-Resources/jsonapi-resources#1477 · 3 bình luận · 1 reaction ·
-
Fields filtering with include Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
JSONAPI-Resources/jsonapi-resources#1473 · 1 bình luận ·
Tất cả issue của JSONAPI-Resources/jsonapi-resources
Issue tương tự
-
バグ
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Version bump for OpenVox 9 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
voxpupuli/puppet-epel#186 · 1 bình luận ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) Đang mởBug Frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
TheOdinProject/curriculum#31402 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100