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

gettext: missing ValueErrors on seven function pages

Đang mở
#6,001 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
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php, xml
Lĩnh vực
documentation

Hướng nghiên cứu

Start with the seven XML pages under reference/gettext/functions/ and the existing dgettext() page for the expected errors-section wording and <simpara> structure. Check ext/gettext/gettext.c and the cited PHP versions to verify each ValueError, false return, and version threshold. Done means every listed page has a complete errors section, bind_textdomain_codeset() documents string|false, and matching changelog rows are added.

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

Mô tả

bug
Affected page

reference/gettext/functions/dcgettext.xml
reference/gettext/functions/dcngettext.xml
reference/gettext/functions/gettext.xml
reference/gettext/functions/ngettext.xml
reference/gettext/functions/textdomain.xml
reference/gettext/functions/bindtextdomain.xml
reference/gettext/functions/bind-textdomain-codeset.xml

Issue description

These pages have no errors section, or an incomplete one, and no matching changelog row:

  • dcgettext(), dcngettext(): ValueError for an empty or over 1024 byte domain, an over 4096 byte message/singular/plural, and LC_ALL as category (the empty domain and LC_ALL cases as of 8.4.0, the length cases as of 8.0.0).
  • gettext(), ngettext(): ValueError for an over 4096 byte message/singular/plural (8.0.0).
  • textdomain(), bind_textdomain_codeset(): the over 1024 byte domain is missing, and for textdomain() also "0" (8.4.0).
  • bindtextdomain(): empty or over 1024 byte domain; directory "0" or "" means the current directory, and the path must exist or false is returned.
  • bind_textdomain_codeset() returns string|false, the page only says string.
Steps to reproduce
try { dcgettext("", "x", LC_MESSAGES); } catch (Throwable $e) { echo $e->getMessage(); }

Output: dcgettext(): Argument #1 ($domain) must not be empty

Suggested fix

Add the errors section and changelog rows (same wording as the existing dgettext() page), use <simpara>. Sources: ext/gettext/gettext.c (php-8.0.0, php-8.4.0, php-8.5.9).

Ngôn ngữ chính
XML
Star
602
Fork
904
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
87

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 php/doc-en

Tất cả issue của php/doc-en

Issue tương tự

Thêm issue về Documentation

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.