From d619a0250f821329950e601014f1f3bb0a31f6d2 Mon Sep 17 00:00:00 2001 From: Life Date: Sun, 29 Mar 2026 16:38:42 +0200 Subject: [PATCH 1/3] Replace static text with localized strings in UserProfileView --- src/components/user-profile/UserProfileView.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/user-profile/UserProfileView.tsx b/src/components/user-profile/UserProfileView.tsx index 20fc0e7..b294346 100644 --- a/src/components/user-profile/UserProfileView.tsx +++ b/src/components/user-profile/UserProfileView.tsx @@ -145,16 +145,16 @@ export const UserProfileView: FC<{}> = props => onTabClick('badge') }> - Badge + { LocalizeText('extendedprofile.tab.badge') } onTabClick('amici') }> - Amici + { LocalizeText('extendedprofile.tab.friends') } onTabClick('stanze') }> - Stanze + { LocalizeText('extendedprofile.tab.rooms') } onTabClick('gruppi') }> - Gruppi + { LocalizeText('extendedprofile.tab.groups') }
@@ -166,7 +166,7 @@ export const UserProfileView: FC<{}> = props => )) : ( - Nessun badge da mostrare + { LocalizeText('extendedprofile.badge.empty') } ) } @@ -178,7 +178,7 @@ export const UserProfileView: FC<{}> = props => ) : ( - Caricamento... + { LocalizeText('generic.loading') } ) }
@@ -187,12 +187,12 @@ export const UserProfileView: FC<{}> = props =>
{ !userRooms && ( - Caricamento stanze... + { LocalizeText('extendedprofile.rooms.loading') } ) } { userRooms && userRooms.length === 0 && ( - Nessuna stanza trovata + { LocalizeText('extendedprofile.rooms.empty') } ) } { userRooms && userRooms.length > 0 && userRooms.map(room => ( From 3e515e234ec0eae10407349639959b40c38f35db Mon Sep 17 00:00:00 2001 From: Life Date: Sun, 29 Mar 2026 16:45:14 +0200 Subject: [PATCH 2/3] fix: replace dangerouslySetInnerHTML with safe rendering in UserContainerView - Remove dangerouslySetInnerHTML for creation date and last login fields which caused corrupted display - Use separate LocalizeText keys with safe React rendering instead - Add missing friends count display New external_texts keys required: extendedprofile.created.title, extendedprofile.last.login.title, extendedprofile.friends.count --- src/components/user-profile/UserContainerView.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/user-profile/UserContainerView.tsx b/src/components/user-profile/UserContainerView.tsx index ed357b0..dd2db05 100644 --- a/src/components/user-profile/UserContainerView.tsx +++ b/src/components/user-profile/UserContainerView.tsx @@ -41,8 +41,15 @@ export const UserContainerView: FC<{

{ userProfile.motto }

-

-

+

+ { LocalizeText('extendedprofile.created.title') } { userProfile.registration } +

+

+ { LocalizeText('extendedprofile.last.login.title') } { FriendlyTime.format(userProfile.secondsSinceLastVisit, '.ago', 2) } +

+

+ { LocalizeText('extendedprofile.friends.count') } { userProfile.friendsCount } +

{ LocalizeText('extendedprofile.achievementscore') } { userProfile.achievementPoints }

From 2a220eaa4db9fe1bfbde1c4f4825370898ef7f4c Mon Sep 17 00:00:00 2001 From: Life Date: Sun, 29 Mar 2026 16:47:36 +0200 Subject: [PATCH 3/3] fix: restore dangerouslySetInnerHTML for created/last login, keep friends count dangerouslySetInnerHTML is needed for compatibility with existing external_texts keys that contain HTML markup (e.g. Created:). Only the missing friends count line is added. --- src/components/user-profile/UserContainerView.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/user-profile/UserContainerView.tsx b/src/components/user-profile/UserContainerView.tsx index dd2db05..a6b3a00 100644 --- a/src/components/user-profile/UserContainerView.tsx +++ b/src/components/user-profile/UserContainerView.tsx @@ -41,12 +41,8 @@ export const UserContainerView: FC<{

{ userProfile.motto }

-

- { LocalizeText('extendedprofile.created.title') } { userProfile.registration } -

-

- { LocalizeText('extendedprofile.last.login.title') } { FriendlyTime.format(userProfile.secondsSinceLastVisit, '.ago', 2) } -

+

+

{ LocalizeText('extendedprofile.friends.count') } { userProfile.friendsCount }