mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
Add localization support (#333)
* Add updated i18n config and en locale
This commit is contained in:
parent
11863fd4c1
commit
8430b1ec95
90 changed files with 2679 additions and 908 deletions
|
|
@ -4,6 +4,7 @@ import { Accordion, Button, ContextModalVars, Switch } from '/@/renderer/compone
|
|||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { openContextModal } from '@mantine/modals';
|
||||
import isElectron from 'is-electron';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { RiAddFill, RiServerFill } from 'react-icons/ri';
|
||||
import { AddServerForm } from '/@/renderer/features/servers/components/add-server-form';
|
||||
import { ServerListItem } from '/@/renderer/features/servers/components/server-list-item';
|
||||
|
|
@ -13,6 +14,7 @@ import { titleCase } from '/@/renderer/utils';
|
|||
const localSettings = isElectron() ? window.electron.localSettings : null;
|
||||
|
||||
export const ServerList = () => {
|
||||
const { t } = useTranslation();
|
||||
const serverListQuery = useServerList();
|
||||
|
||||
const handleAddServerModal = () => {
|
||||
|
|
@ -24,7 +26,7 @@ export const ServerList = () => {
|
|||
),
|
||||
},
|
||||
modal: 'base',
|
||||
title: 'Add server',
|
||||
title: t('form.addServer.title', { postProcess: 'titleCase' }),
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -74,7 +76,7 @@ export const ServerList = () => {
|
|||
variant="filled"
|
||||
onClick={handleAddServerModal}
|
||||
>
|
||||
Add server
|
||||
{t('form.addServer.title', { postProcess: 'titleCase' })}
|
||||
</Button>
|
||||
</Group>
|
||||
<Stack>
|
||||
|
|
@ -104,14 +106,18 @@ export const ServerList = () => {
|
|||
<Group>
|
||||
<Switch
|
||||
checked={ignoreCORS === 'true'}
|
||||
label="Ignore CORS (requires restart)"
|
||||
label={t('form.addServer.ignoreCors', {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
onChange={handleUpdateIgnoreCORS}
|
||||
/>
|
||||
</Group>
|
||||
<Group>
|
||||
<Switch
|
||||
checked={ignoreSSL === 'true'}
|
||||
label="Ignore SSL (requires restart)"
|
||||
label={t('form.addServer.ignoreSsl', {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
onChange={handleUpdateIgnoreSSL}
|
||||
/>
|
||||
</Group>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue