From 9564764633c049f3971e9d5474c7186243e62b7e Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 21 Mar 2023 20:25:47 +0100 Subject: [PATCH] ucfirst Smarty modifier is deprecated See https://github.com/smarty-php/smarty/issues/813 --- classes/Locale.php | 2 +- templates/inc/header.tpl | 2 +- tests/LocaleTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/Locale.php b/classes/Locale.php index bacfc9d..2510ede 100644 --- a/classes/Locale.php +++ b/classes/Locale.php @@ -60,7 +60,7 @@ class Locale */ public function getFullName(): string { - return PHPLocale::getDisplayName($this->getIso15897(), $this->getIso15897()); + return mb_convert_case(PHPLocale::getDisplayName($this->getIso15897(), $this->getIso15897()), MB_CASE_TITLE); } /** diff --git a/templates/inc/header.tpl b/templates/inc/header.tpl index c93f4d3..bd318e3 100644 --- a/templates/inc/header.tpl +++ b/templates/inc/header.tpl @@ -18,7 +18,7 @@ {if $supportedLocale->getCountry()} {$supportedLocale->getCountry()->getEmoji()} {/if} - {$supportedLocale->getFullName()|ucfirst} + {$supportedLocale->getFullName()} {/if} diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index e5949d4..0e0167f 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -54,7 +54,7 @@ class LocaleTest extends ContainerTest */ public function testGetFullName() { - $this->assertEquals('français (France)', $this->localeObject->getFullName()); + $this->assertEquals('Français (France)', $this->localeObject->getFullName()); } /**