Skip to content

fix(EC-22843): strict whitespace enforcement - #128

Merged
TimEvink merged 7 commits into
mainfrom
whitespaceformatting
Jul 24, 2025
Merged

fix(EC-22843): strict whitespace enforcement#128
TimEvink merged 7 commits into
mainfrom
whitespaceformatting

Conversation

@TimEvink

@TimEvink TimEvink commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

This PR, a dependency of https://github.com/Elfsquad/cpq/pull/7086, enforces the following whitespace formatting of the sentences in the translations csv's.

  • no leading or trailing whitespace characters.
  • only single spaces are allowed as separators between words in a sentence.

More specifically, this PR adds a workflow (check-whitespace.yml) that runs a test (test-whitespace.py) on every pr to main of translations, passing only if the above two rules are met for all the text in the translations file.

The translations csv's are also updated to conform to this new test, and a helper script is included which I used to generate the new csv's (and could be helpful in case of manual intervention later on).

Finally some small changes to existing scripts/workflows:

  • the use of exit(0) and exit(1) in python is a bit fragile (although it works for now), but using sys.exit is more stable.
  • updated checkout versions.
  • the checkouts of the repo do not need any git history so we can set the fetch-depth to 1.

@TimEvink TimEvink changed the title feat: whitespace formatting fix(EC-22843): strict whitespace enforcement Jul 22, 2025
@TimEvink
TimEvink marked this pull request as ready for review July 22, 2025 12:02

@minardus minardus left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@TimEvink
TimEvink merged commit 8069c56 into main Jul 24, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants