🌐 Front: add i18n for anonymous users

This commit is contained in:
Eric Doughty-Papassideris
2024-04-21 22:10:34 +02:00
committed by ericlinagora
parent de0dd72f17
commit 1f32311284
6 changed files with 6 additions and 1 deletions
@@ -5,7 +5,7 @@ export function getFullName(user: Pick<UserType, 'username' | 'first_name' | 'la
let name: string = user?.username;
if (!name) {
return 'Anonymous';
return Languages.t('general.user.anonymous');
}
// @author https://stackoverflow.com/a/17200679
const toNameCase = (str?: string) => (str || '').toLowerCase().replace(/(?<!\p{L})\p{L}(?=\p{L}{2})/gu, (m: string) => m.toUpperCase());