Modernizes the whole i18n stack:
- 48 translate([], {wait:true}) / translate() HOCs -> withTranslation()
- react.wait:true -> react.useSuspense:false
- whitelist -> supportedLngs; added compatibilityJSON: 'v3' so our
natural-language keys + v3 _plural layout keep working (custom
separators ss/eth/dj preserved)
- backends: xhr -> i18next-http-backend (client), sync-fs ->
i18next-fs-backend (server); dropped i18next-localstorage-cache
(was enabled:false); languagedetector 2 -> 8
- ReSendEmail: <Interpolate> (removed in v10) -> <Trans values={{email}}/>,
dropped the removed bare t export
- saveMissing handler signature (lngs, ns, key, fallbackValue)
Silences the per-component Translate/I18n legacy-context warnings.
Browser-verified es/en switch and <Trans> interpolation on /fires;
REST smoke byte-identical.
54 lines
2 KiB
JavaScript
54 lines
2 KiB
JavaScript
/* eslint-disable import/no-absolute-path */
|
|
|
|
import React from 'react';
|
|
import { year } from '@cleverbeagle/dates';
|
|
import { Link } from 'react-router-dom';
|
|
import { Grid } from 'react-bootstrap';
|
|
import { withTranslation } from 'react-i18next';
|
|
import { testId } from '/imports/ui/components/Utils/TestUtils';
|
|
|
|
import './Footer.scss';
|
|
|
|
const copyrightYear = () => {
|
|
const currentYear = year();
|
|
// moment(new Date()).format('YY');
|
|
return currentYear === '2017' ? '2017' : `2017-${currentYear}`;
|
|
};
|
|
|
|
const Footer = (props) => {
|
|
const { t } = props;
|
|
return (
|
|
<div className="Footer">
|
|
<Grid>
|
|
<p className="pull-left"><span className="reverse">©</span><span className="d-none d-md-inline"> Copyleft</span> {copyrightYear()} <a href="https://comunes.org/"><span className="d-none d-md-inline">{t('OrgName')}</span><span className="d-inline d-md-none">{t('OrgName')}</span></a></p>
|
|
|
|
<ul className="pull-right">
|
|
<li>
|
|
<Link id={testId('about')} to="/about">
|
|
<span className="d-none d-lg-inline">{t('Sobre nosotr@s')}</span>
|
|
<span className="d-lg-none">{t('Nosotr@s')}</span>
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link id={testId('tos')} to="/terms">
|
|
<span className="d-none d-lg-inline">{t('Términos de Servicio')}</span>
|
|
<span className="d-lg-none" />
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link id={testId('privacy')} to="/privacy">
|
|
<span className="d-none d-lg-inline">{t('Política de Privacidad')}</span>
|
|
<span className="d-lg-none">{t('Privacidad')}</span>
|
|
</Link>
|
|
</li>
|
|
<li><span className="d-none d-md-inline"><Link id={testId('license')} to="/license">{t('Licencia')}</Link></span></li>
|
|
<li><span className="d-none d-md-inline"><Link id={testId('credits')} to="/credits">{t('Créditos')}</Link></span></li>
|
|
</ul>
|
|
</Grid>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
Footer.propTypes = {};
|
|
|
|
export default withTranslation()(Footer);
|