feat: DB-backed translations editable in admin
- Add Translation entity (locale/domain/key/value, unique on all three) - Add TranslationRepositoryInterface + DoctrineTranslationRepository - Add DatabaseTranslator decorator (#[AsDecorator]) that checks DB first and falls back to YAML files; clears per-request cache on setLocale() - Add TranslationCrudController with locale/domain filters and read-only key/locale/domain on edit to prevent accidental renames - Add "Übersetzungen / Translations" menu entry in DashboardController - Migration 20260520000000: create app.translations table - Migration 20260520010000: seed from admin.en.yaml + admin.de.yaml (204 rows) - Flatten admin.de.yaml to dot-notation; add new keys for translation CRUD Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a3984adbed
commit
ec159d7b3a
11 changed files with 458 additions and 119 deletions
|
|
@ -96,6 +96,9 @@ services:
|
||||||
App\Domain\AI\Repository\PromptTemplateRepositoryInterface:
|
App\Domain\AI\Repository\PromptTemplateRepositoryInterface:
|
||||||
alias: App\Infrastructure\Persistence\Repository\DoctrinePromptTemplateRepository
|
alias: App\Infrastructure\Persistence\Repository\DoctrinePromptTemplateRepository
|
||||||
|
|
||||||
|
App\Domain\I18n\Repository\TranslationRepositoryInterface:
|
||||||
|
alias: App\Infrastructure\Persistence\Repository\DoctrineTranslationRepository
|
||||||
|
|
||||||
App\Infrastructure\Console\BackupCommand:
|
App\Infrastructure\Console\BackupCommand:
|
||||||
arguments:
|
arguments:
|
||||||
$backupDir: '%kernel.project_dir%/var/backups'
|
$backupDir: '%kernel.project_dir%/var/backups'
|
||||||
|
|
|
||||||
37
migrations/Version20260520000000.php
Normal file
37
migrations/Version20260520000000.php
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20260520000000 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Create app.translations table for DB-backed i18n';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql(<<<'SQL'
|
||||||
|
CREATE TABLE app.translations (
|
||||||
|
id UUID NOT NULL PRIMARY KEY,
|
||||||
|
locale VARCHAR(10) NOT NULL,
|
||||||
|
domain VARCHAR(50) NOT NULL,
|
||||||
|
translation_key VARCHAR(255) NOT NULL,
|
||||||
|
value TEXT NOT NULL,
|
||||||
|
CONSTRAINT uniq_translation UNIQUE (locale, domain, translation_key)
|
||||||
|
)
|
||||||
|
SQL);
|
||||||
|
|
||||||
|
$this->addSql('CREATE INDEX idx_translations_locale_domain ON app.translations (locale, domain)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('DROP TABLE app.translations');
|
||||||
|
}
|
||||||
|
}
|
||||||
53
migrations/Version20260520010000.php
Normal file
53
migrations/Version20260520010000.php
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
use Symfony\Component\Yaml\Yaml;
|
||||||
|
|
||||||
|
final class Version20260520010000 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Seed translation files (admin domain, en + de) into app.translations';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// intentionally empty — data inserted in postUp
|
||||||
|
}
|
||||||
|
|
||||||
|
public function postUp(Schema $schema): void
|
||||||
|
{
|
||||||
|
$translationsDir = dirname(__DIR__).'/translations';
|
||||||
|
|
||||||
|
foreach (['en', 'de'] as $locale) {
|
||||||
|
$file = $translationsDir."/admin.{$locale}.yaml";
|
||||||
|
if (!file_exists($file)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = Yaml::parseFile($file);
|
||||||
|
if (!\is_array($data)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
$this->connection->executeStatement(
|
||||||
|
'INSERT INTO app.translations (id, locale, domain, translation_key, value)
|
||||||
|
VALUES (gen_random_uuid(), ?, ?, ?, ?)
|
||||||
|
ON CONFLICT (locale, domain, translation_key) DO NOTHING',
|
||||||
|
[$locale, 'admin', (string) $key, (string) $value]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql("DELETE FROM app.translations WHERE domain = 'admin'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Domain\I18n\Repository;
|
||||||
|
|
||||||
|
use App\Domain\I18n\Translation;
|
||||||
|
|
||||||
|
interface TranslationRepositoryInterface
|
||||||
|
{
|
||||||
|
/** @return array<string, string> key → value map */
|
||||||
|
public function findMapByLocaleAndDomain(string $locale, string $domain): array;
|
||||||
|
|
||||||
|
/** @return list<Translation> */
|
||||||
|
public function findAll(): array;
|
||||||
|
|
||||||
|
public function save(Translation $translation): void;
|
||||||
|
|
||||||
|
public function remove(Translation $translation): void;
|
||||||
|
}
|
||||||
50
src/Domain/I18n/Translation.php
Normal file
50
src/Domain/I18n/Translation.php
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Domain\I18n;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Uid\Uuid;
|
||||||
|
|
||||||
|
#[ORM\Entity]
|
||||||
|
#[ORM\Table(name: 'translations', schema: 'app')]
|
||||||
|
#[ORM\UniqueConstraint(name: 'uniq_translation', columns: ['locale', 'domain', 'translation_key'])]
|
||||||
|
class Translation
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\Column(type: 'uuid')]
|
||||||
|
private Uuid $id;
|
||||||
|
|
||||||
|
#[ORM\Column(type: 'string', length: 10)]
|
||||||
|
private string $locale;
|
||||||
|
|
||||||
|
#[ORM\Column(type: 'string', length: 50)]
|
||||||
|
private string $domain;
|
||||||
|
|
||||||
|
#[ORM\Column(name: 'translation_key', type: 'string', length: 255)]
|
||||||
|
private string $key;
|
||||||
|
|
||||||
|
#[ORM\Column(type: 'text')]
|
||||||
|
private string $value;
|
||||||
|
|
||||||
|
public function __construct(string $locale, string $domain, string $key, string $value)
|
||||||
|
{
|
||||||
|
$this->id = Uuid::v7();
|
||||||
|
$this->locale = $locale;
|
||||||
|
$this->domain = $domain;
|
||||||
|
$this->key = $key;
|
||||||
|
$this->value = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): Uuid { return $this->id; }
|
||||||
|
public function getLocale(): string { return $this->locale; }
|
||||||
|
public function getDomain(): string { return $this->domain; }
|
||||||
|
public function getKey(): string { return $this->key; }
|
||||||
|
public function getValue(): string { return $this->value; }
|
||||||
|
|
||||||
|
public function setLocale(string $locale): void { $this->locale = $locale; }
|
||||||
|
public function setDomain(string $domain): void { $this->domain = $domain; }
|
||||||
|
public function setKey(string $key): void { $this->key = $key; }
|
||||||
|
public function setValue(string $value): void { $this->value = $value; }
|
||||||
|
}
|
||||||
|
|
@ -66,6 +66,7 @@ final class DashboardController extends AbstractDashboardController
|
||||||
yield MenuItem::linkTo(AIPipelineJobCrudController::class, $t('menu.active_jobs'), 'fa fa-robot');
|
yield MenuItem::linkTo(AIPipelineJobCrudController::class, $t('menu.active_jobs'), 'fa fa-robot');
|
||||||
yield MenuItem::linkTo(PipelineArchiveCrudController::class, $t('menu.archive'), 'fa fa-box-archive');
|
yield MenuItem::linkTo(PipelineArchiveCrudController::class, $t('menu.archive'), 'fa fa-box-archive');
|
||||||
yield MenuItem::linkTo(PromptTemplateCrudController::class, $t('menu.ai_prompts'), 'fa fa-message');
|
yield MenuItem::linkTo(PromptTemplateCrudController::class, $t('menu.ai_prompts'), 'fa fa-message');
|
||||||
|
yield MenuItem::linkTo(TranslationCrudController::class, $t('menu.translations'), 'fa fa-language');
|
||||||
yield MenuItem::linkTo(UserCrudController::class, $t('menu.users'), 'fa fa-users');
|
yield MenuItem::linkTo(UserCrudController::class, $t('menu.users'), 'fa fa-users');
|
||||||
yield MenuItem::linkTo(LogEntryCrudController::class, $t('menu.logs'), 'fa fa-list');
|
yield MenuItem::linkTo(LogEntryCrudController::class, $t('menu.logs'), 'fa fa-list');
|
||||||
yield MenuItem::section($t('menu.section_sales'));
|
yield MenuItem::section($t('menu.section_sales'));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Infrastructure\Http\Controller\Admin;
|
||||||
|
|
||||||
|
use App\Domain\I18n\Translation;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Filter\ChoiceFilter;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Filter\TextFilter;
|
||||||
|
use Symfony\Component\Translation\TranslatableMessage;
|
||||||
|
|
||||||
|
/** @extends AbstractCrudController<Translation> */
|
||||||
|
final class TranslationCrudController extends AbstractCrudController
|
||||||
|
{
|
||||||
|
public static function getEntityFqcn(): string
|
||||||
|
{
|
||||||
|
return Translation::class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureCrud(Crud $crud): Crud
|
||||||
|
{
|
||||||
|
return $crud
|
||||||
|
->setEntityLabelInSingular(new TranslatableMessage('crud.translation.singular', [], 'admin'))
|
||||||
|
->setEntityLabelInPlural(new TranslatableMessage('crud.translation.plural', [], 'admin'))
|
||||||
|
->setDefaultSort(['domain' => 'ASC', 'key' => 'ASC']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function createEntity(string $entityFqcn): Translation
|
||||||
|
{
|
||||||
|
return new Translation('en', 'admin', '', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureFields(string $pageName): iterable
|
||||||
|
{
|
||||||
|
$readonly = $pageName === Crud::PAGE_EDIT;
|
||||||
|
|
||||||
|
yield IdField::new('id')->hideOnForm();
|
||||||
|
|
||||||
|
yield ChoiceField::new('locale', new TranslatableMessage('field.locale', [], 'admin'))
|
||||||
|
->setChoices(['English' => 'en', 'Deutsch' => 'de'])
|
||||||
|
->renderAsBadges(['en' => 'success', 'de' => 'primary'])
|
||||||
|
->setFormTypeOption('disabled', $readonly)
|
||||||
|
->setColumns(2);
|
||||||
|
|
||||||
|
yield TextField::new('domain', new TranslatableMessage('field.domain', [], 'admin'))
|
||||||
|
->setFormTypeOption('disabled', $readonly)
|
||||||
|
->setColumns(3);
|
||||||
|
|
||||||
|
yield TextField::new('key', new TranslatableMessage('field.translation_key', [], 'admin'))
|
||||||
|
->setFormTypeOption('disabled', $readonly)
|
||||||
|
->setColumns(6);
|
||||||
|
|
||||||
|
yield TextareaField::new('value', new TranslatableMessage('field.translation_value', [], 'admin'))
|
||||||
|
->setNumOfRows(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureFilters(Filters $filters): Filters
|
||||||
|
{
|
||||||
|
return $filters
|
||||||
|
->add(ChoiceFilter::new('locale')->setChoices(['English' => 'en', 'Deutsch' => 'de']))
|
||||||
|
->add(TextFilter::new('domain'))
|
||||||
|
->add(TextFilter::new('key'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Infrastructure\Persistence\Repository;
|
||||||
|
|
||||||
|
use App\Domain\I18n\Repository\TranslationRepositoryInterface;
|
||||||
|
use App\Domain\I18n\Translation;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
|
||||||
|
final class DoctrineTranslationRepository implements TranslationRepositoryInterface
|
||||||
|
{
|
||||||
|
public function __construct(private readonly EntityManagerInterface $em) {}
|
||||||
|
|
||||||
|
public function findMapByLocaleAndDomain(string $locale, string $domain): array
|
||||||
|
{
|
||||||
|
$rows = $this->em->createQuery(
|
||||||
|
'SELECT t.key, t.value FROM App\Domain\I18n\Translation t
|
||||||
|
WHERE t.locale = :locale AND t.domain = :domain'
|
||||||
|
)
|
||||||
|
->setParameter('locale', $locale)
|
||||||
|
->setParameter('domain', $domain)
|
||||||
|
->getArrayResult();
|
||||||
|
|
||||||
|
$map = [];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$map[$row['key']] = $row['value'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function findAll(): array
|
||||||
|
{
|
||||||
|
return $this->em->createQuery(
|
||||||
|
'SELECT t FROM App\Domain\I18n\Translation t ORDER BY t.domain ASC, t.locale ASC, t.key ASC'
|
||||||
|
)->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function save(Translation $translation): void
|
||||||
|
{
|
||||||
|
$this->em->persist($translation);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function remove(Translation $translation): void
|
||||||
|
{
|
||||||
|
$this->em->remove($translation);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
63
src/Infrastructure/Translation/DatabaseTranslator.php
Normal file
63
src/Infrastructure/Translation/DatabaseTranslator.php
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Infrastructure\Translation;
|
||||||
|
|
||||||
|
use App\Domain\I18n\Repository\TranslationRepositoryInterface;
|
||||||
|
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
|
||||||
|
use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated;
|
||||||
|
use Symfony\Contracts\Translation\LocaleAwareInterface;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
|
#[AsDecorator(decorates: 'translator')]
|
||||||
|
final class DatabaseTranslator implements TranslatorInterface, LocaleAwareInterface
|
||||||
|
{
|
||||||
|
/** @var array<string, array<string, string>> "{locale}.{domain}" → key → value */
|
||||||
|
private array $cache = [];
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
#[AutowireDecorated] private readonly TranslatorInterface $inner,
|
||||||
|
private readonly TranslationRepositoryInterface $repo,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
|
||||||
|
{
|
||||||
|
$effectiveLocale = $locale ?? $this->getLocale();
|
||||||
|
$effectiveDomain = $domain ?? 'messages';
|
||||||
|
$cacheKey = $effectiveLocale.'.'.$effectiveDomain;
|
||||||
|
|
||||||
|
if (!array_key_exists($cacheKey, $this->cache)) {
|
||||||
|
try {
|
||||||
|
$this->cache[$cacheKey] = $this->repo->findMapByLocaleAndDomain($effectiveLocale, $effectiveDomain);
|
||||||
|
} catch (\Throwable) {
|
||||||
|
$this->cache[$cacheKey] = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists($id, $this->cache[$cacheKey])) {
|
||||||
|
$value = $this->cache[$cacheKey][$id];
|
||||||
|
|
||||||
|
return $parameters !== [] ? strtr($value, $parameters) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->inner->trans($id, $parameters, $domain, $locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLocale(): string
|
||||||
|
{
|
||||||
|
return $this->inner instanceof LocaleAwareInterface
|
||||||
|
? $this->inner->getLocale()
|
||||||
|
: 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setLocale(string $locale): void
|
||||||
|
{
|
||||||
|
if ($this->inner instanceof LocaleAwareInterface) {
|
||||||
|
$this->inner->setLocale($locale);
|
||||||
|
}
|
||||||
|
// clear per-request cache so the new locale takes effect immediately
|
||||||
|
$this->cache = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,119 +1,102 @@
|
||||||
menu:
|
menu.dashboard: Dashboard
|
||||||
dashboard: Dashboard
|
menu.ingest_article: 'Artikel einlesen'
|
||||||
ingest_article: Artikel einlesen
|
menu.articles: Artikel
|
||||||
articles: Artikel
|
menu.article_types: Artikeltypen
|
||||||
article_types: Artikeltypen
|
menu.attributes: Attribute
|
||||||
attributes: Attribute
|
menu.section_pipeline: Pipeline
|
||||||
section_pipeline: Pipeline
|
menu.active_jobs: 'Aktive Jobs'
|
||||||
active_jobs: Aktive Jobs
|
menu.archive: Archiv
|
||||||
archive: Archiv
|
menu.ai_prompts: 'KI-Prompts'
|
||||||
ai_prompts: KI-Prompts
|
menu.translations: Übersetzungen
|
||||||
users: Benutzer
|
menu.users: Benutzer
|
||||||
logs: Logs
|
menu.logs: Logs
|
||||||
section_sales: Verkauf
|
menu.section_sales: Verkauf
|
||||||
orders: Bestellungen
|
menu.orders: Bestellungen
|
||||||
customers: Kunden
|
menu.customers: Kunden
|
||||||
invoices: Rechnungen
|
menu.invoices: Rechnungen
|
||||||
change_password: Passwort ändern
|
menu.change_password: 'Passwort ändern'
|
||||||
language_en: English
|
menu.language_en: English
|
||||||
language_de: Deutsch
|
menu.language_de: Deutsch
|
||||||
|
crud.article.singular: Artikel
|
||||||
crud:
|
crud.article.plural: Artikel
|
||||||
article:
|
crud.article_type.singular: Artikeltyp
|
||||||
singular: Artikel
|
crud.article_type.plural: Artikeltypen
|
||||||
plural: Artikel
|
crud.attribute.singular: Attribut
|
||||||
article_type:
|
crud.attribute.plural: Attribute
|
||||||
singular: Artikeltyp
|
crud.attribute_assignment.singular: Attributzuweisung
|
||||||
plural: Artikeltypen
|
crud.attribute_assignment.plural: Attributzuweisungen
|
||||||
attribute:
|
crud.customer.singular: Kunde
|
||||||
singular: Attribut
|
crud.customer.plural: Kunden
|
||||||
plural: Attribute
|
crud.order.singular: Bestellung
|
||||||
attribute_assignment:
|
crud.order.plural: Bestellungen
|
||||||
singular: Attributzuweisung
|
crud.invoice.singular: Rechnung
|
||||||
plural: Attributzuweisungen
|
crud.invoice.plural: Rechnungen
|
||||||
customer:
|
crud.log_entry.singular: 'Log-Eintrag'
|
||||||
singular: Kunde
|
crud.log_entry.plural: 'Log-Einträge'
|
||||||
plural: Kunden
|
crud.user.singular: Benutzer
|
||||||
order:
|
crud.user.plural: Benutzer
|
||||||
singular: Bestellung
|
crud.pipeline_job.singular: 'Pipeline-Job'
|
||||||
plural: Bestellungen
|
crud.pipeline_job.plural_active: 'KI-Pipeline — Aktiv'
|
||||||
invoice:
|
crud.pipeline_job.plural_archive: 'KI-Pipeline — Archiv'
|
||||||
singular: Rechnung
|
crud.prompt_template.singular: 'Prompt-Vorlage'
|
||||||
plural: Rechnungen
|
crud.prompt_template.plural: 'Prompt-Vorlagen'
|
||||||
log_entry:
|
crud.translation.singular: Übersetzung
|
||||||
singular: Log-Eintrag
|
crud.translation.plural: Übersetzungen
|
||||||
plural: Log-Einträge
|
field.id: ID
|
||||||
user:
|
field.name: Name
|
||||||
singular: Benutzer
|
field.type: Typ
|
||||||
plural: Benutzer
|
field.unit: Einheit
|
||||||
pipeline_job:
|
field.options: 'Optionen (eine pro Zeile)'
|
||||||
singular: Pipeline-Job
|
field.options_help: 'Nur relevant für Typ select / multi_select.'
|
||||||
plural_active: KI-Pipeline — Aktiv
|
field.required_attributes: Pflichtattribute
|
||||||
plural_archive: KI-Pipeline — Archiv
|
field.optional_attributes: 'Optionale Attribute'
|
||||||
prompt_template:
|
field.inventory_number: 'Inventarnr.'
|
||||||
singular: Prompt-Vorlage
|
field.status: Status
|
||||||
plural: Prompt-Vorlagen
|
field.step: Schritt
|
||||||
|
field.attempts: Versuche
|
||||||
field:
|
field.started: Gestartet
|
||||||
id: ID
|
field.error: Fehler
|
||||||
name: Name
|
field.ai_results: 'KI-Ergebnisse'
|
||||||
type: Typ
|
field.price: Preis
|
||||||
unit: Einheit
|
field.condition: Zustand
|
||||||
options: "Optionen (eine pro Zeile)"
|
field.manufacturer: Hersteller
|
||||||
options_help: "Nur relevant für Typ select / multi_select."
|
field.model_number: 'Modellnr.'
|
||||||
required_attributes: Pflichtattribute
|
field.serial_number: 'Seriennr.'
|
||||||
optional_attributes: Optionale Attribute
|
field.condition_notes: Zustandshinweise
|
||||||
inventory_number: Inventarnr.
|
field.description: Beschreibung
|
||||||
status: Status
|
field.ebay_description: 'eBay-Beschreibung'
|
||||||
step: Schritt
|
field.attributes: Attribute
|
||||||
attempts: Versuche
|
field.prompt_key: Schlüssel
|
||||||
started: Gestartet
|
field.prompt_key_help: 'Eindeutiger Bezeichner für den Prompt (z. B. <code>specs_research</code>).'
|
||||||
error: Fehler
|
field.prompt_body: 'Prompt-Text'
|
||||||
ai_results: KI-Ergebnisse
|
field.prompt_body_preview: Vorschau
|
||||||
price: Preis
|
field.last_updated: 'Zuletzt geändert'
|
||||||
condition: Zustand
|
field.locale: Sprache
|
||||||
manufacturer: Hersteller
|
field.domain: Bereich
|
||||||
model_number: Modellnr.
|
field.translation_key: Schlüssel
|
||||||
serial_number: Seriennr.
|
field.translation_value: Übersetzung
|
||||||
condition_notes: Zustandshinweise
|
action.retry: Wiederholen
|
||||||
description: Beschreibung
|
action.retry_confirm: 'Diesen Pipeline-Job ab dem aktuellen Schritt neu einreihen?'
|
||||||
ebay_description: eBay-Beschreibung
|
action.rerun_ai: 'KI neu starten'
|
||||||
attributes: Attribute
|
action.rerun_ai_confirm: 'Die gesamte KI-Pipeline für diesen Artikel neu starten? Attribute und eBay-Texte werden überschrieben.'
|
||||||
prompt_key: Schlüssel
|
action.mark_as_draft: 'Als Entwurf markieren'
|
||||||
prompt_key_help: "Eindeutiger Bezeichner für den Prompt (z. B. <code>specs_research</code>)."
|
action.activate: Aktivieren
|
||||||
prompt_body: Prompt-Text
|
flash.pipeline_job_not_found: 'Kein ursprünglicher Pipeline-Job gefunden — Foto kann nicht ermittelt werden.'
|
||||||
prompt_body_preview: Vorschau
|
flash.photo_not_found: 'Gespeichertes Foto nicht gefunden unter: %path%'
|
||||||
last_updated: Zuletzt geändert
|
flash.pipeline_requeued: 'KI-Pipeline für %label% neu gestartet — Attribute und eBay-Texte werden aktualisiert.'
|
||||||
|
flash.article_marked_draft: 'Artikel als Entwurf markiert.'
|
||||||
action:
|
flash.article_missing_attributes: 'Aktivierung nicht möglich: fehlende Attribute: %attrs%'
|
||||||
retry: Wiederholen
|
flash.article_activated: 'Artikel aktiviert und zur Kanalveröffentlichung eingereicht.'
|
||||||
retry_confirm: "Diesen Pipeline-Job ab dem aktuellen Schritt neu einreihen?"
|
flash.job_requeued: 'Job %id% ab Schritt %step% neu eingereiht.'
|
||||||
rerun_ai: KI neu starten
|
pipeline.step.vision: 'Foto analysiert'
|
||||||
rerun_ai_confirm: "Die gesamte KI-Pipeline für diesen Artikel neu starten? Attribute und eBay-Texte werden überschrieben."
|
pipeline.step.specs_research: 'Specs recherchiert'
|
||||||
mark_as_draft: Als Entwurf markieren
|
pipeline.step.json_coding: 'Attribute kodiert'
|
||||||
activate: Aktivieren
|
pipeline.step.draft_article: 'Artikel erstellt'
|
||||||
|
pipeline.step.ebay_text: 'eBay-Texte generiert'
|
||||||
flash:
|
pipeline.step.validation: Validierung
|
||||||
pipeline_job_not_found: "Kein ursprünglicher Pipeline-Job gefunden — Foto kann nicht ermittelt werden."
|
pipeline.event.queued: 'Job #%inv% zur Pipeline hinzugefügt'
|
||||||
photo_not_found: "Gespeichertes Foto nicht gefunden unter: %path%"
|
pipeline.event.processing_start: 'Job #%inv% gestartet'
|
||||||
pipeline_requeued: "KI-Pipeline für %label% neu gestartet — Attribute und eBay-Texte werden aktualisiert."
|
pipeline.event.processing_step: 'Job #%inv%: %step%'
|
||||||
article_marked_draft: Artikel als Entwurf markiert.
|
pipeline.event.completed: 'Job #%inv% abgeschlossen ✓'
|
||||||
article_missing_attributes: "Aktivierung nicht möglich: fehlende Attribute: %attrs%"
|
pipeline.event.failed: 'Job #%inv% fehlgeschlagen: %reason%'
|
||||||
article_activated: Artikel aktiviert und zur Kanalveröffentlichung eingereicht.
|
pipeline.event.needs_review: 'Job #%inv% benötigt manuelle Prüfung'
|
||||||
job_requeued: "Job %id% ab Schritt %step% neu eingereiht."
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
step:
|
|
||||||
vision: Foto analysiert
|
|
||||||
specs_research: Specs recherchiert
|
|
||||||
json_coding: Attribute kodiert
|
|
||||||
draft_article: Artikel erstellt
|
|
||||||
ebay_text: eBay-Texte generiert
|
|
||||||
validation: Validierung
|
|
||||||
event:
|
|
||||||
queued: "Job #%inv% zur Pipeline hinzugefügt"
|
|
||||||
processing_start: "Job #%inv% gestartet"
|
|
||||||
processing_step: "Job #%inv%: %step%"
|
|
||||||
completed: "Job #%inv% abgeschlossen ✓"
|
|
||||||
failed: "Job #%inv% fehlgeschlagen: %reason%"
|
|
||||||
needs_review: "Job #%inv% benötigt manuelle Prüfung"
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ menu.section_pipeline: Pipeline
|
||||||
menu.active_jobs: 'Active Jobs'
|
menu.active_jobs: 'Active Jobs'
|
||||||
menu.archive: Archive
|
menu.archive: Archive
|
||||||
menu.ai_prompts: 'AI Prompts'
|
menu.ai_prompts: 'AI Prompts'
|
||||||
|
menu.translations: Translations
|
||||||
menu.users: Users
|
menu.users: Users
|
||||||
menu.logs: Logs
|
menu.logs: Logs
|
||||||
menu.section_sales: Sales
|
menu.section_sales: Sales
|
||||||
|
|
@ -39,6 +40,8 @@ crud.pipeline_job.plural_active: 'AI Pipeline — Active'
|
||||||
crud.pipeline_job.plural_archive: 'AI Pipeline — Archive'
|
crud.pipeline_job.plural_archive: 'AI Pipeline — Archive'
|
||||||
crud.prompt_template.singular: 'Prompt Template'
|
crud.prompt_template.singular: 'Prompt Template'
|
||||||
crud.prompt_template.plural: 'Prompt Templates'
|
crud.prompt_template.plural: 'Prompt Templates'
|
||||||
|
crud.translation.singular: Translation
|
||||||
|
crud.translation.plural: Translations
|
||||||
field.id: ID
|
field.id: ID
|
||||||
field.name: Name
|
field.name: Name
|
||||||
field.type: Type
|
field.type: Type
|
||||||
|
|
@ -68,6 +71,10 @@ field.prompt_key_help: 'Slug identifying the prompt (e.g. <code>specs_research</
|
||||||
field.prompt_body: 'Prompt Body'
|
field.prompt_body: 'Prompt Body'
|
||||||
field.prompt_body_preview: 'Body Preview'
|
field.prompt_body_preview: 'Body Preview'
|
||||||
field.last_updated: 'Last Updated'
|
field.last_updated: 'Last Updated'
|
||||||
|
field.locale: Locale
|
||||||
|
field.domain: Domain
|
||||||
|
field.translation_key: Key
|
||||||
|
field.translation_value: Value
|
||||||
action.retry: Retry
|
action.retry: Retry
|
||||||
action.retry_confirm: 'Re-queue this pipeline job from the current step?'
|
action.retry_confirm: 'Re-queue this pipeline job from the current step?'
|
||||||
action.rerun_ai: 'Re-run AI'
|
action.rerun_ai: 'Re-run AI'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue