@@ -32,10 +32,11 @@
- {{ onlyAcceptedMembers(org.members).length }} members
+ {{
+ formatMessage(messages.membersLabel, {
+ count: formatCompactNumber(onlyAcceptedMembers(org.members).length),
+ })
+ }}
@@ -43,7 +44,9 @@
- Make an organization!
+
+ {{ formatMessage(messages.makeOrganizationLabel) }}
+
@@ -54,6 +57,32 @@ import { PlusIcon, Avatar, UsersIcon } from 'omorphia'
import { useAuth } from '~/composables/auth.js'
import OrganizationCreateModal from '~/components/ui/OrganizationCreateModal.vue'
+const { formatMessage } = useVIntl()
+const formatCompactNumber = useCompactNumber()
+
+const messages = defineMessages({
+ createOrganization: {
+ id: 'dashboard.organizations.action.create-organization',
+ defaultMessage: 'Create organization',
+ },
+ fetchOranizationError: {
+ id: 'dashboard.organizations.error.fetch-organization',
+ defaultMessage: 'Failed to fetch organizations',
+ },
+ makeOrganizationLabel: {
+ id: 'dashboard.organizations.make-organization',
+ defaultMessage: 'Make an organization!',
+ },
+ membersLabel: {
+ id: 'dashboard.organizations.members',
+ defaultMessage: '{count, plural, one {{count} member} other {{count} members}}',
+ },
+ title: {
+ id: 'dashboard.organizations.title',
+ defaultMessage: 'Organizations',
+ },
+})
+
const createOrgModal = ref(null)
const auth = await useAuth()
@@ -72,7 +101,7 @@ const onlyAcceptedMembers = (members) => members.filter((member) => member?.acce
if (error.value) {
createError({
statusCode: 500,
- message: 'Failed to fetch organizations',
+ message: formatMessage(message.fetchOranizationError),
})
}