mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Improved translations for English and Russian versions. (#760)
* First version of Russian translation * Improvements --------- Co-authored-by: Suoslex <mtsarev06@gmail.com>
This commit is contained in:
parent
8cddbef701
commit
7bcfe30a8e
21 changed files with 251 additions and 120 deletions
|
|
@ -3,6 +3,7 @@ import { Stack, Group, Divider } from '@mantine/core';
|
|||
import { Button, Text, TimeoutButton } from '/@/renderer/components';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import isElectron from 'is-electron';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { RiDeleteBin2Line, RiEdit2Fill } from 'react-icons/ri';
|
||||
import { EditServerForm } from '/@/renderer/features/servers/components/edit-server-form';
|
||||
import { ServerSection } from '/@/renderer/features/servers/components/server-section';
|
||||
|
|
@ -16,6 +17,7 @@ interface ServerListItemProps {
|
|||
}
|
||||
|
||||
export const ServerListItem = ({ server }: ServerListItemProps) => {
|
||||
const { t } = useTranslation();
|
||||
const [edit, editHandlers] = useDisclosure(false);
|
||||
const [savedPassword, setSavedPassword] = useState('');
|
||||
const { deleteServer } = useAuthStoreActions();
|
||||
|
|
@ -54,7 +56,11 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
|
|||
<ServerSection
|
||||
title={
|
||||
<Group position="apart">
|
||||
<Text>Server details</Text>
|
||||
<Text>
|
||||
{t('page.manageServers.serverDetails', {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
</Text>
|
||||
</Group>
|
||||
}
|
||||
>
|
||||
|
|
@ -68,8 +74,16 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
|
|||
<Stack>
|
||||
<Group noWrap>
|
||||
<Stack>
|
||||
<Text>URL</Text>
|
||||
<Text>Username</Text>
|
||||
<Text>
|
||||
{t('page.manageServers.url', {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
</Text>
|
||||
<Text>
|
||||
{t('page.manageServers.username', {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
</Text>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<Text>{server.url}</Text>
|
||||
|
|
@ -79,11 +93,15 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
|
|||
<Group grow>
|
||||
<Button
|
||||
leftIcon={<RiEdit2Fill />}
|
||||
tooltip={{ label: 'Edit server details' }}
|
||||
tooltip={{
|
||||
label: t('page.manageServers.editServerDetailsTooltip', {
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
}}
|
||||
variant="subtle"
|
||||
onClick={() => handleEdit()}
|
||||
>
|
||||
Edit
|
||||
{t('common.edit')}
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
|
|
@ -95,7 +113,7 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
|
|||
timeoutProps={{ callback: handleDeleteServer, duration: 1000 }}
|
||||
variant="subtle"
|
||||
>
|
||||
Remove server
|
||||
{t('page.manageServers.removeServer', { postProcess: 'sentenceCase' })}
|
||||
</TimeoutButton>
|
||||
</Stack>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue