Refactor i18n

This commit is contained in:
Reckless_Satoshi 2022-10-17 01:49:00 -07:00
parent 386bb54d31
commit 8f5eca0a56
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
5 changed files with 5 additions and 8 deletions

View File

@ -1,22 +1,19 @@
import React, { Component, Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import HomePage from './HomePage';
import { CssBaseline, IconButton, Link } from '@mui/material';
import { CssBaseline, IconButton } from '@mui/material';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import UnsafeAlert from './UnsafeAlert';
import { LearnDialog } from './Dialogs';
import TorConnection from './TorConnection';
import { I18nextProvider } from 'react-i18next';
import i18n from './i18n';
import i18n from '../i18n/Web';
// Icons
import DarkModeIcon from '@mui/icons-material/DarkMode';
import LightModeIcon from '@mui/icons-material/LightMode';
import SchoolIcon from '@mui/icons-material/School';
import ZoomOutIcon from '@mui/icons-material/ZoomOut';
import ZoomInIcon from '@mui/icons-material/ZoomIn';
import SettingsIcon from '@mui/icons-material/Settings';
import { systemClient } from '../services/System';
export default class App extends Component {

View File

@ -71,7 +71,7 @@ const TradeSummary = ({
const secs = parseInt(total_time - hours * 3600 - mins * 60);
return (
<Grid item xs={12} align='center'>
<Grid item xs={12}>
<Accordion
defaultExpanded={true}
elevation={0}

View File

@ -38,11 +38,11 @@ const configMobile: Configuration = {
rules: [
...(config?.module?.rules || []),
{
test: path.resolve(__dirname, 'src/components/i18n.js'),
test: path.resolve(__dirname, 'src/i18n/Web.js'),
loader: 'file-replace-loader',
options: {
condition: 'if-replacement-exists',
replacement: path.resolve(__dirname, 'src/components/i18n.Native.js'),
replacement: path.resolve(__dirname, 'src/i18n/Native.js'),
async: true,
},
},