[web-php] master: Remove special cases for the gettext shorthand function (#1029)
| From: | Maurício Meneghini Fauth via GitHub | Date: | Fri, 19 Jul 2024 23:17:45 +0000 |
| Subject: | [web-php] master: Remove special cases for the gettext shorthand function (#1029) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-31843@lists.php.net to get a copy of this message | ||
Author: Maurício Meneghini Fauth (MauricioFauth)
Committer: GitHub (web-flow)
Pusher: sy-records
Date: 2024-07-20T07:17:41+08:00
Commit: https://github.com/php/web-php/commit/96d1508e8fa7cdd53790e74cf9a7ae961b01bb20
Raw diff: https://github.com/php/web-php/commit/96d1508e8fa7cdd53790e74cf9a7ae961b01bb20.diff
Remove special cases for the gettext shorthand function (#1029)
- Related to https://github.com/php/doc-en/pull/3556
Changed paths:
M error.php
M include/manual-lookup.inc
Diff:
diff --git a/error.php b/error.php
index ff4f8f03bc..f240ea11ec 100644
--- a/error.php
+++ b/error.php
@@ -400,7 +400,6 @@
"links" => "support", // BC
"links.php" => "support", // BC
"oracle" => "oci8",
- "_" => "function.gettext",
"cli" => "features.commandline",
"oop" => "language.oop5",
diff --git a/include/manual-lookup.inc b/include/manual-lookup.inc
index 0ba47d77c6..9d3ff4d141 100644
--- a/include/manual-lookup.inc
+++ b/include/manual-lookup.inc
@@ -126,10 +126,8 @@ function find_manual_page($lang, $keyword)
// English one in case no page is found
$langs = ($lang != 'en') ? [$lang, 'en'] : ['en'];
- // Reformat keyword, drop anything in parenthesis --- except a search for the underscore only.
(Bug #63490)
- if ($keyword != '_') {
- $keyword = str_replace('_', '-', $keyword);
- }
+ // Reformat keyword, drop anything in parentheses
+ $keyword = str_replace('_', '-', $keyword);
if (strpos($keyword, '(') !== false) {
$keyword = preg_replace("!\\(.*\\)!", "-", $keyword);
}