From 6c631221a8027915112f3edd0b5aa855c80642a3 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Tue, 17 Nov 2026 09:04:08 +0100 Subject: [PATCH 1/3] [TASK] Fix typos Co-Authored-By: Claude Opus 5.5 --- Classes/Updates/SwitchableControllerActionsPluginUpdater.php | 2 +- .../Administrator/Configuration/TypoScript/Index.rst | 2 +- .../5.0/Breaking-204-MigrateSwitchableControllerActions.rst | 2 +- Documentation/Editor/EditingAProduct/Description/Index.rst | 2 +- Tests/Unit/Domain/Model/Product/ProductTest.php | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Classes/Updates/SwitchableControllerActionsPluginUpdater.php b/Classes/Updates/SwitchableControllerActionsPluginUpdater.php index 02ac640b..8fb4c3cd 100644 --- a/Classes/Updates/SwitchableControllerActionsPluginUpdater.php +++ b/Classes/Updates/SwitchableControllerActionsPluginUpdater.php @@ -50,7 +50,7 @@ public function getIdentifier(): string public function getTitle(): string { - return 'Migrates plugins of existing cart_produts plugins using switchableControllerActions'; + return 'Migrates plugins of existing cart_products plugins using switchableControllerActions'; } public function getDescription(): string diff --git a/Documentation/Administrator/Configuration/TypoScript/Index.rst b/Documentation/Administrator/Configuration/TypoScript/Index.rst index 304f03ae..78acc4c1 100644 --- a/Documentation/Administrator/Configuration/TypoScript/Index.rst +++ b/Documentation/Administrator/Configuration/TypoScript/Index.rst @@ -40,7 +40,7 @@ the individual parameter are described. :Type: array :Default: The TypoScript template use the setting defined by the constant of the cart extension. - Configures how prices should be formated in frontend. The + Configures how prices should be formatted in frontend. The `\Extcode\Cart\ViewHelpers\Format\CurrencyViewHelper` uses this global setting. diff --git a/Documentation/Changelog/5.0/Breaking-204-MigrateSwitchableControllerActions.rst b/Documentation/Changelog/5.0/Breaking-204-MigrateSwitchableControllerActions.rst index f0bcaa75..990fadb9 100644 --- a/Documentation/Changelog/5.0/Breaking-204-MigrateSwitchableControllerActions.rst +++ b/Documentation/Changelog/5.0/Breaking-204-MigrateSwitchableControllerActions.rst @@ -24,7 +24,7 @@ All installations which are not set up with version 5 of EXT:cart_products Migration ========= -1. Run the UpdateWizard "Migrates plugins of existing cart_produts plugins +1. Run the UpdateWizard "Migrates plugins of existing cart_products plugins using switchableControllerActions". 2. Adapt the value of `plugin` from `Products` to `ShowProduct` in your site configuration (`config/sites//config.yaml`): diff --git a/Documentation/Editor/EditingAProduct/Description/Index.rst b/Documentation/Editor/EditingAProduct/Description/Index.rst index 08e66f11..624ba643 100644 --- a/Documentation/Editor/EditingAProduct/Description/Index.rst +++ b/Documentation/Editor/EditingAProduct/Description/Index.rst @@ -15,7 +15,7 @@ Description =========== A longer description of the product. This is limited to text, for further -options the below descriped 'Content' can be used. +options the below described 'Content' can be used. Content ======= diff --git a/Tests/Unit/Domain/Model/Product/ProductTest.php b/Tests/Unit/Domain/Model/Product/ProductTest.php index 260b13ad..fd0f80a8 100644 --- a/Tests/Unit/Domain/Model/Product/ProductTest.php +++ b/Tests/Unit/Domain/Model/Product/ProductTest.php @@ -302,13 +302,13 @@ public function getBestSpecialPriceForGivenSpecialPricesReturnsBestSpecialPrice( public function getBestSpecialPriceDiscountForGivenSpecialPriceReturnsPercentageDiscount(): void { $price = 10.0; - $porductSpecialPrice = 9.0; + $productSpecialPrice = 9.0; $product = new Product(); $product->setPrice($price); $specialPrice = new SpecialPrice(); - $specialPrice->setPrice($porductSpecialPrice); + $specialPrice->setPrice($productSpecialPrice); $product->addSpecialPrice($specialPrice); From 7f534930e1b242f8541cc4907cc8c53e411465a6 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Tue, 17 Nov 2026 09:04:51 +0100 Subject: [PATCH 2/3] [TASK] Check spelling with typos Adds Build/Scripts/lint-typos.sh with Build/typos.toml, the composer scripts project:lint:typos and project:lint:typos:fix, the matching shell.nix commands and a CI job. Vendored schemas, a German changelog and a changelog with a misspelled file name are excluded, German test data and the TYPO3 core property substNEWwithIDs are allowed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yaml | 12 ++++++++++++ Build/Scripts/lint-typos.sh | 24 ++++++++++++++++++++++++ Build/typos.toml | 18 ++++++++++++++++++ composer.json | 3 +++ shell.nix | 29 +++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100755 Build/Scripts/lint-typos.sh create mode 100644 Build/typos.toml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4ee525bd..3a942f71 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,6 +32,18 @@ jobs: - name: PHP lint run: Build/Scripts/lint-php.sh + typos-linting: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install typos + run: pipx install typos + + - name: Typos lint + run: Build/Scripts/lint-typos.sh + typoscript-linting: runs-on: ubuntu-latest steps: diff --git a/Build/Scripts/lint-typos.sh b/Build/Scripts/lint-typos.sh new file mode 100755 index 00000000..5a9c8810 --- /dev/null +++ b/Build/Scripts/lint-typos.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Checks the spelling of all files of the extension with typos, using +# Build/typos.toml. Files ignored by .gitignore are skipped. +# +# typos is not installed via composer. It is provided by shell.nix, in CI it +# is installed via pipx. +# +# Usage: +# Build/Scripts/lint-typos.sh report typos +# Build/Scripts/lint-typos.sh --fix fix unambiguous typos in place + +source "$(dirname "${BASH_SOURCE[0]}")/common.sh" + +if ! command -v typos > /dev/null; then + echo "Missing typos, please install it first, e.g. \"pipx install typos\"." >&2 + exit 1 +fi + +if [ "${1:-}" = "--fix" ]; then + typos --config Build/typos.toml --write-changes +else + typos --config Build/typos.toml +fi diff --git a/Build/typos.toml b/Build/typos.toml new file mode 100644 index 00000000..9b9c87f2 --- /dev/null +++ b/Build/typos.toml @@ -0,0 +1,18 @@ +[files] +extend-exclude = [ + # Vendored schemas, kept as published. + "Build/xliff-core-1.2-strict.xsd", + "Build/xml.xsd", + # Written in German. + "Documentation/Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst", + # Misspelled file name, renaming it would change the documentation URL. + "Documentation/Changelog/2.4/Feature-71-AllowToRenderBackendVariantsInDifferendSelectors.rst", +] + +[default.extend-words] +# German test data. +produkt = "produkt" + +[default.extend-identifiers] +# TYPO3 core API. +substNEWwithIDs = "substNEWwithIDs" diff --git a/composer.json b/composer.json index e51e15e1..ce320f70 100644 --- a/composer.json +++ b/composer.json @@ -84,11 +84,14 @@ "project:cgl:fix": "Build/Scripts/cgl.sh --fix", "project:lint": [ "@project:lint:php", + "@project:lint:typos", "@project:lint:typoscript", "@project:lint:xml", "@project:lint:yaml" ], "project:lint:php": "Build/Scripts/lint-php.sh", + "project:lint:typos": "Build/Scripts/lint-typos.sh", + "project:lint:typos:fix": "Build/Scripts/lint-typos.sh --fix", "project:lint:typoscript": "Build/Scripts/lint-typoscript.sh", "project:lint:xml": "Build/Scripts/lint-xml.sh", "project:lint:yaml": "Build/Scripts/lint-yaml.sh", diff --git a/shell.nix b/shell.nix index b9ba17a1..798c2725 100644 --- a/shell.nix +++ b/shell.nix @@ -67,6 +67,30 @@ let ''; }; + projectLintTypos = pkgs.writeShellApplication { + name = "project-lint-typos"; + + runtimeInputs = [ + pkgs.typos + ]; + + text = '' + "$PROJECT_ROOT/Build/Scripts/lint-typos.sh" + ''; + }; + + projectLintTyposFix = pkgs.writeShellApplication { + name = "project-lint-typos-fix"; + + runtimeInputs = [ + pkgs.typos + ]; + + text = '' + "$PROJECT_ROOT/Build/Scripts/lint-typos.sh" --fix + ''; + }; + projectLintTypoScript = pkgs.writeShellApplication { name = "project-lint-typoscript"; @@ -108,6 +132,7 @@ let runtimeInputs = [ projectLintPhp + projectLintTypos projectLintTypoScript projectLintXml projectLintYaml @@ -115,6 +140,7 @@ let text = '' project-lint-php + project-lint-typos project-lint-typoscript project-lint-xml project-lint-yaml @@ -188,6 +214,7 @@ in pkgs.mkShellNoCC { pkgs.geckodriver pkgs.procps pkgs.libxml2 + pkgs.typos pkgs.yamllint php composer @@ -196,6 +223,8 @@ in pkgs.mkShellNoCC { projectCglFix projectLint projectLintPhp + projectLintTypos + projectLintTyposFix projectLintTypoScript projectLintXml projectLintYaml From ac1b06f782e887884a1881fab327fc947cff0b88 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Tue, 17 Nov 2026 09:24:39 +0100 Subject: [PATCH 3/3] [DOCS] Translate German changelog text Co-Authored-By: Claude Opus 5.5 --- Build/typos.toml | 2 -- .../Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Build/typos.toml b/Build/typos.toml index 9b9c87f2..7ac89656 100644 --- a/Build/typos.toml +++ b/Build/typos.toml @@ -3,8 +3,6 @@ extend-exclude = [ # Vendored schemas, kept as published. "Build/xliff-core-1.2-strict.xsd", "Build/xml.xsd", - # Written in German. - "Documentation/Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst", # Misspelled file name, renaming it would change the documentation URL. "Documentation/Changelog/2.4/Feature-71-AllowToRenderBackendVariantsInDifferendSelectors.rst", ] diff --git a/Documentation/Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst b/Documentation/Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst index b2194287..a4ec7fc1 100644 --- a/Documentation/Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst +++ b/Documentation/Changelog/2.3/Feature-70-AddProductsToCartFromListView.rst @@ -11,7 +11,7 @@ Description In some cases you don't need a detail page for the products and want to allow adding products to the shopping cart in the list view. -Diese Änderung erlaubt es, der showForm Action das Produkt als Parameter mitzugeben. +This change allows to pass the product as parameter to the showForm action. Integration ===========