feat: i18n user interface (#40306)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -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 />
|
||||
|
Reference in New Issue
Block a user