Issue 35647 translate content on page not working#36231
Conversation
🤖 Bedrock Review —
|
|
Claude finished @gortiz-dotcms's task in 1m 0s —— View job Rollback Safety Analysis
Verdict: Safe to Rollback — all 10 changed files are purely frontend (Angular TypeScript + spec files). No database migrations, no Elasticsearch mapping changes, no REST/GraphQL API contract changes, no Java backend changes. Checked against every category:
The changes affect only Angular component behavior (UVE toolbar language selection flow, mode selector dropdown, store |
Legal RiskThe following dependencies were released under a license that RecommendationWhile merging is not directly blocked, it's best to pause and consider what it means to use this license before continuing. If you are unsure, reach out to your security team or Semgrep admin to address this issue. GPL-2.0 MPL-2.0
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… behavior - Add $isMissingTranslation to UVEStore mock in dot-editor-mode-selector spec - Add $isMissingTranslation to baseUVEState in toolbar spec - Add tests: only Preview shown when missing translation, Draft hidden even with lock feature enabled, $syncSelectedMode effect sets Preview selection Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- dot-editor-mode-selector.spec: add $isMissingTranslation signal to mock store; add missing-translation describe block with 3 new tests - dot-uve-toolbar.spec: add $isMissingTranslation: signal(false) to baseUVEState - dot-ema-shell.spec: update expected mode to PREVIEW for language 2 (untranslated) - edit-ema-editor.spec: patch pageLanguages + pageParams after language-2 load so editorHasAccessToEditMode=true and dialog renders for LANGUAGE_IS_CHANGED test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lation dialog Add 4 tests to edit-ema-editor.component.spec.ts that verify the confirm dialog lifecycle when a user loads a page in an untranslated language: - dialog opens for untranslated language - dialog does not open for already-translated language - rejecting the dialog does not trigger pageLoad (stays on selected language) - accepting the dialog calls translatePage with the correct language id Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The dot-edit-ema-dialog was inside @if ($showDialogs()), which evaluates to false when isMissingTranslation=true (because editorCanEditContent=false and viewMode=PREVIEW). This made this.dialog undefined when the user accepted the confirm dialog, silently breaking the translatePage call. Move dot-edit-ema-dialog outside the guard — the component renders nothing visible when its store is IDLE, so there is no UX impact. Also remove the now-dead $showDialogs computed and update the stale comment in the spec. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Tick the box to add this pull request to the merge queue (same as
|
Summary
Fixes #35647
When a user selected a language that had no page version yet, the UVE editor showed a confirmation dialog asking to create a new translation. Clicking "No" previously navigated the user back to the previous language. This made it impossible to view or translate the content that already exists on the page in that language without first creating a full page version.
What changed
edit-ema-editor.component.ts— stay on selected language when declining to create a translationThe
rejecthandler increateNewTranslationpreviously called#goBackToCurrentLanguage()to navigate back to the previous language. It now does nothing — the page is already loaded in the target language when the dialog appears, so dismissing the dialog naturally keeps the user there.Content already on the page is shown in the selected language where versions exist, with fallback to the default language where they don't. The page is read-only (no editing) since there is no page version in that language.
withPageApi.ts— sync mode to Preview when page has no translationWhen a page loads in an untranslated language,
pageParams.modeis forced toUVE_MODE.PREVIEWso the store's mode matches the read-only state the iframe is already in.withEditor.ts— expose$isMissingTranslationsignalMade the internal
isMissingTranslationcomputed public so the mode selector can react to it.dot-editor-mode-selector.component.ts— restrict the mode dropdown$isMissingTranslation = true— there is nothing to draft-edit.$syncSelectedModeeffect: replaced one-timengOnInitinitialization with a reactiveeffectso the dropdown updates whenever the mode or available options change (e.g. when switching languages).Behavior after fix
Grabacion.de.pantalla.2026-06-19.a.la.s.1.02.33.p.m.mov