Replies: 1 comment 4 replies
-
|
This looks great. I think it's the right approach. Looked through the branch and the apporach is clean and matches the existing i18n work, the migration is careful (idempotent column checks, validated identifiers, both SQLite and Postgres paths), and the junction-table remap to translation_group is the right call. Want to open it as a PR? Easier to do per-file review there. A few things I'd want to discuss in-line:
Bringing in @MA2153 since #403 covers a lot of the same ground. If this lands, much of #403 is solved structurally even though some specifics (settings, collection labels) need follow-up PRs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Mig
019_i18nmade content tables per-locale, but menus and taxonomieswere left out. On a multilingual site:
category = News) don't follow a post into its translations.Proposal
Apply the same row-per-locale +
translation_groupmodel used for content to_emdash_menus,_emdash_menu_items,taxonomies, and_emdash_taxonomy_defs. Defaults to'en'so single-locale installs keep working.Two structural choices to confirm
_emdash_menu_items.reference_idstores the referenced content'stranslation_group(not row id). Menu items become locale-agnostic and "follow" translations.content_taxonomies.taxonomy_idstores the term'stranslation_group(FK dropped). One assignment applies across all locales of the post.Both are no-ops on installs without translations (
translation_group == idafter mig 019).Surface
?locale=xxon GETs;locale+translationOfin POST bodies. New…/translationsendpoints for menus and terms.getMenu,getTaxonomyTerms,getEntryTerms, …) take{ locale }with the same fallback resolution asgetEmDashEntry.*_translationstools.<TranslationsPanel>(extracted fromContentEditor) in menu editor + term-edit dialog;LocaleSwitcherin lists; URL gains?locale=xx.Implementation status
Working branch:
https://github.com/Rimander/emdash/tree/feature/core-i18n-menus-taxonomies
Migration in sibling style (
db.schema.createTable()+addUniqueConstraint),end-to-end wiring, changeset (minor), docs update, typecheck + lint clean,packages/core2418/2418 green, manual browser + SQLite verification.Dedicated tests for the new endpoints and the data remap pending — will add once direction is approved.
Beta Was this translation helpful? Give feedback.
All reactions