Closed Bug 1584164 Opened 5 months ago Closed 5 months ago

[Translate.Next] Editor tries to convert syntax from complex to complex

Categories

(Webtools :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adrian, Assigned: mathjazz)

Details

Attachments

(1 file)

Steps to reproduce

  1. Go to a simple string
  2. Switch to the source editor
  3. Enter a translation that is not supported by the rich or simple editors
  4. Hit save

Expected result

The translation is saved and the editor shows it correctly.

Actual result

A JS error occurs and the page turn blank. Here's the error:

Error: Unsupported conversion: from 'complex' to 'complex' convertSyntax.js:171
    convertSyntax convertSyntax.js:171
    updateEditorContent Editor.js:107
    componentDidUpdate Editor.js:62
    React 7
    unstable_runWithPriority scheduler.development.js:255
    React 8
    onStateChange Redux
    onStateChange self-hosted:1017
    Redux 2
    notifyNestedSubs self-hosted:1017
    onStateChange Redux
    onStateChange self-hosted:1017
    Redux 2
    notifyNestedSubs self-hosted:1017
    onStateChange Redux
    onStateChange self-hosted:1017
    Redux 2
    notifyNestedSubs self-hosted:1017
    onStateChange Redux
    onStateChange self-hosted:1017
    Redux 3
    routerMiddleware middleware.js:40
    dispatch Redux
    _callee$ actions.js:193
    tryCatch runtime.js:45
    invoke runtime.js:264
    method runtime.js:98
    asyncGeneratorStep asyncToGenerator.js:3
    _next asyncToGenerator.js:25

The problem here is that we store syntaxType in state, which doesn't change unless entity changes or translation changes from external source in the simple/rich editor. None of which happens here.

Another symptom can be reproduced like this:

  1. Go to a simple string
  2. Switch to the source editor
  3. Enter a rich translation
  4. Switch from the source editor

Outcome: Rich string appears in the simple editor.

Assignee: nobody → m
Status: NEW → ASSIGNED

Meh, those are actually two separate bugs.

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.