fix(i18n): ForwardProxy ACL-Labels + Diagnostics-Output vollständig übersetzt

- ForwardProxy: ACL_TYPE_KEYS-Array + t('fwd.aclTypes.*') statt
  hartkodierter gemischter DE/EN-Labels; action-Select und
  value-Placeholder ebenso via t()
- Diagnostics: '(kein Output)' → t('diag.noOutput') — war einzige
  sichtbare deutsche Konstante außerhalb t()
- en/de common.json: fwd.aclTypes.*, fwd.actions.*, fwd.valuePlaceholder,
  diag.noOutput hinzugefügt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-24 12:16:08 +02:00
parent c9caf35596
commit f33c1bfe4f
6 changed files with 61 additions and 29 deletions

View File

@@ -40,24 +40,10 @@ interface FormValues {
comment?: string
}
// ACL-Typen aus Squid's Vokabular — dieselbe Whitelist wie der
// Backend-Validator. Mehr Typen kann Squid (browser, time-of-day,
// arp, ...) — die spielen wir später dazu.
const ACL_TYPES = [
{ value: 'src', label: 'src — Quell-IP/CIDR' },
{ value: 'dst', label: 'dst — Ziel-IP/CIDR' },
{ value: 'dstdomain', label: 'dstdomain — Ziel-Domain (exact)' },
{ value: 'srcdomain', label: 'srcdomain — Quell-Domain (rDNS)' },
{ value: 'port', label: 'port — Ziel-Port' },
{ value: 'proto', label: 'proto — http/https/ftp/...' },
{ value: 'method', label: 'method — GET/POST/CONNECT/...' },
{ value: 'time', label: 'time — Wochentag/Zeit' },
{ value: 'url_regex', label: 'url_regex — kompletter URL-Match' },
{ value: 'urlpath_regex', label: 'urlpath_regex — Path-Teil' },
{ value: 'dstdom_regex', label: 'dstdom_regex — Domain-Regex' },
{ value: 'srcdom_regex', label: 'srcdom_regex — Quell-Domain-Regex' },
{ value: 'browser', label: 'browser — User-Agent-Regex' },
]
const ACL_TYPE_KEYS = [
'src', 'dst', 'dstdomain', 'srcdomain', 'port', 'proto', 'method',
'time', 'url_regex', 'urlpath_regex', 'dstdom_regex', 'srcdom_regex', 'browser',
] as const
async function listACLs(): Promise<ACL[]> {
const r = await apiClient.get('/forward-proxy/acls')
@@ -222,17 +208,21 @@ export default function ForwardProxyPage() {
</Form.Item>
<Form.Item label={t('fwd.action')} name="action" rules={[{ required: true }]}>
<Select options={[
{ value: 'allow', label: 'allow — Zugriff erlauben' },
{ value: 'deny', label: 'deny — Zugriff blockieren' },
{ value: 'allow', label: t('fwd.actions.allow') },
{ value: 'deny', label: t('fwd.actions.deny') },
]} />
</Form.Item>
<Form.Item label={t('fwd.aclType')} name="acl_type" rules={[{ required: true }]}
extra={t('fwd.aclTypeExtra')}>
<Select options={ACL_TYPES} showSearch optionFilterProp="value" />
<Select
options={ACL_TYPE_KEYS.map(k => ({ value: k, label: t(`fwd.aclTypes.${k}`) }))}
showSearch
optionFilterProp="value"
/>
</Form.Item>
<Form.Item label={t('fwd.value')} name="value" rules={[{ required: true }]}
extra={t('fwd.valueExtra')}>
<Input.TextArea rows={2} placeholder=".example.com oder 10.10.20.0/24 oder 443" />
<Input.TextArea rows={2} placeholder={t('fwd.valuePlaceholder')} />
</Form.Item>
<Form.Item label={t('fwd.priority')} name="priority" rules={[{ required: true }]}
extra={t('fwd.priorityExtra')}>