i18n: translate hardcoded Russian strings in graphs, wizard, storages, scripts
Some checks failed
Deploy to Production / Trigger production update (push) Failing after 12s
Some checks failed
Deploy to Production / Trigger production update (push) Failing after 12s
- GraphsTab: wrap "Все", "Сбросить", "Нет данных", IOPS and disk-pct chart titles with t(); add graphs.iops_read/write/disk_usage_pct keys - CreateInstanceWizard: translate (безопаснее) spans via common.safer; translate IP placeholder via wizard.ip_cidr_placeholder - StoragesTab: translate Ceph monhost placeholder via storages.monhost_placeholder - ScriptEditDialog: translate name placeholder via scripts.name_placeholder - Add scripts.execution_title and scripts.no_output keys (EN + RU) - Add common.safer key (EN + RU)
This commit is contained in:
@@ -228,14 +228,14 @@ function StorageDialog({ serverId, open, onOpenChange, editing }: {
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div><Label>{t('storages.ceph_pool')}</Label><Input value={form.pool} onChange={e => set('pool', e.target.value)} className="mt-1 font-mono" placeholder="vm-pool" /></div>
|
||||
<div><Label>{t('storages.username')}</Label><Input value={form.username} onChange={e => set('username', e.target.value)} className="mt-1" placeholder="admin" /></div>
|
||||
<div className="col-span-2"><Label>{t('storages.monhost')}</Label><Input value={form.monhost} onChange={e => set('monhost', e.target.value)} className="mt-1 font-mono" placeholder="10.0.0.1 10.0.0.2 (внешний Ceph)" /></div>
|
||||
<div className="col-span-2"><Label>{t('storages.monhost')}</Label><Input value={form.monhost} onChange={e => set('monhost', e.target.value)} className="mt-1 font-mono" placeholder={t('storages.monhost_placeholder')} /></div>
|
||||
</div>
|
||||
)}
|
||||
{!editing && form.type === 'cephfs' && (
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div><Label>{t('storages.fsname')}</Label><Input value={form.fsname} onChange={e => set('fsname', e.target.value)} className="mt-1 font-mono" placeholder="cephfs" /></div>
|
||||
<div><Label>{t('storages.username')}</Label><Input value={form.username} onChange={e => set('username', e.target.value)} className="mt-1" placeholder="admin" /></div>
|
||||
<div className="col-span-2"><Label>{t('storages.monhost')}</Label><Input value={form.monhost} onChange={e => set('monhost', e.target.value)} className="mt-1 font-mono" placeholder="10.0.0.1 10.0.0.2 (внешний Ceph)" /></div>
|
||||
<div className="col-span-2"><Label>{t('storages.monhost')}</Label><Input value={form.monhost} onChange={e => set('monhost', e.target.value)} className="mt-1 font-mono" placeholder={t('storages.monhost_placeholder')} /></div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -816,7 +816,7 @@ export default function CreateInstanceWizard({ onClose }: { onClose?: () => void
|
||||
<SSHKeyPicker keys={availableKeys} selected={selectedKeyIds} onToggle={toggleKey} />
|
||||
{availableKeys.length === 0 && (
|
||||
<div>
|
||||
<Label>SSH Keys <span className="text-muted-foreground text-xs font-normal">(безопаснее)</span></Label>
|
||||
<Label>SSH Keys <span className="text-muted-foreground text-xs font-normal">{t('common.safer')}</span></Label>
|
||||
<textarea
|
||||
className="w-full rounded-md border bg-transparent px-3 py-2 text-sm font-mono min-h-[60px]"
|
||||
value={config.ssh_keys}
|
||||
@@ -1096,7 +1096,7 @@ export default function CreateInstanceWizard({ onClose }: { onClose?: () => void
|
||||
<>
|
||||
<div>
|
||||
<Label>IP (CIDR)</Label>
|
||||
<Input value={lxcConfig.ip_address} onChange={e => setLxcConfig(p => ({ ...p, ip_address: e.target.value }))} placeholder="10.10.10.5/24 или dhcp" />
|
||||
<Input value={lxcConfig.ip_address} onChange={e => setLxcConfig(p => ({ ...p, ip_address: e.target.value }))} placeholder={t('wizard.ip_cidr_placeholder')} />
|
||||
</div>
|
||||
<div>
|
||||
<Label>Gateway</Label>
|
||||
@@ -1134,7 +1134,7 @@ export default function CreateInstanceWizard({ onClose }: { onClose?: () => void
|
||||
<SSHKeyPicker keys={availableKeys} selected={selectedKeyIds} onToggle={toggleKey} />
|
||||
{availableKeys.length === 0 && (
|
||||
<div>
|
||||
<Label>SSH Keys <span className="text-muted-foreground text-xs font-normal">(безопаснее)</span></Label>
|
||||
<Label>SSH Keys <span className="text-muted-foreground text-xs font-normal">{t('common.safer')}</span></Label>
|
||||
<textarea
|
||||
className="w-full rounded-md border bg-transparent px-3 py-2 text-sm font-mono min-h-[60px]"
|
||||
value={lxcConfig.ssh_keys}
|
||||
|
||||
@@ -73,7 +73,7 @@ export default function GraphsTab({ serverId, vmid, type, node }: Props) {
|
||||
onChange={(e) => setNic(e.target.value)}
|
||||
className="ml-1 rounded border border-border bg-background px-1 py-0.5 text-xs text-foreground focus:outline-none"
|
||||
>
|
||||
<option value="all">Все</option>
|
||||
<option value="all">{t('common.all')}</option>
|
||||
{nics.map((n) => (
|
||||
<option key={n} value={n}>
|
||||
{n}
|
||||
@@ -120,7 +120,7 @@ export default function GraphsTab({ serverId, vmid, type, node }: Props) {
|
||||
/>
|
||||
{hasCustom && (
|
||||
<Button variant="outline" size="sm" onClick={resetCustom}>
|
||||
Сбросить
|
||||
{t('common.reset')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
@@ -133,7 +133,7 @@ export default function GraphsTab({ serverId, vmid, type, node }: Props) {
|
||||
</div>
|
||||
) : points.length === 0 ? (
|
||||
<div className="flex items-center justify-center py-20 text-sm text-muted-foreground">
|
||||
Нет данных
|
||||
{t('common.no_data')}
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid gap-4 lg:grid-cols-2">
|
||||
@@ -190,7 +190,7 @@ export default function GraphsTab({ serverId, vmid, type, node }: Props) {
|
||||
/>
|
||||
<ChartCard
|
||||
tickFormatter={xTick}
|
||||
title="IOPS чтение"
|
||||
title={t('graphs.iops_read')}
|
||||
data={points}
|
||||
dataKey="iops_read"
|
||||
color="hsl(180, 70%, 40%)"
|
||||
@@ -199,7 +199,7 @@ export default function GraphsTab({ serverId, vmid, type, node }: Props) {
|
||||
/>
|
||||
<ChartCard
|
||||
tickFormatter={xTick}
|
||||
title="IOPS запись"
|
||||
title={t('graphs.iops_write')}
|
||||
data={points}
|
||||
dataKey="iops_write"
|
||||
color="hsl(300, 60%, 50%)"
|
||||
@@ -208,7 +208,7 @@ export default function GraphsTab({ serverId, vmid, type, node }: Props) {
|
||||
/>
|
||||
<ChartCard
|
||||
tickFormatter={xTick}
|
||||
title="Заполненность диска"
|
||||
title={t('graphs.disk_usage_pct')}
|
||||
data={points}
|
||||
dataKey="diskpct"
|
||||
color="hsl(45, 93%, 47%)"
|
||||
|
||||
@@ -89,7 +89,7 @@ export default function ScriptEditDialog({ open, onOpenChange, script }: Props)
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div className="space-y-1.5">
|
||||
<Label>{t('scripts.name', 'Имя')}</Label>
|
||||
<Input value={name} onChange={(e) => handleNameChange(e.target.value)} placeholder="Очистка логов" />
|
||||
<Input value={name} onChange={(e) => handleNameChange(e.target.value)} placeholder={t('scripts.name_placeholder')} />
|
||||
</div>
|
||||
<div className="space-y-1.5">
|
||||
<Label>{t('scripts.slug', 'Slug')}</Label>
|
||||
|
||||
Reference in New Issue
Block a user