Batch new i18n inserts - #2394
Open
sevein wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.