Skip to content

docs: cover the POT file in the pup zip migration - #13

Open
jonwaldstein wants to merge 1 commit into
masterfrom
docs/pup-zip-pot-file
Open

docs: cover the POT file in the pup zip migration#13
jonwaldstein wants to merge 1 commit into
masterfrom
docs/pup-zip-pot-file

Conversation

@jonwaldstein

@jonwaldstein jonwaldstein commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Why

GiveWP core migrated to the pup zip workflow in impress-org/givewp#8291 and silently stopped shipping languages/give.pot. Nothing failed — every step reported success.

generate-zip.yml had an explicit Generate pot file step. pup has no equivalent, and nothing in the shared StellarWP workflow replaces it. pup i18n looks like the equivalent but downloads finished translations from a GlotPress instance rather than generating a POT from source, and with no i18n section in .puprc it exits immediately:

19:56:22.639  composer -- pup i18n
19:56:22.823  composer -- pup package     ← 0.18s

The artifact from that run has a languages/ directory containing only .gitkeep. The 4.16.7.1 zip on WordPress.org, still built by release.yml, has a 904,160 byte give.pot.

This guide contributed to it. The only mention of i18n was:

The shared workflow also takes i18n, check and additional_commands if the repo needs them. Leave them at their defaults unless there's a reason.

"Leave them at their defaults" is precisely the advice that loses the POT.

What changed

  • Phase 1 — a checklist item to determine whether the repo ships a POT at all, by looking in a zip the current generate-zip.yml produced.
  • Phase 2 — a section explaining why pup doesn't cover this and what pup i18n actually does, with the additional_commands block to add. It goes there because the shared workflow runs additional_commands after pup build and before pup package, which is the only window where the generated file gets picked up.
  • Phase 3 — verify the POT is in the artifact and is a plausible size, since an empty one looks like success.

The fix on the core side is impress-org/givewp#8299, verified: the artifact POT is byte-identical to the one WordPress.org ships apart from the POT-Creation-Date header, 6,434 msgids either way.

Note for whoever migrates the add-ons

Every impress-org repo ships a POT today — 26 of them have a sync-translations.yml caller, and the old generate-zip.yml generated one for each. Without this, the migration repeats the same silent loss per repo.

If enough add-ons end up carrying the same additional_commands string, an optional POT input on stellarwp/github-actions' zip.yml would be worth proposing upstream — WP-CLI is already installed there. Not yet, though: TEC ships .po/.mo pulled from GlotPress and no POT template at all, so there's currently no consumer for it outside impress-org.

🤖 Generated with Claude Code

https://claude.ai/code/session_018jugbB3kEcQbDRzWuKfHLr


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The migration lost GiveWP core's POT file and nothing reported it. pup
has no POT generation, and `pup i18n` looks like the equivalent while
doing something else entirely: it downloads finished translations from
GlotPress. With no i18n section in .puprc it exits immediately and still
reports success, so the zip ships an empty languages directory and every
step is green.

The guide told the reader to leave the i18n input at its default, which
is exactly the advice that produced this. Add the check to Phase 1, the
additional_commands step to Phase 2, and an artifact check to Phase 3.

Every impress-org repo shipped a POT as of the core migration, so this
would otherwise repeat for each add-on.
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