feat: add localization support with English and Turkish language files and initialize App component
This commit is contained in:
+37
-20
@@ -39,7 +39,13 @@ import {
|
||||
CircularProgress,
|
||||
Stack,
|
||||
Grid,
|
||||
Avatar
|
||||
Avatar,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow
|
||||
} from '@mui/material'
|
||||
import {
|
||||
Dashboard as DashboardIcon,
|
||||
@@ -1338,30 +1344,41 @@ function App(): JSX.Element {
|
||||
|
||||
{cliConfig.aliases && cliConfig.aliases.length > 0 && (
|
||||
<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')}
|
||||
<Chip label={cliConfig.aliases.length} size="small" sx={{ height: 16, fontSize: '0.65rem', bgcolor: 'rgba(255,255,255,0.05)' }} />
|
||||
</Typography>
|
||||
<Paper variant="outlined" sx={{ bgcolor: 'rgba(0,0,0,0.1)', borderColor: 'rgba(255,255,255,0.05)', maxHeight: 200, overflow: 'auto' }}>
|
||||
<List dense disablePadding>
|
||||
<TableContainer component={Paper} variant="outlined" sx={{ bgcolor: 'rgba(0,0,0,0.1)', borderColor: 'rgba(255,255,255,0.05)', maxHeight: 350 }}>
|
||||
<Table stickyHeader size="small">
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell sx={{ bgcolor: '#1a1d21', fontWeight: 'bold', color: 'rgba(255,255,255,0.4)', fontSize: '0.7rem', textTransform: 'uppercase' }}>{t('settings.cli_table_command')}</TableCell>
|
||||
<TableCell sx={{ bgcolor: '#1a1d21', fontWeight: 'bold', color: 'rgba(255,255,255,0.4)', fontSize: '0.7rem', textTransform: 'uppercase' }}>{t('settings.cli_table_version')}</TableCell>
|
||||
<TableCell sx={{ bgcolor: '#1a1d21', fontWeight: 'bold', color: 'rgba(255,255,255,0.4)', fontSize: '0.7rem', textTransform: 'uppercase' }}>{t('settings.cli_table_path')}</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{cliConfig.aliases.map((a: any) => (
|
||||
<ListItem key={a.command} divider sx={{ py: 0.5, borderColor: 'rgba(255,255,255,0.05)' }}>
|
||||
<ListItemText
|
||||
primary={
|
||||
<Box component="span" sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||
<code>{a.command}</code>
|
||||
<Typography variant="caption" sx={{ opacity: 0.5, fontWeight: 'normal' }}>
|
||||
({a.version})
|
||||
</Typography>
|
||||
<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>
|
||||
}
|
||||
secondary={a.target}
|
||||
primaryTypographyProps={{ variant: 'body2', fontWeight: 'bold' }}
|
||||
secondaryTypographyProps={{ variant: 'caption', sx: { opacity: 0.5, fontStyle: 'italic' } }}
|
||||
/>
|
||||
</ListItem>
|
||||
</TableCell>
|
||||
<TableCell sx={{ borderColor: 'rgba(255,255,255,0.05)', color: 'rgba(255,255,255,0.3)', fontSize: '0.7rem', fontStyle: 'italic' }}>
|
||||
{a.target}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</List>
|
||||
</Paper>
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</Box>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
"cli_sync_success": "CLI commands updated successfully.",
|
||||
"cli_aliases_title": "Generated Commands (Aliases)",
|
||||
"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": {
|
||||
|
||||
@@ -115,7 +115,10 @@
|
||||
"cli_path_not_found": "PATH Ayarı Henüz Yapılmamış",
|
||||
"cli_sync_success": "CLI komutları başarıyla güncellendi.",
|
||||
"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": {
|
||||
"nginx": {
|
||||
|
||||
Reference in New Issue
Block a user