Abo Einmalprodukte: Phasen 5-7, konfigurierbare Sperrfristen, Lokalisierung & Dashboard
Rechnung/Lieferschein: - PDF-Gruppierung Abo- vs. Einmal-Artikel (is_abo_addon), rueckwaertskompatibel - Vorschau-Command sales:preview-invoice (umgeht Test-System-Gate, ohne Rechnungsnummer) Reminder-Mail (vorbereitet, Cron inaktiv): - MailAboExecutionReminder + Template, abo:send-execution-reminder, Spalte onetime_reminder_sent_for - Berater -> Sales Center, Kunde -> Portal; Vorschau abo:preview-reminder - Datum-Fix: formatDateDB() statt formatDate() (ICU-Format) Sperrfristen konfigurierbar (Admin-Settings): - abo-lock-days-change (Liefertag + Abo-Produkte), abo-lock-days-pause-cancel - Meldungen mit :lock-Platzhalter; Pausieren/Kuendigen vom Change-Lock entkoppelt - Abo-Produkt-Aenderungen im Lock-Fenster server- + clientseitig eingefroren - Selbstbedienung: Add-only/Lock nach $view (kein Admin-Bypass), Stale-Cache-Fix beim Mengen-Update Dashboard: - Einmalprodukte-Card + Team-Abo-KPI-Card, News-Card responsiv (col-xl-6) Lokalisierung: - Sprachdateien en/es/fr vollstaendig mit de synchronisiert (inkl. marketingplan/portal) - LocalizationSyncTest sichert Key-Gleichheit ab Tests: AboOneTimeInvoiceGrouping, AboExecutionReminder, AboLockDaysSetting, AboOnetimeDashboardAndMail, PreviewInvoiceCommand, TeamAboOverview + erweiterte View-Tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
9f996a7f1b
commit
65b867f8ee
96 changed files with 4154 additions and 1189 deletions
41
tests/Feature/LocalizationSyncTest.php
Normal file
41
tests/Feature/LocalizationSyncTest.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
uses(Tests\TestCase::class);
|
||||
|
||||
/**
|
||||
* Stellt sicher, dass alle Übersetzungsdateien (en/es/fr) exakt dieselben Keys
|
||||
* wie die deutsche Quelle haben – keine fehlenden und keine überzähligen Keys.
|
||||
* Deutsch ist die maßgebliche Quelle.
|
||||
*/
|
||||
it('keeps translation files in sync with the german source keys', function (string $locale) {
|
||||
foreach (glob(resource_path('lang/de/*.php')) as $germanFile) {
|
||||
$fileName = basename($germanFile);
|
||||
$localeFile = resource_path('lang/'.$locale.'/'.$fileName);
|
||||
|
||||
expect($localeFile)->toBeFile("Datei {$fileName} fehlt für Locale {$locale}");
|
||||
expect(localizationSyncFlattenKeys(require $localeFile))
|
||||
->toEqualCanonicalizing(localizationSyncFlattenKeys(require $germanFile));
|
||||
}
|
||||
})->with(['en', 'es', 'fr']);
|
||||
|
||||
/**
|
||||
* @return array<int, string>
|
||||
*/
|
||||
function localizationSyncFlattenKeys(array $translations, string $prefix = ''): array
|
||||
{
|
||||
$keys = [];
|
||||
|
||||
foreach ($translations as $key => $value) {
|
||||
$translationKey = $prefix.(string) $key;
|
||||
|
||||
if (is_array($value)) {
|
||||
$keys = [...$keys, ...localizationSyncFlattenKeys($value, $translationKey.'.')];
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$keys[] = $translationKey;
|
||||
}
|
||||
|
||||
return $keys;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue