feat: add localization support with English and Turkish language files and initialize App component
This commit is contained in:
+39
-22
@@ -39,7 +39,13 @@ import {
|
|||||||
CircularProgress,
|
CircularProgress,
|
||||||
Stack,
|
Stack,
|
||||||
Grid,
|
Grid,
|
||||||
Avatar
|
Avatar,
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableContainer,
|
||||||
|
TableHead,
|
||||||
|
TableRow
|
||||||
} from '@mui/material'
|
} from '@mui/material'
|
||||||
import {
|
import {
|
||||||
Dashboard as DashboardIcon,
|
Dashboard as DashboardIcon,
|
||||||
@@ -1338,30 +1344,41 @@ function App(): JSX.Element {
|
|||||||
|
|
||||||
{cliConfig.aliases && cliConfig.aliases.length > 0 && (
|
{cliConfig.aliases && cliConfig.aliases.length > 0 && (
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: 2 }}>
|
||||||
<Typography variant="subtitle2" sx={{ mb: 1, fontWeight: 600, color: 'primary.main' }}>
|
<Typography variant="subtitle2" sx={{ mb: 1.5, fontWeight: 600, color: 'primary.main', display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||||
{t('settings.cli_aliases_title')}
|
{t('settings.cli_aliases_title')}
|
||||||
|
<Chip label={cliConfig.aliases.length} size="small" sx={{ height: 16, fontSize: '0.65rem', bgcolor: 'rgba(255,255,255,0.05)' }} />
|
||||||
</Typography>
|
</Typography>
|
||||||
<Paper variant="outlined" sx={{ bgcolor: 'rgba(0,0,0,0.1)', borderColor: 'rgba(255,255,255,0.05)', maxHeight: 200, overflow: 'auto' }}>
|
<TableContainer component={Paper} variant="outlined" sx={{ bgcolor: 'rgba(0,0,0,0.1)', borderColor: 'rgba(255,255,255,0.05)', maxHeight: 350 }}>
|
||||||
<List dense disablePadding>
|
<Table stickyHeader size="small">
|
||||||
{cliConfig.aliases.map((a: any) => (
|
<TableHead>
|
||||||
<ListItem key={a.command} divider sx={{ py: 0.5, borderColor: 'rgba(255,255,255,0.05)' }}>
|
<TableRow>
|
||||||
<ListItemText
|
<TableCell sx={{ bgcolor: '#1a1d21', fontWeight: 'bold', color: 'rgba(255,255,255,0.4)', fontSize: '0.7rem', textTransform: 'uppercase' }}>{t('settings.cli_table_command')}</TableCell>
|
||||||
primary={
|
<TableCell sx={{ bgcolor: '#1a1d21', fontWeight: 'bold', color: 'rgba(255,255,255,0.4)', fontSize: '0.7rem', textTransform: 'uppercase' }}>{t('settings.cli_table_version')}</TableCell>
|
||||||
<Box component="span" sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
<TableCell sx={{ bgcolor: '#1a1d21', fontWeight: 'bold', color: 'rgba(255,255,255,0.4)', fontSize: '0.7rem', textTransform: 'uppercase' }}>{t('settings.cli_table_path')}</TableCell>
|
||||||
<code>{a.command}</code>
|
</TableRow>
|
||||||
<Typography variant="caption" sx={{ opacity: 0.5, fontWeight: 'normal' }}>
|
</TableHead>
|
||||||
({a.version})
|
<TableBody>
|
||||||
</Typography>
|
{cliConfig.aliases.map((a: any) => (
|
||||||
|
<TableRow key={a.command} hover sx={{ '&:last-child td, &:last-child th': { border: 0 } }}>
|
||||||
|
<TableCell sx={{ borderColor: 'rgba(255,255,255,0.05)' }}>
|
||||||
|
<code style={{ color: '#33d9b2', fontWeight: 'bold' }}>{a.command}</code>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell sx={{ borderColor: 'rgba(255,255,255,0.05)', color: 'rgba(255,255,255,0.8)' }}>
|
||||||
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||||
|
{a.version}
|
||||||
|
{(a.command === 'php' || a.command === 'mysql') && (
|
||||||
|
<Chip label="Default" size="small" color="primary" variant="outlined" sx={{ height: 16, fontSize: '0.6rem', opacity: 0.7 }} />
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
}
|
</TableCell>
|
||||||
secondary={a.target}
|
<TableCell sx={{ borderColor: 'rgba(255,255,255,0.05)', color: 'rgba(255,255,255,0.3)', fontSize: '0.7rem', fontStyle: 'italic' }}>
|
||||||
primaryTypographyProps={{ variant: 'body2', fontWeight: 'bold' }}
|
{a.target}
|
||||||
secondaryTypographyProps={{ variant: 'caption', sx: { opacity: 0.5, fontStyle: 'italic' } }}
|
</TableCell>
|
||||||
/>
|
</TableRow>
|
||||||
</ListItem>
|
))}
|
||||||
))}
|
</TableBody>
|
||||||
</List>
|
</Table>
|
||||||
</Paper>
|
</TableContainer>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -115,6 +115,9 @@
|
|||||||
"cli_sync_success": "CLI commands updated successfully.",
|
"cli_sync_success": "CLI commands updated successfully.",
|
||||||
"cli_aliases_title": "Generated Commands (Aliases)",
|
"cli_aliases_title": "Generated Commands (Aliases)",
|
||||||
"cli_restart_warning": "Notice: You must restart your terminal/CMD windows for PATH changes to take effect.",
|
"cli_restart_warning": "Notice: You must restart your terminal/CMD windows for PATH changes to take effect.",
|
||||||
|
"cli_table_command": "Command",
|
||||||
|
"cli_table_version": "Triggered Version",
|
||||||
|
"cli_table_path": "Binary Path",
|
||||||
"server_settings": "Server Settings"
|
"server_settings": "Server Settings"
|
||||||
},
|
},
|
||||||
"server": {
|
"server": {
|
||||||
|
|||||||
@@ -115,7 +115,10 @@
|
|||||||
"cli_path_not_found": "PATH Ayarı Henüz Yapılmamış",
|
"cli_path_not_found": "PATH Ayarı Henüz Yapılmamış",
|
||||||
"cli_sync_success": "CLI komutları başarıyla güncellendi.",
|
"cli_sync_success": "CLI komutları başarıyla güncellendi.",
|
||||||
"cli_aliases_title": "Oluşturulan Komutlar (Takma Adlar)",
|
"cli_aliases_title": "Oluşturulan Komutlar (Takma Adlar)",
|
||||||
"cli_restart_warning": "Dikkat: PATH değişikliklerinin geçerli olması için açık olan terminal/CMD pencerelerinizi kapatıp yeniden açmalısınız."
|
"cli_restart_warning": "Dikkat: PATH değişikliklerinin geçerli olması için açık olan terminal/CMD pencerelerinizi kapatıp yeniden açmalısınız.",
|
||||||
|
"cli_table_command": "Komut",
|
||||||
|
"cli_table_version": "Tetiklenen Sürüm",
|
||||||
|
"cli_table_path": "Dosya Yolu"
|
||||||
},
|
},
|
||||||
"server": {
|
"server": {
|
||||||
"nginx": {
|
"nginx": {
|
||||||
|
|||||||
Reference in New Issue
Block a user