feat: i18n user interface (#40306)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Tom
2020-12-16 02:02:52 -06:00
committed by Mrugesh Mohapatra
parent a60a887e63
commit 3978c6be28
149 changed files with 3408 additions and 1084 deletions

View File

@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Button, Panel } from '@freecodecamp/react-bootstrap';
import { useTranslation } from 'react-i18next';
import { FullWidthRow } from '../helpers';
import SectionHeader from './SectionHeader';
@@ -14,6 +15,7 @@ const propTypes = {
};
const Honesty = ({ isHonest, updateIsHonest }) => {
const { t } = useTranslation();
const button = isHonest ? (
<Button
block={true}
@@ -21,7 +23,7 @@ const Honesty = ({ isHonest, updateIsHonest }) => {
className='disabled-agreed'
disabled={true}
>
<p>You have accepted our Academic Honesty Policy.</p>
<p>{t('buttons.accepted-honesty')}</p>
</Button>
) : (
<Button
@@ -29,12 +31,12 @@ const Honesty = ({ isHonest, updateIsHonest }) => {
bsStyle='primary'
onClick={() => updateIsHonest({ isHonest: true })}
>
Agree
{t('buttons.agree')}
</Button>
);
return (
<section className='honesty-policy'>
<SectionHeader>Academic Honesty Policy</SectionHeader>
<SectionHeader>{t('settings.headings.honesty')}</SectionHeader>
<FullWidthRow>
<Panel className='honesty-panel'>
<HonestyPolicy />