13$fail =
static function (
string $message): void {
14 fwrite(STDERR,
"FAIL: {$message}\n");
19 'modules/dbxShop/include/dbxShopService.class.php' => array(
20 "texts('dbxShop|shop-catalog-filter-form')",
21 "texts('dbxShop|shop-cart')",
22 "texts('dbxShop|checkout')",
23 "texts('dbxShop|shop-orders')",
24 "get_fd_message('column_product')",
25 "get_fd_message('payment_bank_transfer_help')",
26 "get_fd_message('empty_title')",
28 'modules/dbxAdmin/include/dbxServer.class.php' => array(
29 "\$texts->_fd = 'dbxAdmin|server'",
30 "\$oReport->_fd = 'dbxAdmin|server'",
31 "\$oForm->_fd = 'dbxAdmin|server'",
32 "get_fd_message('column_table')",
33 "get_fd_message('check_input_plain')",
35 'modules/dbxAdmin/include/dbxSchema.class.php' => array(
36 "'dbxAdmin|schema-report'",
37 "get_fd_message('mapping_saved')",
38 "get_fd_message('action_save')",
40 'modules/dbxAdmin/include/dbxEdit_fd.class.php' => array(
41 "'dbxAdmin|ddedit-field'",
44 'modules/dbxUser/include/dbxUser_profil.class.php' => array(
45 "'dbxUser|user-profile'",
48 'modules/dbxUser/include/dbxUser_avatar.class.php' => array(
49 "'dbxUser|user-profile'",
52 'modules/myInvoices/include/myInvoicesService.class.php' => array(
55 "get_fd_message('column_invoice_no')",
60foreach (
$contracts as $relative => $requiredFragments) {
61 $path =
$root . DIRECTORY_SEPARATOR . str_replace(
'/', DIRECTORY_SEPARATOR, $relative);
62 $source = is_file($path) ? file_get_contents($path) : false;
64 $fail(
"Datei fehlt: {$relative}");
66 foreach ($requiredFragments as $fragment) {
67 if (!str_contains(
$source, $fragment)) {
68 $fail(
"{$relative}: FD-Vertrag fehlt: {$fragment}");
73 '~_msg_(?:info|success|error|warning)\s*=\s*([\'"])(?!\1)(?:(?!\1).)+\1~',
78 $fail(
"{$relative}: sichtbare Meldung ist noch im Modul hart codiert: {$match[0]}");
83 $root .
'/modules/dbxShop/include/dbxShopService.class.php'
88 'Noch keine Bestellungen',
89 'Ihre gespeicherten Shop-Bestellungen.',
90 'Aktuell ist keine Zahlungsart aktiv',
93 $fail(
"dbxShopService enthält noch statischen UI-Text: {$obsoleteText}");
100 !str_contains((
string)
$coreJs,
'dbx.translate') ||
101 !str_contains((
string)
$confirmJs,
'dbx.translate')
103 $fail(
'Zentrale JavaScript-Bedientexte verwenden dbx.translate() nicht.');
106echo
'OK: Aktive Kernformulare und -listen beziehen Fachtexte aus ihren Sprach-FDs; '
107 .
"generische Browsertexte verwenden dbx.translate().\n";
foreach(array('Shop Cart Report', 'Shop Checkout Form', 'Noch keine Bestellungen', 'Ihre gespeicherten Shop-Bestellungen.', 'Aktuell ist keine Zahlungsart aktiv',) as $obsoleteText) $coreJs
foreach($contracts as $relative=> $requiredFragments) $shopSource