Trying to chase missing translations (#3441)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import Text from "~/components/Text";
|
||||
@@ -48,11 +49,12 @@ export default function Contents({ headings, isFullWidth }: Props) {
|
||||
Infinity
|
||||
);
|
||||
const headingAdjustment = minHeading - 1;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Wrapper isFullWidth={isFullWidth}>
|
||||
<Sticky>
|
||||
<Heading>Contents</Heading>
|
||||
<Heading>{t("Contents")}</Heading>
|
||||
{headings.length ? (
|
||||
<List>
|
||||
{headings.map((heading) => (
|
||||
@@ -66,7 +68,9 @@ export default function Contents({ headings, isFullWidth }: Props) {
|
||||
))}
|
||||
</List>
|
||||
) : (
|
||||
<Empty>Headings you add to the document will appear here</Empty>
|
||||
<Empty>
|
||||
{t("Headings you add to the document will appear here")}
|
||||
</Empty>
|
||||
)}
|
||||
</Sticky>
|
||||
</Wrapper>
|
||||
|
||||
@@ -18,6 +18,8 @@ import useKeyDown from "~/hooks/useKeyDown";
|
||||
import usePolicy from "~/hooks/usePolicy";
|
||||
import useStores from "~/hooks/useStores";
|
||||
import useToasts from "~/hooks/useToasts";
|
||||
import useUserLocale from "~/hooks/useUserLocale";
|
||||
import { dateLocale } from "~/utils/i18n";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
@@ -109,6 +111,9 @@ function SharePopover({
|
||||
}, 250);
|
||||
}, [t, onRequestClose, showToast]);
|
||||
|
||||
const userLocale = useUserLocale();
|
||||
const locale = userLocale ? dateLocale(userLocale) : undefined;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Heading>
|
||||
@@ -156,6 +161,7 @@ function SharePopover({
|
||||
Date.parse(share?.lastAccessedAt),
|
||||
{
|
||||
addSuffix: true,
|
||||
locale,
|
||||
}
|
||||
),
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user