Loading core/scripts/update-countries.sh +1 −11 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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"; } Loading Loading
core/scripts/update-countries.sh +1 −11 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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"; } Loading