Merge pull request #1911 from Maxime-J/localization

ensure some translations
This commit is contained in:
Mike Cao 2023-04-18 09:50:37 -07:00 committed by GitHub
commit 03f7f910f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -49,7 +49,7 @@ export default function TeamSettings({ teamId }) {
title={
<Breadcrumbs>
<Item>
<Link href="/settings/teams">Teams</Link>
<Link href="/settings/teams">{formatMessage(labels.teams)}</Link>
</Item>
<Item>{values?.name}</Item>
</Breadcrumbs>

View File

@ -6,10 +6,12 @@ import UserDeleteForm from './UserDeleteForm';
import { ROLES } from 'lib/constants';
import useMessages from 'hooks/useMessages';
import SettingsTable from 'components/common/SettingsTable';
import useLocale from 'hooks/useLocale';
export default function UsersTable({ data = [], onDelete }) {
const { formatMessage, labels } = useMessages();
const { user } = useUser();
const { dateLocale } = useLocale();
const columns = [
{ name: 'username', label: formatMessage(labels.username), style: { flex: 1.5 } },
@ -22,6 +24,7 @@ export default function UsersTable({ data = [], onDelete }) {
if (key === 'created') {
return formatDistance(new Date(row.createdAt), new Date(), {
addSuffix: true,
locale: dateLocale,
});
}
if (key === 'role') {

View File

@ -34,7 +34,7 @@ export default function WebsiteData({ websiteId, onSave }) {
description={formatMessage(messages.deleteWebsiteWarning)}
>
<ModalTrigger>
<Button variant="danger">Delete</Button>
<Button variant="danger">{formatMessage(labels.delete)}</Button>
<Modal title={formatMessage(labels.deleteWebsite)}>
{close => (
<WebsiteDeleteForm websiteId={websiteId} onSave={handleDelete} onClose={close} />