Add automated test coverage that POTX works against all of core

Created on 1 February 2024, 11 months ago
Updated 2 February 2024, 11 months ago

Problem/Motivation

Split off from ๐Ÿ› ckeditor5 module has an invalid config schema which causes POTX to fail Needs review . It'd be great to have something in our automated test pipelines that warned us if potx started failing.

Steps to reproduce

Proposed resolution

Add something, maybe via phpunit, possibly a custom job in the GitLab CI pipelines, that attempts to use potx and makes sure we can extract translation strings.

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
PHPUnitย  โ†’

Last updated 1 day ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States dww

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dww
  • ๐Ÿ‡ช๐Ÿ‡ธSpain fjgarlin

    Does https://www.drupal.org/project/potx โ†’ project have drush commands that would fail if a situation like the one presented in the (split) issue happens?

    Itโ€™d be relatively easy to create a new job, if there is a command. We could use (untested):

    '๐ŸŒ Drupal Translations (potx)':
      <<: [ *with-composer, *default-job-settings-lint ]
      stage: ๐Ÿช„ Lint
      when: manual
      variables:
        KUBERNETES_CPU_REQUEST: "2"
      script:
        - composer require drupal/potx
        - drush potx ...
    
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    Potx does have a drush command, I am not sure it reports errors found in a proper way for testing. It depends on what kind of smoke test we are looking for. If we want to check for misuses of syntax as well, it has false positives which would need to have some kind of baseline to test against then. https://localize.drupal.org/translate/projects/drupal/releases/559203#so... is the 163 warnings currently found. Most of them are likely false positive :)

    That said, if we only want a smoke test: whether it fatals or not, that is probably easier :D

Production build 0.71.5 2024