Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix singular Space count labels

Anand Baburajandae6aeab0247
diff --git a/web/apps/space/src/screens/MessagesScreen.tsx b/web/apps/space/src/screens/MessagesScreen.tsx
index 44bb631f43..0b689d8150 100644
--- a/web/apps/space/src/screens/MessagesScreen.tsx
+++ b/web/apps/space/src/screens/MessagesScreen.tsx
@@ -191,7 +191,10 @@ const messageLikeTooltipLabel = (
likerNames.push(actorName(otherParticipant));
}
if (message.likeCount > likerNames.length) {
- likerNames.push(`${message.likeCount - likerNames.length} others`);
+ const otherCount = message.likeCount - likerNames.length;
+ likerNames.push(
+ `${otherCount} ${otherCount == 1 ? "other" : "others"}`,
+ );
}
return likerNames.filter(Boolean).join(" and ") || "Liked";
};
diff --git a/web/apps/space/src/screens/ProfileScreen.tsx b/web/apps/space/src/screens/ProfileScreen.tsx
index f04cdb622b..9ce6b7d722 100644
--- a/web/apps/space/src/screens/ProfileScreen.tsx
+++ b/web/apps/space/src/screens/ProfileScreen.tsx
@@ -36,8 +36,7 @@ const textSoft = "#777777";
const warning = "#F63A3A";
const coverForeground = "#FFFFFF";
const coverForegroundShadow = "0 1px 5px rgba(0, 0, 0, 0.34)";
-const coverForegroundIconShadow =
- "drop-shadow(0 1px 5px rgba(0, 0, 0, 0.34))";
+const coverForegroundIconShadow = "drop-shadow(0 1px 5px rgba(0, 0, 0, 0.34))";
const coverButtonShadow = "0 1px 5px rgba(0, 0, 0, 0.12)";
const profileCoverBackground = "#1F1F1F";
const profileHeaderHeight = 56;
@@ -505,9 +504,7 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
outline: `2px solid ${green}`,
outlineOffset: 2,
},
- "& svg": {
- filter: coverForegroundIconShadow,
- },
+ "& svg": { filter: coverForegroundIconShadow },
}}
>
<HugeiconsIcon
@@ -597,9 +594,7 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
outline: `2px solid ${green}`,
outlineOffset: 2,
},
- "& svg": {
- filter: coverForegroundIconShadow,
- },
+ "& svg": { filter: coverForegroundIconShadow },
}}
>
<HugeiconsIcon
@@ -794,7 +789,9 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
<Box component="span" sx={{ color: textBase }}>
{postsSharedCount}
</Box>
- <Box component="span">posts</Box>
+ <Box component="span">
+ {postsSharedCount == 1 ? "post" : "posts"}
+ </Box>
<Box component="span">Β·</Box>
<Box
component={canOpenFriends ? "button" : "span"}
@@ -828,7 +825,9 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
<Box component="span" sx={{ color: textBase }}>
{friendsCount}
</Box>
- <Box component="span">friends</Box>
+ <Box component="span">
+ {friendsCount == 1 ? "friend" : "friends"}
+ </Box>
</Box>
</Box>
{postPhotoError && (