Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

checker: deprecation and media type details are not localized

Đang mở
#1,276 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
72/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api, localization

Hướng nghiên cứu

Start in checker/check_api_deprecation.go with formatDeprecationDetails, formatDeprecationDetailsWithSunset and formatMediaTypeDetails, then read getDetailsSuffix (from PR #1273) to see how a localizer plus argument formatter is threaded in and how message ids are defined per locale. Follow that pattern by storing a message id plus arguments on the change instead of a prebuilt English string, updating the locale message files for the new ids. Run the checker test suite to confirm the generated details are localized in colored and uncolored output.

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

Mô tả

Some changes carry a details suffix that is built in English in code rather than taken from the localized messages, so it stays in English when another language is selected:

  • formatDeprecationDetails in checker/check_api_deprecation.go: (stability: beta)
  • formatDeprecationDetailsWithSunset in the same file: (sunset: 2025-01-01, stability: beta)
  • formatMediaTypeDetails, used by the media type walker

The values inside are also written as plain text, while message arguments are bold and quoted in colored output and backticked in uncolored output.

The shared schema detail added in #1273 shows the approach: getDetailsSuffix receives the localizer and the argument formatter, and the labels come from message ids in every locale. These details could follow the same pattern, stored as a message id plus arguments on the change instead of a prebuilt string.

Ngôn ngữ chính
Go
Star
1.4k
Fork
109
Merge trung bình
12 giờ 11 phút
Pull request đã merge (30 ngày)
35

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 oasdiff/oasdiff

Tất cả issue của oasdiff/oasdiff

Issue tương tự

Thêm issue về Go

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.