add translation keys (#246)
* Fix i18n tsc issue "t" can return null by default. This was already disabled in the config, but it had no effect on tsc. * Fix translation in "DefaultNavBar" key was missing and since this is a constant the translation wouldn't update in case the language got changed after first load. * Enable typing for i18n translation keys * Add translation keys
This commit is contained in:
@@ -11,6 +11,7 @@ import { Link } from 'react-router-dom';
|
||||
import { PlayArrow } from '@mui/icons-material';
|
||||
import { BACK } from 'util/useBackTo';
|
||||
import { IChapter } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface ResumeFABProps {
|
||||
chapter: IChapter;
|
||||
@@ -18,6 +19,8 @@ interface ResumeFABProps {
|
||||
}
|
||||
|
||||
export default function ResumeFab(props: ResumeFABProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const {
|
||||
chapter: { index, lastPageRead },
|
||||
mangaId,
|
||||
@@ -34,7 +37,7 @@ export default function ResumeFab(props: ResumeFABProps) {
|
||||
}}
|
||||
>
|
||||
<PlayArrow />
|
||||
{index === 1 ? 'Start' : 'Resume'}
|
||||
{index === 1 ? t('global.button.start') : t('global.button.resume')}
|
||||
</Fab>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user