Page MenuHomePhabricator

Math formulas display the code in addition to the formula in the translation
Open, MediumPublic

Description

When adding a math formula to the translation, the math formula is rendered but it also includes the code for it, which is displayed as translated. This quick link to test let's you translate an example article and check the published result for this issue:

Screenshot 2019-05-15 at 13.52.16.png (500×1 px, 125 KB)

The expected result would be to have just the formula rendered in the translation, not rendering the the source code of such formula. Note that in the rendering of the math formula source, some words are shown as translated (see "p rimer"), although those translations are not included in the translation contents when inspected or published.

Interestingly, the math formula source is no longer displayed when the display options are adjusted to "inline" or "block", as illustrated below:

May-15-2019 14-04-48.gif (520×640 px, 2 MB)


In addition, an unmodified content warning is shown which makes no sense since math formulas are not expected to be edited. Math formulas should be excluded for this check.

Event Timeline

Editing articles with math has entire set of problems, like lots of newline characters generated (T196151), formulas missing from source article (T203728) not being saved (T222699) and this leak of code into translation.

From your recording, there seems to be a workaround for code leaking problems, which could be helpful when debugging the underlying issues. Another similar workaround I found was when I was translating from English to Serbian using Google Translate. With MT, only "<img>" text was displayed T214256. Switching to "Copy original content" acts just like "Start with empty paragraph". But when "Copy original content" is the default option, everything works.