mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
adjustment so that altnames are fully capitalized
This commit is contained in:
parent
aa852ec924
commit
8fca704f74
@ -27,8 +27,7 @@ class PersonEventListener
|
|||||||
} elseif ($event->getObject() instanceof PersonAltName){
|
} elseif ($event->getObject() instanceof PersonAltName){
|
||||||
|
|
||||||
$altname = $event->getObject();
|
$altname = $event->getObject();
|
||||||
$altnameCaps = mb_convert_case(mb_strtolower($altname->getLabel()), MB_CASE_TITLE, 'UTF-8');
|
$altnameCaps = mb_strtoupper($altname->getLabel(), 'UTF-8');
|
||||||
$altnameCaps = ucwords(strtolower($altnameCaps), " \t\r\n\f\v'-");
|
|
||||||
$altname->setLabel($altnameCaps);
|
$altname->setLabel($altnameCaps);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -61,10 +61,9 @@ class PersonCreateEventTest extends TestCase
|
|||||||
|
|
||||||
public function generateAltNames(): iterator
|
public function generateAltNames(): iterator
|
||||||
{
|
{
|
||||||
yield ['vinCENT', 'Vincent'];
|
yield ['vinCENT', 'VINCENT'];
|
||||||
yield ['jean-marie', 'Jean-Marie'];
|
yield ['jean-marie', 'JEAN-MARIE'];
|
||||||
yield ['fastré', 'Fastré'];
|
yield ['fastré', 'FASTRÉ'];
|
||||||
yield ['émile', 'Émile'];
|
yield ['émile', 'ÉMILE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user