Skip to content

chore: [DHIS2-22063] Block pushes with hardcoded custom terminology in pot file - #4729

Draft
henrikmv wants to merge 14 commits into
hv/feat/DHIS2-21635_display-custom-teminologyfrom
hv/chore/DHIS2-22063_custom-terminology-check-script
Draft

chore: [DHIS2-22063] Block pushes with hardcoded custom terminology in pot file#4729
henrikmv wants to merge 14 commits into
hv/feat/DHIS2-21635_display-custom-teminologyfrom
hv/chore/DHIS2-22063_custom-terminology-check-script

Conversation

@henrikmv

@henrikmv henrikmv commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

DHIS2-22063

Adds a new lint-like check (yarn i18n:verify) that scans i18n/en.pot for custom-terminology words (e.g. "enrollment", "event", "note") used outside {{...}} template placeholders. These terms must be wrapped in placeholders so they can be overridden per program at runtime.

The check is enforced in two places:

  • Pre-push hook — blocks local pushes
  • CI workflow — new i18n job gates the publish step

The pipeline is:

d2-app-scripts i18n extract
  → node scripts/verifyCustomTerminology.mjs
    → parse en.pot msgids
    → strip {{…}} placeholders
    → regex-match CUSTOM_TERMS
    → exit 1 if violations found

…tionship-attribute' into hv/chore/DHIS2-22063_custom-terminology-check-script
…tionship-attribute' into hv/chore/DHIS2-22063_custom-terminology-check-script
…tionship-attribute' into hv/chore/DHIS2-22063_custom-terminology-check-script
…tionship-attribute' into hv/chore/DHIS2-22063_custom-terminology-check-script
…tionship-attribute' into hv/chore/DHIS2-22063_custom-terminology-check-script
…om-teminology' into hv/chore/DHIS2-22063_custom-terminology-check-script
…om-teminology' into hv/chore/DHIS2-22063_custom-terminology-check-script
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

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.

1 participant