From 59ecaafac0536e2d47e1624436bf98a56ba5a4d1 Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Sat, 3 May 2025 09:02:21 +0100 Subject: [PATCH] Revert "Issue #3478408 by jaydev bhatt, quietone, goonerw: Fix errors in update-countries.sh" This reverts commit 61dfd43e036186c290f885d8c850e46b39af1c02. (cherry picked from commit 85836e3cc7e5e086a8554b539635aa7484be5cbc) --- core/scripts/update-countries.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/core/scripts/update-countries.sh b/core/scripts/update-countries.sh index 59f04b196ee6..52676e9f30bb 100755 --- a/core/scripts/update-countries.sh +++ b/core/scripts/update-countries.sh @@ -35,16 +35,6 @@ exit('CLDR data file not found. (' . $uri . ")\n\n" . $usage . "\n"); } -// Fake the t() function used in CountryManager.php instead of attempting a full -// Drupal bootstrap of core/includes/bootstrap.inc (where t() is declared). -if (!function_exists('t')) { - - function t($string): string { - return $string; - } - -} - // Read in existing codes. // @todo Allow to remove previously existing country codes. // @see https://www.drupal.org/node/1436754 @@ -103,7 +93,7 @@ function t($string): string { foreach ($countries as $code => $name) { // For .po translation file's sake, use double-quotes instead of escaped // single-quotes. - $name = str_contains($name, '\'') ? '"' . $name . '"' : "'" . $name . "'"; + $name = str_contains($name, '\'' ? '"' . $name . '"' : "'" . $name . "'"); $out .= ' ' . var_export($code, TRUE) . ' => t(' . $name . '),' . "\n"; } -- GitLab