mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-18 16:19:34 +00:00
Use mb_strtoupper with mb_substr for Unicode consistency
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
parent
97f4d22292
commit
9e095ec1c8
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,8 @@ readonly class RegisterSynonymsAsTranslationParametersListener
|
|||
$placeholders['{{' . $elementType->value . '}}'] = mb_strtolower($capitalizedPlural);
|
||||
|
||||
// Square brackets for capitalized versions (with capital first letter in placeholder)
|
||||
$capitalizedKey = ucfirst($elementType->value);
|
||||
// Use mb_strtoupper for the first character to handle multibyte strings consistently
|
||||
$capitalizedKey = mb_strtoupper(mb_substr($elementType->value, 0, 1)) . mb_substr($elementType->value, 1);
|
||||
$placeholders['[' . $capitalizedKey . ']'] = $capitalizedSingular;
|
||||
$placeholders['[[' . $capitalizedKey . ']]'] = $capitalizedPlural;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue