mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 13:13:41 +08:00
🔖 chore: English translation and other improvements (#163)
* chore: improve english translation * fix: typo of error message * chore: improve frontend icon * chore: improve English translation * chore: update PaperProps width to minWidth in TableRow.js files * chore: Add Docker image workflow for one-api in English --------- Co-authored-by: Martial BE <me@xiao5.info>
This commit is contained in:
@@ -4,12 +4,12 @@ import {
|
||||
IconSitemap,
|
||||
IconArticle,
|
||||
IconCoin,
|
||||
IconAdjustments,
|
||||
IconSettingsCog,
|
||||
IconKey,
|
||||
IconGardenCart,
|
||||
IconCreditCard,
|
||||
IconUser,
|
||||
IconUserScan,
|
||||
IconActivity,
|
||||
IconChartHistogram,
|
||||
IconBrandTelegram,
|
||||
IconReceipt2,
|
||||
IconBrush,
|
||||
@@ -22,12 +22,12 @@ const icons = {
|
||||
IconSitemap,
|
||||
IconArticle,
|
||||
IconCoin,
|
||||
IconAdjustments,
|
||||
IconSettingsCog,
|
||||
IconKey,
|
||||
IconGardenCart,
|
||||
IconCreditCard,
|
||||
IconUser,
|
||||
IconUserScan,
|
||||
IconActivity,
|
||||
IconChartHistogram,
|
||||
IconBrandTelegram,
|
||||
IconReceipt2,
|
||||
IconBrush,
|
||||
@@ -54,7 +54,7 @@ const panel = {
|
||||
title: '分析',
|
||||
type: 'item',
|
||||
url: '/panel/analytics',
|
||||
icon: icons.IconActivity,
|
||||
icon: icons.IconChartHistogram,
|
||||
breadcrumbs: false,
|
||||
isAdmin: true
|
||||
},
|
||||
@@ -97,7 +97,7 @@ const panel = {
|
||||
title: '充值',
|
||||
type: 'item',
|
||||
url: '/panel/topup',
|
||||
icon: icons.IconGardenCart,
|
||||
icon: icons.IconCreditCard,
|
||||
breadcrumbs: false
|
||||
},
|
||||
{
|
||||
@@ -149,7 +149,7 @@ const panel = {
|
||||
title: '设置',
|
||||
type: 'item',
|
||||
url: '/panel/setting',
|
||||
icon: icons.IconAdjustments,
|
||||
icon: icons.IconSettingsCog,
|
||||
breadcrumbs: false,
|
||||
isAdmin: true
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { Grid, TextField, InputAdornment, Checkbox, Button, FormControlLabel, IconButton, Alert } from '@mui/material';
|
||||
import { gridSpacing } from 'store/constant';
|
||||
import { IconSearch, IconHttpDelete } from '@tabler/icons-react';
|
||||
import { IconSearch, IconTrash } from '@tabler/icons-react';
|
||||
import { fetchChannelData } from '../index';
|
||||
import { API } from 'utils/api';
|
||||
import { showError, showSuccess } from 'utils/common';
|
||||
@@ -112,7 +112,7 @@ const BatchDelModel = () => {
|
||||
))}
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Button variant="contained" color="primary" startIcon={<IconHttpDelete />} onClick={handleSubmit} disabled={loadding}>
|
||||
<Button variant="contained" color="primary" startIcon={<IconTrash />} onClick={handleSubmit} disabled={loadding}>
|
||||
删除
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
@@ -309,7 +309,7 @@ export default function ChannelTableRow({ item, manageChannel, handleOpenModal,
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
<MenuItem
|
||||
|
||||
@@ -17,7 +17,7 @@ import { Button, IconButton, Card, Box, Stack, Container, Typography, Divider }
|
||||
import ChannelTableRow from './component/TableRow';
|
||||
import KeywordTableHead from 'ui-component/TableHead';
|
||||
import { API } from 'utils/api';
|
||||
import { IconRefresh, IconHttpDelete, IconPlus, IconMenu2, IconBrandSpeedtest, IconCoinYuan, IconSearch } from '@tabler/icons-react';
|
||||
import { IconRefresh, IconTrash, IconPlus, IconMenu2, IconBrandSpeedtest, IconCoinYuan, IconSearch } from '@tabler/icons-react';
|
||||
import EditeModal from './component/EditModal';
|
||||
import { ITEMS_PER_PAGE } from 'constants';
|
||||
import TableToolBar from './component/TableToolBar';
|
||||
@@ -340,7 +340,7 @@ export default function ChannelPage() {
|
||||
<Button onClick={updateAllChannelsBalance} startIcon={<IconCoinYuan width={'18px'} />}>
|
||||
更新启用余额
|
||||
</Button>
|
||||
<Button onClick={deleteAllDisabledChannels} startIcon={<IconHttpDelete width={'18px'} />}>
|
||||
<Button onClick={deleteAllDisabledChannels} startIcon={<IconTrash width={'18px'} />}>
|
||||
删除禁用渠道
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
@@ -365,7 +365,7 @@ export default function ChannelPage() {
|
||||
<IconCoinYuan />
|
||||
</IconButton>
|
||||
<IconButton onClick={deleteAllDisabledChannels} size="large">
|
||||
<IconHttpDelete />
|
||||
<IconTrash />
|
||||
</IconButton>
|
||||
</Stack>
|
||||
)}
|
||||
|
||||
@@ -133,7 +133,7 @@ export default function LogTableRow({ item, userIsAdmin }) {
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
<MenuList>
|
||||
|
||||
@@ -111,7 +111,7 @@ export default function PricesTableRow({ item, managePrices, handleOpenModal, se
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
<MenuItem
|
||||
|
||||
@@ -103,7 +103,7 @@ export default function RedemptionTableRow({ item, manageRedemption, handleOpenM
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
<MenuItem
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect, useMemo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Tabs, Tab, Box, Card } from '@mui/material';
|
||||
import { IconSettings2, IconActivity, IconSettings } from '@tabler/icons-react';
|
||||
import { IconWorldCog, IconCpu, IconServerCog } from '@tabler/icons-react';
|
||||
import OperationSetting from './component/OperationSetting';
|
||||
import SystemSetting from './component/SystemSetting';
|
||||
import OtherSetting from './component/OtherSetting';
|
||||
@@ -69,9 +69,9 @@ const Setting = () => {
|
||||
<Box sx={{ width: '100%' }}>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs value={value} onChange={handleChange} variant="scrollable" scrollButtons="auto">
|
||||
<Tab label="运营设置" {...a11yProps(0)} icon={<IconActivity />} iconPosition="start" />
|
||||
<Tab label="系统设置" {...a11yProps(1)} icon={<IconSettings />} iconPosition="start" />
|
||||
<Tab label="其他设置" {...a11yProps(2)} icon={<IconSettings2 />} iconPosition="start" />
|
||||
<Tab label="运营设置" {...a11yProps(0)} icon={<IconCpu />} iconPosition="start" />
|
||||
<Tab label="系统设置" {...a11yProps(1)} icon={<IconServerCog />} iconPosition="start" />
|
||||
<Tab label="其他设置" {...a11yProps(2)} icon={<IconWorldCog />} iconPosition="start" />
|
||||
</Tabs>
|
||||
</Box>
|
||||
<CustomTabPanel value={value} index={0}>
|
||||
|
||||
@@ -71,7 +71,7 @@ export default function TelegramTableRow({ item, manageAction, handleOpenModal,
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
<MenuItem
|
||||
|
||||
@@ -246,7 +246,7 @@ export default function TokensTableRow({ item, manageToken, handleOpenModal, set
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
{menuItems}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Typography, Stack, OutlinedInput, InputAdornment, Button, InputLabel, FormControl } from '@mui/material';
|
||||
import { IconWallet } from '@tabler/icons-react';
|
||||
import { IconBuildingBank } from '@tabler/icons-react';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import SubCard from 'ui-component/cards/SubCard';
|
||||
import UserCard from 'ui-component/cards/UserCard';
|
||||
@@ -78,7 +78,7 @@ const TopupCard = () => {
|
||||
return (
|
||||
<UserCard>
|
||||
<Stack direction="row" alignItems="center" justifyContent="center" spacing={2} paddingTop={'20px'}>
|
||||
<IconWallet color={theme.palette.primary.main} />
|
||||
<IconBuildingBank color={theme.palette.primary.main} />
|
||||
<Typography variant="h4">当前额度:</Typography>
|
||||
<Typography variant="h4">{renderQuota(userQuota)}</Typography>
|
||||
</Stack>
|
||||
|
||||
@@ -138,7 +138,7 @@ export default function UsersTableRow({ item, manageUser, handleOpenModal, setMo
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
|
||||
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
|
||||
PaperProps={{
|
||||
sx: { width: 140 }
|
||||
sx: { minWidth: 140 }
|
||||
}}
|
||||
>
|
||||
{item.role !== 100 && (
|
||||
|
||||
Reference in New Issue
Block a user