import { siteConfig } from 'site/site.config.mjs' // List of authors import { authors as allAuthors } from 'config/authors.mjs' import { docUpdates } from 'site/prebuild/doc-updates.mjs' // Components import { PageLink } from 'shared/components/page-link.mjs' import { DateTime, Interval } from 'luxon' // Hooks import { useTranslation } from 'next-i18next' import { EditIcon } from 'shared/components/icons.mjs' export const TimeAgo = ({ date, t }) => { const i = Interval.fromDateTimes(DateTime.fromISO(date), DateTime.now()) .toDuration(['hours', 'days', 'months', 'years']) .toObject() let ago = '' if (i.years < 1 && i.months < 1) { if (Math.floor(i.days) === 1) ago += `${t('oneDay')}` else if (Math.floor(i.days) === 0) ago += `${t('lessThanADay')}` } else { if (i.years === 1) ago += `${i.years} ${t('year')}, ` else if (i.years > 1) ago += `${i.years} ${t('years')}, ` if (i.months === 1) ago += `${i.months} ${t('month')}` else if (i.months > 1) ago += `${i.months} ${t('months')}` } return `${ago} ${t('ago')}` } const PersonList = ({ list }) => list ? ( ) : null const CreditsList = ({ updates, frontmatter, locale, t }) => ( ) export const MdxMetaData = ({ frontmatter, locale, slug }) => { const { t } = useTranslation('docs') const updates = docUpdates[slug] || {} frontmatter.maintainers = ['joostdecock'] locale = 'fr' /* * FIXME * * The link to the translator status pages on this page links to * next.freesewing.org because this content is not available on the current * freesewing.org. */ return (
{t('editThisPage')}

{t('contentsBy')}

) }