mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
ensure some translations
This commit is contained in:
parent
dfae0c150d
commit
b3c1eb1437
@ -49,7 +49,7 @@ export default function TeamSettings({ teamId }) {
|
|||||||
title={
|
title={
|
||||||
<Breadcrumbs>
|
<Breadcrumbs>
|
||||||
<Item>
|
<Item>
|
||||||
<Link href="/settings/teams">Teams</Link>
|
<Link href="/settings/teams">{formatMessage(labels.teams)}</Link>
|
||||||
</Item>
|
</Item>
|
||||||
<Item>{values?.name}</Item>
|
<Item>{values?.name}</Item>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
@ -6,10 +6,12 @@ import UserDeleteForm from './UserDeleteForm';
|
|||||||
import { ROLES } from 'lib/constants';
|
import { ROLES } from 'lib/constants';
|
||||||
import useMessages from 'hooks/useMessages';
|
import useMessages from 'hooks/useMessages';
|
||||||
import SettingsTable from 'components/common/SettingsTable';
|
import SettingsTable from 'components/common/SettingsTable';
|
||||||
|
import useLocale from 'hooks/useLocale';
|
||||||
|
|
||||||
export default function UsersTable({ data = [], onDelete }) {
|
export default function UsersTable({ data = [], onDelete }) {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const { user } = useUser();
|
const { user } = useUser();
|
||||||
|
const { dateLocale } = useLocale();
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ name: 'username', label: formatMessage(labels.username), style: { flex: 1.5 } },
|
{ name: 'username', label: formatMessage(labels.username), style: { flex: 1.5 } },
|
||||||
@ -22,6 +24,7 @@ export default function UsersTable({ data = [], onDelete }) {
|
|||||||
if (key === 'created') {
|
if (key === 'created') {
|
||||||
return formatDistance(new Date(row.createdAt), new Date(), {
|
return formatDistance(new Date(row.createdAt), new Date(), {
|
||||||
addSuffix: true,
|
addSuffix: true,
|
||||||
|
locale: dateLocale,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (key === 'role') {
|
if (key === 'role') {
|
||||||
|
@ -34,7 +34,7 @@ export default function WebsiteData({ websiteId, onSave }) {
|
|||||||
description={formatMessage(messages.deleteWebsiteWarning)}
|
description={formatMessage(messages.deleteWebsiteWarning)}
|
||||||
>
|
>
|
||||||
<ModalTrigger>
|
<ModalTrigger>
|
||||||
<Button variant="danger">Delete</Button>
|
<Button variant="danger">{formatMessage(labels.delete)}</Button>
|
||||||
<Modal title={formatMessage(labels.deleteWebsite)}>
|
<Modal title={formatMessage(labels.deleteWebsite)}>
|
||||||
{close => (
|
{close => (
|
||||||
<WebsiteDeleteForm websiteId={websiteId} onSave={handleDelete} onClose={close} />
|
<WebsiteDeleteForm websiteId={websiteId} onSave={handleDelete} onClose={close} />
|
||||||
|
Loading…
Reference in New Issue
Block a user