From 70d7f10c726967a569c7b6530573055c6efe8eb2 Mon Sep 17 00:00:00 2001 From: rintisch Date: Sat, 6 Apr 2024 13:33:51 +0200 Subject: [PATCH 1/5] [TASK] Clean up entries of locallang_db.xlf `locallang_db.xlf` contains only labels for TCA and FlexForms. Superfluous entries are deleted. Harmonize spelling of email (always without hyphen). --- Configuration/Backend/Modules.php | 6 +- Configuration/TCA/Overrides/pages.php | 5 +- Resources/Private/Language/locallang_be.xlf | 13 ++- Resources/Private/Language/locallang_db.xlf | 95 ++++----------------- 4 files changed, 25 insertions(+), 94 deletions(-) diff --git a/Configuration/Backend/Modules.php b/Configuration/Backend/Modules.php index a6d30f0e..569b43d7 100644 --- a/Configuration/Backend/Modules.php +++ b/Configuration/Backend/Modules.php @@ -7,7 +7,7 @@ use Extcode\Cart\Controller\Backend\Order\PaymentController; use Extcode\Cart\Controller\Backend\Order\ShippingController; -$_LLL_db = 'LLL:EXT:cart/Resources/Private/Language/locallang_db.xlf:'; +$_LLL_be = 'LLL:EXT:cart/Resources/Private/Language/locallang_be.xlf:'; /** * Definitions for modules provided by EXT:cart @@ -17,7 +17,7 @@ 'access' => 'user, group', 'workspaces' => 'live', 'path' => '/module/cart', - 'labels' => $_LLL_db . 'tx_cart.module.main', + 'labels' => $_LLL_be . 'tx_cart.module.main', 'extensionName' => 'Cart', 'iconIdentifier' => 'ext-cart-module', 'navigationComponent' => '@typo3/backend/page-tree/page-tree-element', @@ -29,7 +29,7 @@ 'workspaces' => 'live', 'path' => '/module/cart/orders', 'labels' => [ - 'title' => $_LLL_db . 'tx_cart.module.orders', + 'title' => $_LLL_be . 'tx_cart.module.orders', ], 'extensionName' => 'Cart', 'controllerActions' => [ diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php index 455965e0..1091bdf2 100644 --- a/Configuration/TCA/Overrides/pages.php +++ b/Configuration/TCA/Overrides/pages.php @@ -3,7 +3,6 @@ defined('TYPO3') or die(); call_user_func(function () { - $_LLL_be = 'LLL:EXT:cart/Resources/Private/Language/locallang_be.xlf:'; $_LLL_db = 'LLL:EXT:cart/Resources/Private/Language/locallang_db.xlf:'; $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'][] = [ @@ -12,12 +11,12 @@ 'apps-pagetree-page-cart-cart', ]; $GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [ - $_LLL_be . 'tcarecords-pages-contains.cart_coupons', + $_LLL_db . 'tcarecords-pages-contains.cart_coupons', 'coupons', 'apps-pagetree-folder-cart-coupons', ]; $GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [ - $_LLL_be . 'tcarecords-pages-contains.cart_orders', + $_LLL_db . 'tcarecords-pages-contains.cart_orders', 'orders', 'apps-pagetree-folder-cart-orders', ]; diff --git a/Resources/Private/Language/locallang_be.xlf b/Resources/Private/Language/locallang_be.xlf index c63fc0a3..addadab2 100644 --- a/Resources/Private/Language/locallang_be.xlf +++ b/Resources/Private/Language/locallang_be.xlf @@ -4,18 +4,18 @@
- - Cart: Coupons + + Shopping Cart - - Cart: Orders + + Orders Cart: Cart - shows complete order form + Shows complete order form @@ -27,9 +27,6 @@ List of Paid but not Shipped Orders - - Total Orders - Orders per Day diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index bbb2edc9..f3f39210 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -3,21 +3,6 @@
- - - Shopping Cart - Example Configuration - - - - Shopping Cart - - - Orders - - - Coupons - - Cart: Mini-Cart @@ -27,19 +12,10 @@ Cart: Currency Selector - - Cart: Product - Cart: Orders - - Product Id - - - Cart Page Id - Sender email name for email to the Seller @@ -49,17 +25,17 @@ Receiver email addresses (seperated by comma) for email to the Seller - + CC email addresses (seperated by comma) for email to the Seller - - The recipients of e-mails sent to one or more e-mail addresses separated by commas and listed in the so-called CC (Carbon Copy) field will receive a copy of the sent e-mail. + + The recipients of emails sent to one or more email addresses separated by commas and listed in the so-called CC (Carbon Copy) field will receive a copy of the sent email. BCC email addresses (seperated by comma) for email to the Seller - The recipients of e-mails sent to one or more e-mail addresses separated by commas and listed in the so-called BCC (Blind Carbon Copy) field will receive a copy of the sent e-mail without their address being visible to the other specified recipients. (Source: Wikipedia) + The recipients of emails sent to one or more email addresses separated by commas and listed in the so-called BCC (Blind Carbon Copy) field will receive a copy of the sent email without their address being visible to the other specified recipients. (Source: Wikipedia) Sender email name for email to the Buyer @@ -71,13 +47,13 @@ CC email addresses (seperated by comma) for email to the Buyer - The recipients of e-mails sent to one or more e-mail addresses separated by commas and listed in the so-called CC (Carbon Copy) field will receive a copy of the sent e-mail. + The recipients of emails sent to one or more email addresses separated by commas and listed in the so-called CC (Carbon Copy) field will receive a copy of the sent email. BCC email addresses (seperated by comma) for email to the Buyer - The recipients of e-mails sent to one or more e-mail addresses separated by commas and listed in the so-called BCC (Blind Carbon Copy) field will receive a copy of the sent e-mail without their address being visible to the other specified recipients. (Source: Wikipedia) + The recipients of emails sent to one or more email addresses separated by commas and listed in the so-called BCC (Blind Carbon Copy) field will receive a copy of the sent email without their address being visible to the other specified recipients. (Source: Wikipedia) Reply To email address for email to the Buyer @@ -99,15 +75,9 @@ free - - Order - Order and Invoice Number - - Purchaser - Addresses @@ -117,15 +87,6 @@ Total Price - - Payment - - - Shipping - - - Documents - User @@ -150,15 +111,6 @@ Delivery Note Date - - Firstname - - - Lastname - - - Email - Billing Address @@ -229,6 +181,9 @@ Payment + + Order Address + Record Type @@ -500,9 +455,6 @@ Note - - Transactions - Transaction @@ -554,10 +506,6 @@ Calc - - Order Address - - Coupon @@ -613,16 +561,9 @@ Number of Coupons used - - Flexform - - Tag - - Tags - Title @@ -631,21 +572,15 @@ Cart Session - - Germany - - - Austria - - - Switzerland - - Cart: Cart - - Cart: Product + + + Cart: Coupons + + + Cart: Orders From 0fc2b291e4fd42035a82a213a1c6e1c37854eb1b Mon Sep 17 00:00:00 2001 From: rintisch Date: Sun, 7 Apr 2024 13:29:53 +0200 Subject: [PATCH 2/5] [TASK] Clean up `locallang.xlf` Delete not used entries --- Resources/Private/Language/locallang.xlf | 349 +------------------- Resources/Private/Language/locallang_be.xlf | 1 - 2 files changed, 4 insertions(+), 346 deletions(-) diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index d0943f55..d269f5e3 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -3,7 +3,6 @@
- Desired number of this item not available. @@ -17,7 +16,7 @@ %s Items were added to cart. - + The given subject was not empty. @@ -69,73 +68,19 @@ Product - - Stock Keeping Unit - - - SKU - Quantity - - Price - - - Price (net) - - - Price (gross) - - - Price per unit - Price per unit (net) - - Price per unit (gross) - Subtotal - - Subtotal (net) - - - Subtotal (gross) - - - Tax (%s) - - - Discount - - - Total Price (net) - - - Total Price (gross) - - - Service- and Shipping costs (net) - - - Service- and Shipping costs (gross) - - - Discount (net) - - - Discount (gross) - Product - - Product Id - Stock Keeping Unit @@ -154,12 +99,6 @@ Total - - Tax (%s) - - - Currently there are no products in your cart. - Discount @@ -175,81 +114,18 @@ Total Price (gross) - - Shipping Options - - - from - - - each - - - free shipping from - - - free shipping until - - - shipping available from - - - shipping available until - - - Service Options - - - free service option from - - - free service option until - - - service option available from - - - service option available until - - - Special Options - - - free special option from - - - free special option until - - - special option available from - - - special option available until - - - %s each - Service- and Shipping costs (net) Service- and Shipping costs (gross) - + Discount (net) Discount (gross) - - Remove this product from cart. - - - Order number - - - Invoice number - filter @@ -270,20 +146,10 @@ End Date - - SKU - - - Title - - Y-m-d - - add to cart - remove @@ -308,9 +174,6 @@ Send it to the same address. - - Please choose ... - back @@ -327,33 +190,6 @@ This shipping method is not available. - - The order was successfully paid. - - - An error occurred while updating the order. - - - Access denied! - - - Thank you for your order. - - - Your order number is: %1$s - - - The order has been canceled. - - - An error occurred while updating the order. - - - Access denied! - - - Thank you. - The generated order number is: %s. @@ -379,9 +215,6 @@ The shipping was successfully updated. - - Actions - Show @@ -455,36 +288,12 @@ Your order number is: %1$s - - Order - - - Order and Invoice Number - - - Purchaser - - - Addresses - - - Price - - - Payment - - - Shipping - - - User + + Order Date Order Number - - Order Date - Invoice Number @@ -503,12 +312,6 @@ Billing Address - - Price (gross) - - - Price (net) - Total Price (Gross) @@ -521,24 +324,6 @@ Total Price - - Additional Data - - - Order PDFs - - - Invoice PDFs - - - Order Tax - - - Order Total Tax - - - Order Product - Order @@ -563,9 +348,6 @@ Ordered items - - Order Date - Customer comment @@ -597,31 +379,9 @@ You have to agree to the privacy policy. - - Order Tax - - - Name - - - Value - - - Calc - - - Sum - - - - Order Product - Count - - Price - Discount @@ -631,44 +391,10 @@ Net - - Additional Data - - - Order Product Additional - - - - Order Product Additional - - - Type - - - Key - - - Value - - - Data - Shipping - - Name - - - Price (net) - - - Price (gross) - - - Tax - Status @@ -691,18 +417,6 @@ Payment - - Name - - - Price (net) - - - Price (gross) - - - Tax - Status @@ -722,9 +436,6 @@ canceled - - Order Address - Title @@ -778,52 +489,6 @@ Order receipt - %s - - Product Listing - - - Product Show - - - Variant Set Listing - - - Variant Set Show - - - - Filter List - - - - Tax Class - - - normal - - - reduced - - - free - - - VAT - - - VAT (%s %%) - - - - Add to cart - - - The product has been added to your shopping cart. - - - The product could not be added to the shopping cart. - - Price (net) @@ -831,12 +496,6 @@ Price (gross) - - Coupon - - - Coupon Code - Coupon Code is not useable. diff --git a/Resources/Private/Language/locallang_be.xlf b/Resources/Private/Language/locallang_be.xlf index addadab2..2e3b62da 100644 --- a/Resources/Private/Language/locallang_be.xlf +++ b/Resources/Private/Language/locallang_be.xlf @@ -3,7 +3,6 @@
- Shopping Cart From 7214200e739337f9250edbad22f4650555aae417 Mon Sep 17 00:00:00 2001 From: rintisch Date: Sun, 7 Apr 2024 18:35:07 +0200 Subject: [PATCH 3/5] [TASK] Separate language keys of BE templates The backend list view uses its own entries from `locallang.xlf` which are namespaced. EXCEPTION: The entries for status of shipping and payment are still shared. But it's unlikely that developer might want to change them. --- Resources/Private/Language/locallang.xlf | 80 +++++++++++++------ .../Partials/Backend/Order/Filter/List.html | 16 ++-- .../Templates/Backend/Order/Order/List.html | 18 ++--- .../Templates/Backend/Order/Order/Show.html | 4 +- 4 files changed, 73 insertions(+), 45 deletions(-) diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index d269f5e3..c039baec 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -127,25 +127,6 @@ Discount (gross) - - filter - - - Customer - - - Order Number - - - Invoice Number - - - Start Date - - - End Date - - Y-m-d @@ -315,9 +296,6 @@ Total Price (Gross) - - Total Price (Net) - Price @@ -345,11 +323,8 @@ Method - - Ordered items - - Customer comment + Comment I have read the general terms and conditions agree to them. @@ -547,6 +522,59 @@ Order view for #%1$s (%2$s) + + First name + + + Last name + + + Company + + + Order Number + + + Order Date + + + Invoice Number + + + Invoice Date + + + Total Price (Gross) + + + Total Price (Net) + + + Customer comment + + + Ordered items + + + + Filter + + + Customer + + + Order Number + + + Invoice Number + + + Start Date + + + End Date + + diff --git a/Resources/Private/Partials/Backend/Order/Filter/List.html b/Resources/Private/Partials/Backend/Order/Filter/List.html index 277951c1..95940b0c 100644 --- a/Resources/Private/Partials/Backend/Order/Filter/List.html +++ b/Resources/Private/Partials/Backend/Order/Filter/List.html @@ -5,7 +5,7 @@
- + \ No newline at end of file diff --git a/Resources/Private/Templates/Backend/Order/Order/List.html b/Resources/Private/Templates/Backend/Order/Order/List.html index fe303ebc..f590080b 100644 --- a/Resources/Private/Templates/Backend/Order/Order/List.html +++ b/Resources/Private/Templates/Backend/Order/Order/List.html @@ -19,31 +19,31 @@ - + - + - + - + - + - + - + - + - + diff --git a/Resources/Private/Templates/Backend/Order/Order/Show.html b/Resources/Private/Templates/Backend/Order/Order/Show.html index d0d0a619..73b50ded 100644 --- a/Resources/Private/Templates/Backend/Order/Order/Show.html +++ b/Resources/Private/Templates/Backend/Order/Order/Show.html @@ -27,7 +27,7 @@

- +

{orderItem.comment -> f:sanitize.html()}
@@ -36,7 +36,7 @@

- +

From 70c1177ade7f90947d41ec884a21cd4889d2c020 Mon Sep 17 00:00:00 2001 From: rintisch Date: Sun, 7 Apr 2024 18:41:39 +0200 Subject: [PATCH 4/5] [TASK] Show correct message when wrong page Adapt the message when the module is used on a page without order items. Furhtermore show a correct message when the filtered search results in zero results. Solves #471 --- .../9.0/Breaking-471-CleanUpLanguageFiles.rst | 26 +++ Resources/Private/Language/locallang.xlf | 9 + .../Templates/Backend/Order/Order/List.html | 161 ++++++++++-------- 3 files changed, 126 insertions(+), 70 deletions(-) create mode 100644 Documentation/Changelog/9.0/Breaking-471-CleanUpLanguageFiles.rst diff --git a/Documentation/Changelog/9.0/Breaking-471-CleanUpLanguageFiles.rst b/Documentation/Changelog/9.0/Breaking-471-CleanUpLanguageFiles.rst new file mode 100644 index 00000000..3984e686 --- /dev/null +++ b/Documentation/Changelog/9.0/Breaking-471-CleanUpLanguageFiles.rst @@ -0,0 +1,26 @@ +.. include:: ../../Includes.txt + +=========================================================== +Breaking: #471 - Clean up language files +=========================================================== + +See :issue:`471` + +Description +=========== + +The language files contained a bigger amount of unused entries and their domains +were not really clear. Some entries were renamed to clarify their usage in the +backend. + +Affected Installations +====================== + +Installations which overwrite backend labels might be affected. + +Migration +========= + +You need to check whether the key of your overwrite was changed and adapt it. + +.. index:: Backend diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index c039baec..881f650c 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -574,6 +574,15 @@ End Date + + No results for this filter + + + This page does not contain any order items. + + + Please select a page where order items are stored. + diff --git a/Resources/Private/Templates/Backend/Order/Order/List.html b/Resources/Private/Templates/Backend/Order/Order/List.html index f590080b..5a8ab88f 100644 --- a/Resources/Private/Templates/Backend/Order/Order/List.html +++ b/Resources/Private/Templates/Backend/Order/Order/List.html @@ -7,78 +7,99 @@
- + + + + Do not show the filter if the page has no `orderItems` and no ``searchArguments`. + The searchArguments are needed as condition as otherwise the filters will not be shown when the + search results in zero order items. + + + + + + -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
( - - ) -
- -
( - - ) -
-   -
-
- -
- - Select a Page where Order Item Dataset are saved. - -
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
( + + ) +
+ +
( + + ) +
+   +
+
+ +
+ + + + + + +

+

+
+
+ +
+
\ No newline at end of file From 32e3fb82ae5e229fedf97ebc5e8d2f0e8154fbdb Mon Sep 17 00:00:00 2001 From: rintisch Date: Wed, 15 May 2024 09:09:01 +0200 Subject: [PATCH 5/5] [TASK] Add labels for multi-step checkout Add missing labels for the buttons which are used to move between the steps in a multi-step checkout setup. --- Resources/Private/Language/locallang.xlf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 881f650c..49344898 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -518,6 +518,13 @@ The product was added to cart. + + Previous step + + + Next step + + Order view for #%1$s (%2$s)