diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php index ae417a91..71dba465 100644 --- a/Web/Models/Entities/User.php +++ b/Web/Models/Entities/User.php @@ -145,14 +145,22 @@ class User extends RowModel return iterator_to_array($avPhotos)[0] ?? NULL; } - function getFirstName(): string + function getFirstName(bool $pristine = false): string { - return $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->first_name, MB_CASE_TITLE); + $name = $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->first_name, MB_CASE_TITLE); + if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine) + return transliterator_transliterate($ts, $name); + else + return $name; } - function getLastName(): string + function getLastName(bool $pristine = false): string { - return $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->last_name, MB_CASE_TITLE); + $name = $this->getRecord()->deleted ? "DELETED" : mb_convert_case($this->getRecord()->last_name, MB_CASE_TITLE); + if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine) + return transliterator_transliterate($ts, $name); + else + return $name; } function getPseudo(): ?string diff --git a/Web/Presenters/templates/User/Edit.xml b/Web/Presenters/templates/User/Edit.xml index 3342bcca..2ebc21c5 100644 --- a/Web/Presenters/templates/User/Edit.xml +++ b/Web/Presenters/templates/User/Edit.xml @@ -43,7 +43,7 @@ {_"name"}: - + @@ -51,7 +51,7 @@ {_"surname"}: - + diff --git a/locales/en.strings b/locales/en.strings index b607aaea..2e733ede 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -1,4 +1,5 @@ "__locale" = "en_US.UTF-8;Eng"; +"__transNames" = "Latin"; /* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */