Skip to content

Batch new i18n inserts - #2394

Open
sevein wants to merge 1 commit into
qa/2.xfrom
dev/i18n-opts
Open

Batch new i18n inserts#2394
sevein wants to merge 1 commit into
qa/2.xfrom
dev/i18n-opts

Conversation

@sevein

@sevein sevein commented Jul 20, 2026

Copy link
Copy Markdown
Member

Batch translations that share populated columns into multi-row INSERT statements when their parent record is first saved. Preserve per-record save behavior when any translation already exists.

This primarily reduces database work during fresh installation and test fixture loading, where menus, settings, terms, and static pages may contain dozens of translations. It also improves multilingual SKOS imports, EAC-CPF parallel-name imports, and duplication of multilingual rights and events.

A fixture-backed setting with 41 translations falls from 42 INSERT statements to two: one for the setting and one for all translations.

@sevein
sevein requested a review from a team July 20, 2026 11:16
@sevein
sevein marked this pull request as draft July 20, 2026 11:29
Batch translations that share populated columns into multi-row INSERT
statements when their parent record is first saved. Preserve per-record
save behavior when any translation already exists.

This primarily reduces database work during fresh installation and test
fixture loading, where menus, settings, terms, and static pages may contain
dozens of translations. It also improves multilingual SKOS imports,
EAC-CPF parallel-name imports, and duplication of multilingual rights and
events.

A fixture-backed setting with 41 translations falls from 42 INSERT
statements to two: one for the setting and one for all translations.

Regular web forms and CSV imports generally save one culture at a time, so
their query count is unchanged. Typical EAD, DC, and MODS imports are also
single-culture per object and see little benefit. Browsing, searching, and
exporting are read paths and receive no direct benefit.

Use Propel parameter binding, identifier quoting, logging, and exception
wrapping in the bulk path. Group sparse rows by populated columns so omitted
values retain their database defaults.

Preserve the stale-row guard needed when unlinking physical storage. Treat
deleted-note saves as no-ops when a note remains in its parent collection.

Cover new, mixed, sparse, repeated, failed, unlink, and deleted-note saves
with database tests. Regenerate the Propel models with PHP 8.3-compatible
generator support and deterministic schema ordering.
@sevein
sevein marked this pull request as ready for review July 20, 2026 11:58
@sevein
sevein requested a review from sbreker July 23, 2026 10:10
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