Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

gettext: missing ValueErrors on seven function pages

Abierto
#6,001 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php, xml

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
XML
Estrellas
602
Forks
904
Merge medio
1 d 8 h
PR fusionados (30 d)
87

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de php/doc-en

Todos los issues de php/doc-en

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.