Migrate to lingui
Switch to "lingui" for better DX. Tried to persist existing languages as much as possible. Removed "vite-plugin-node-polyfills" because it's incompatible with "lingui"
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
|
||||
import Stack from '@mui/material/Stack';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
||||
|
||||
export const DefaultSettingFootnote = ({ areDefaultSettings }: { areDefaultSettings?: boolean }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useLingui();
|
||||
const isTouchDevice = MediaQuery.useIsTouchDevice();
|
||||
|
||||
if (!isTouchDevice || areDefaultSettings) {
|
||||
@@ -21,7 +21,7 @@ export const DefaultSettingFootnote = ({ areDefaultSettings }: { areDefaultSetti
|
||||
|
||||
return (
|
||||
<Stack sx={{ alignItems: 'end' }}>
|
||||
<Typography variant="caption">{t('reader.settings.default_setting_footnote')}</Typography>
|
||||
<Typography variant="caption">{t`*: Active setting`}</Typography>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
import Tab from '@mui/material/Tab';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { TabsMenu } from '@/base/components/tabs/TabsMenu.tsx';
|
||||
import { ReaderService } from '@/features/reader/services/ReaderService.ts';
|
||||
import { MediaQuery } from '@/base/utils/MediaQuery.tsx';
|
||||
@@ -43,7 +43,7 @@ const BaseReaderSettingsTabs = ({
|
||||
deleteSetting: (setting: keyof IReaderSettings) => void;
|
||||
setTransparent?: (transparent: boolean) => void;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useLingui();
|
||||
const isTouchDevice = MediaQuery.useIsTouchDevice();
|
||||
const setShowPreview = useReaderTapZoneStore((state) => state.tapZone.setShowPreview);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user