From 1a80073440bfee8236b1aa2aa69fce2ca1b26739 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Tue, 17 Nov 2026 09:42:34 +0100 Subject: [PATCH 1/2] [TASK] Fix typos Co-Authored-By: Claude Opus 5.5 --- Classes/Updates/SwitchableControllerActionsPluginUpdater.php | 2 +- Documentation/Administrator/Configuration/TypoScript/Index.rst | 2 +- Documentation/Introduction/Support/Index.rst | 2 +- Resources/Private/Language/locallang_tca.xlf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/Updates/SwitchableControllerActionsPluginUpdater.php b/Classes/Updates/SwitchableControllerActionsPluginUpdater.php index f44f75e3..6e4562ec 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 635dc0b8..7c3f5612 100644 --- a/Documentation/Administrator/Configuration/TypoScript/Index.rst +++ b/Documentation/Administrator/Configuration/TypoScript/Index.rst @@ -25,7 +25,7 @@ EXT:cart. Data type array Description - Configures how prices should be formated in frontend. The \Extcode\Cart\ViewHelpers\Format\CurrencyViewHelper use + Configures how prices should be formatted in frontend. The \Extcode\Cart\ViewHelpers\Format\CurrencyViewHelper use this global setting. Default The TypoScript template copy the setting from settings of the cart extension. diff --git a/Documentation/Introduction/Support/Index.rst b/Documentation/Introduction/Support/Index.rst index 9b1b4221..7a2f568d 100644 --- a/Documentation/Introduction/Support/Index.rst +++ b/Documentation/Introduction/Support/Index.rst @@ -6,7 +6,7 @@ Support Slack ----- -There is an own channel at the TYPO3 Slack. Please use this cannel to contact us. +There is an own channel at the TYPO3 Slack. Please use this channel to contact us. The URL is: https://typo3.slack.com/messages/ext-cart/ diff --git a/Resources/Private/Language/locallang_tca.xlf b/Resources/Private/Language/locallang_tca.xlf index 2c611be7..b4c339ba 100644 --- a/Resources/Private/Language/locallang_tca.xlf +++ b/Resources/Private/Language/locallang_tca.xlf @@ -20,7 +20,7 @@ Relations - Informations + Information Dates From f7b660d363540ef319e65195b749de7576819b9a Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Tue, 17 Nov 2026 09:43:21 +0100 Subject: [PATCH 2/2] [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 are excluded, the TYPO3 core property substNEWwithIDs and an existing translation key are allowed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yaml | 12 ++++++++++++ Build/Scripts/lint-typos.sh | 24 ++++++++++++++++++++++++ Build/typos.toml | 16 ++++++++++++++++ composer.json | 3 +++ shell.nix | 29 +++++++++++++++++++++++++++++ 5 files changed, 84 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 e51aad11..245dc230 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,6 +31,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..ab804d25 --- /dev/null +++ b/Build/typos.toml @@ -0,0 +1,16 @@ +[files] +extend-exclude = [ + # Vendored schemas, kept as published. + "Build/xliff-core-1.2-strict.xsd", + "Build/xml.xsd", +] + +[default] +extend-ignore-re = [ + # Translation key, renaming it would drop existing translations. + "tx_cartevents_domain_model_eventdate\\.div\\.informations", +] + +[default.extend-identifiers] +# TYPO3 core API. +substNEWwithIDs = "substNEWwithIDs" diff --git a/composer.json b/composer.json index 11f197cd..cdbe0efd 100644 --- a/composer.json +++ b/composer.json @@ -81,11 +81,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 6f00c7e7..fa27a5f8 100644 --- a/shell.nix +++ b/shell.nix @@ -72,6 +72,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"; @@ -113,6 +137,7 @@ let runtimeInputs = [ projectLintPhp + projectLintTypos projectLintTypoScript projectLintXml projectLintYaml @@ -120,6 +145,7 @@ let text = '' project-lint-php + project-lint-typos project-lint-typoscript project-lint-xml project-lint-yaml @@ -193,6 +219,7 @@ in pkgs.mkShellNoCC { pkgs.geckodriver pkgs.procps pkgs.libxml2 + pkgs.typos pkgs.yamllint php composer @@ -201,6 +228,8 @@ in pkgs.mkShellNoCC { projectCglFix projectLint projectLintPhp + projectLintTypos + projectLintTyposFix projectLintTypoScript projectLintXml projectLintYaml