Skip to content

Write PO-Revision-Date in the format the PO header is defined to use - #45

Merged
tamnd merged 1 commit into
mainfrom
fix-po-revision-date
Aug 18, 2026
Merged

Write PO-Revision-Date in the format the PO header is defined to use#45
tamnd merged 1 commit into
mainfrom
fix-po-revision-date

Conversation

@tamnd

@tamnd tamnd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

The published site had no Vietnamese on it at all. Not less than the coverage table claimed, none: all 548 catalogs and all 1 437 reviewed strings, gone from every page, on the first deploy after apply started writing headers.

apply stamps a run as 2026-08-18T03:55Z, because that is what a run is called everywhere else in this tool: in the queue, in the run= field of a provenance comment, and in the memory. PO-Revision-Date is not ISO 8601. It is specified as %Y-%m-%d %H:%M with a numeric offset, Babel's reader raises on the T and the Z, Sphinx catches that as a reading error and skips writing the .mo for that catalog, and every page in it renders in English.

Nothing reports this. Sphinx logs one warning among several thousand and carries on. The build succeeds. The coverage table counts the .po files and is entirely right about every one of them. The audit passes S08, because both sides of that comparison are our own renderer and our own renderer is happy. The only place the failure is visible is the rendered HTML, which is the one thing nothing was reading.

So the test for it reads the file back with Babel rather than with polib. polib parses our ISO date without complaining, which is why every test we had agreed with itself for the whole time this was broken. Babel is what Sphinx reads with, and the consumer's parser is the only one whose opinion decides whether a reader sees Vietnamese. That is worth a dev dependency.

A date already in the right shape is handed back untouched, so a date written by Transifex survives a round trip through apply unchanged and only the ones this tool got wrong are rewritten.

The published site had no Vietnamese on it at all. Not less than the coverage table claimed, none: all 548 catalogs and all 1 437 reviewed strings, gone from every page, on the first deploy after apply started writing headers.

apply stamps a run as 2026-08-18T03:55Z, because that is what a run is called everywhere else in this tool: in the queue, in the run= field of a provenance comment, and in the memory. PO-Revision-Date is not ISO 8601. It is specified as %Y-%m-%d %H:%M with a numeric offset, Babel's reader raises on the T and the Z, Sphinx catches that as a reading error and skips writing the .mo for that catalog, and every page in it renders in English.

Nothing reports this. Sphinx logs one warning among several thousand and carries on. The build succeeds. The coverage table counts the .po files and is entirely right about every one of them. The audit passes S08, because both sides of that comparison are our own renderer and our own renderer is happy. The only place the failure is visible is the rendered HTML, which is the one thing nothing was reading.

So the test for it reads the file back with Babel rather than with polib. polib parses our ISO date without complaining, which is why every test we had agreed with itself for the whole time this was broken. Babel is what Sphinx reads with, and the consumer's parser is the only one whose opinion decides whether a reader sees Vietnamese. That is worth a dev dependency.

A date already in the right shape is handed back untouched, so a date written by Transifex survives a round trip through apply unchanged and only the ones this tool got wrong are rewritten.
@tamnd
tamnd merged commit c2277f7 into main Aug 18, 2026
@tamnd
tamnd deleted the fix-po-revision-date branch August 18, 2026 04:21
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