Skip to content

A local-first personal finance app

fix "delete x users" translation string (#5045)

Matt Fiddamand4b09ecb2774
diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx
index a9c7e6cadf..90c8f16907 100644
--- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx
+++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx
@@ -107,6 +107,8 @@ function UserDirectoryContent({
).slice(0, 100 + page * 50);
}, [allUsers, filter, page]);
const selectedInst = useSelected('manage-users', allUsers, []);
+ const selectedCount = selectedInst.items.size;
+
const [hoveredUser, setHoveredUser] = useState(null);
const onSearchChange = useCallback(
@@ -326,7 +328,9 @@ function UserDirectoryContent({
<Stack direction="row" align="center" justify="flex-end" spacing={2}>
{selectedInst.items.size > 0 && (
<Button onPress={onDeleteSelected}>
- <Trans>Delete {{ count: selectedInst.items.size }} users</Trans>
+ <Trans count={selectedCount}>
+ Delete {{ selectedCount }} users
+ </Trans>
</Button>
)}
<Button variant="primary" onPress={onAddUser}>
diff --git a/upcoming-release-notes/5045.md b/upcoming-release-notes/5045.md
new file mode 100644
index 0000000000..1f4df3c201
--- /dev/null
+++ b/upcoming-release-notes/5045.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [matt-fidd]
+---
+
+Fix "delete x users" translation string