Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

gettext: missing ValueErrors on seven function pages

オープン
#6,001 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php, xml
領域
documentation

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
XML
スター
602
フォーク
904
平均マージ
1日 8時間
マージ済み PR(30日)
87

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php/doc-en のほかの issue

php/doc-en の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。